Erik Schnetter <>
Thomas Radke <>

26 August 2005


Thorn CarpetInterp provides a parallel interpolator for Carpet.

1 Introduction

CarpetInterp works similar to PUGHInterp, the interpolation thorn of the standard unigrid driver in Cactus.

  1. Firstly, the points to interpolate at (which can vary from processor to processor) are mapped onto processors. Each processor accumulates the number of coordinates it needs to send to other processors (which own the corresponding points).
  2. In a collective communication step, all processors exchange the coordinates of the interpolation points which are not located locally.
  3. After each processor received the coordinates of (local) points to interpolate at, it maps them onto components (also counting the number of points for each component).
  4. Now all processors do – in parallel – the actual interpolation by calling the local interpolator (via CCTK_InterpLocalUnform()) on each component.
  5. Finally, the interpolation results are sent back to the requesting processors in another collective communication step.

2 Using CarpetInterp

CarpetInterp overloads the flesh interpolation C API routine

  int CCTK_InterpGridArrays  
                     (const cGH *GH,  
                      int N_dims,  
                      int local_interp_handle,  
                      int param_table_handle,  
                      int coord_system_handle,  
                      int N_interp_points,  
                        int interp_coords_type,  
                        const void *const interp_coords[],  
                      int N_input_arrays,  
                        const CCTK_INT input_array_indices[],  
                      int N_output_arrays,  
                        const CCTK_INT output_array_types[],  
                        void *const output_arrays[])

which is described in detail in the Cactus Reference Manual.

It also provides an equivalent aliased function