xx CarpetInterp

CarpetInterp

Erik Schnetter <schnetter@aei.mpg.de> Thomas Radke <tradke@aei.mpg.de>

26 August 2005

Abstract

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.

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).

In a collective communication step, all processors exchange the coordinates of the interpolation points which are not located locally.

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).

Now all processors do – in parallel – the actual interpolation by calling the local interpolator (via

CCTKxInterpLocalUnform()) on each component.

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

xxintxCCTK_InterpGridArrays
xxxxxxxxxxxxxxxxxxxxx(constxcGHx*GH,
xxxxxxxxxxxxxxxxxxxxxxintxN_dims,
xxxxxxxxxxxxxxxxxxxxxxintxlocal_interp_handle,
xxxxxxxxxxxxxxxxxxxxxxintxparam_table_handle,
xxxxxxxxxxxxxxxxxxxxxxintxcoord_system_handle,
xxxxxxxxxxxxxxxxxxxxxxintxN_interp_points,
xxxxxxxxxxxxxxxxxxxxxxxxintxinterp_coords_type,
xxxxxxxxxxxxxxxxxxxxxxxxconstxvoidx*constxinterp_coords[],
xxxxxxxxxxxxxxxxxxxxxxintxN_input_arrays,
xxxxxxxxxxxxxxxxxxxxxxxxconstxCCTK_INTxinput_array_indices[],
xxxxxxxxxxxxxxxxxxxxxxintxN_output_arrays,
xxxxxxxxxxxxxxxxxxxxxxxxconstxCCTK_INTxoutput_array_types[],
xxxxxxxxxxxxxxxxxxxxxxxxvoidx*constxoutput_arrays[])

which is described in detail in the Cactus Reference Manual.

It also provides an equivalent aliased function

xxCCTK_INTxFUNCTIONxDriverInterpolate
xxxxxxxxxxxxxxxxxxxxx(CCTK_POINTER_TO_CONSTxINxcctkGH,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxN_dims,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxlocal_interp_handle,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxparam_table_handle,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxcoord_system_handle,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxN_interp_points,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxinterp_coords_type,
xxxxxxxxxxxxxxxxxxxxxxCCTK_POINTER_TO_CONSTxARRAYxINxinterp_coords,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxN_input_arrays,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxARRAYxINxinput_array_indices,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxINxN_output_arrays,
xxxxxxxxxxxxxxxxxxxxxxCCTK_INTxARRAYxINxoutput_array_types,
xxxxxxxxxxxxxxxxxxxxxxCCTK_POINTERxARRAYxINxoutput_arrays)

which can be called by symmetry thorns to implement symmetry interpolations (see the thorn documentation of CactusBase/SymBase for details).

2.1 Limitations

The current implementation of CarpetInterp supports only 3-dimensional grid variables as inputs (Nxdims 3).

Interpolation coordinates and output arrays must be of type CCTKxVARIABLExREAL.

A valid handle for a parameter table must be passed in so that CarpetInterp can store in it the overall status code of the local interpolator.

3 Parameters

11barriers 10Scope: privatex01 BOOLEAN

11Description: Insert barriers at strategic places for debugging purposes (slows down execution)

11             10  x01  Default: no

11checkxtreexsearch 10Scope: privatex01  BOOLEAN

11Description: Cross-check the result of the tree search

11             10  x01  Default: no

11

11ipoison  10Scope: privatex01  REAL

11Description: Integer poison value

11 Range 10  x01  Default: -420042

11*:*  10

11

11poison  10Scope: privatex01  REAL

11Description: Poison value

11 Range 10  x01  Default: -4.20042e+30

11*:*  10

11

11treexsearch 10Scope: privatex01  BOOLEAN

11Description: Use a tree search to find the source processor

11             10  x01  Default: yes

11

4 Interfaces

General Implements: interp

Uses header: nompi.h data.hh bbox.hh data.hh defs.hh dist.hh ggf.hh timestat.hh typecase.hh typeprops.hh vect.hh carpet.hh

Provides: DriverInterpolate to 5 Schedule This section lists all the variables which are assigned storage by thorn Carpet/CarpetInterp. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE

Scheduled Functions

CCTKxSTARTUP x carpetinterpstartup x startup routine x

11x11Language:11c
11 x 11Type: 11function