xx InterpToArray

InterpToArray

Erik Schnetter <schnetter@cct.lsu.edu>

June 30, 2010

Abstract

Interpolate grid functions to grid arrays on a regular grid of locations, so that these can e.g.xbe output more easily.

1 Introduction

Some post-processing and visualisation tools cannot handle mesh refinement or multi-block systems. These tools then require interpolating the result onto a regular, uniform grid. This is what this thorn does.

InterpToArray can interpolate to 0D, 1D, 2D, and 3D grids. The interpolation result is stored in grid arrays. These can be either replicated or distributed over all processes. Note that using replicated (DISTRIB=constant) grid arrays can require a substantial amount of memory on each process.

2 Numerical Implementation InterpToArray uses standard Cactus interpolators such as PUGHInterp or CarpetInterp.

3 Using This Thorn The variables which should be interpolated are specified by parameters; currently, up to 100 variables can be interpolated. The interpolator and its options are also specified via parameters. Finally, the locations of the points of the regular grid are also specified via parameters. These grid points are specified via an origin and offsets, and they do not have to be aligned with the coordinate axes. For example, a 2D grid is specified via three (real) vectors , , and , and via its (integer) size and . The coordinates of the grid points are then given via

. x^{a}(i, j) = x^{a} + i · di^{a} + j · dj^{a}

for and . Grids with other dimensions are specified equivalently.

4 Parameters

11array1dxdxxi 10Scope: restrictedx01 REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11array1dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array1dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array1dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 1D grid arrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11

11array1dxspacederivs  10Scope: restrictedx01  INT

11Description: Space derivative orders for each grid function

11  Range  10  x01  Default: (none)

110:*  10

11

11array1dxtimederivs  10Scope: restrictedx01  INT

11Description: Time derivative order for each grid function

11  Range  10  x01  Default: (none)

110:*  10

11

11array1dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a line

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11array1dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array1dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array1dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array2dxdxxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxdxxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxdyxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxdzxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array2dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 2D grid arrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11array2dxnpointsxj  10Scope: restrictedx01  INT

11Description: Number of grid points for the 2D grid arrays in the j direction

11  Range  10  x01  Default: (none)

110:*  10

11

11array2dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a 2D grid

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11array2dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array2dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array2dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array3dxdxxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdxxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdxxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdyxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdyxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11array3dxdzxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxdzxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11array3dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D grid arrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11

11array3dxnpointsxj  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D grid arrays in the j direction

11  Range  10  x01  Default: (none)

110:*  10

11

11array3dxnpointsxk  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D grid arrays in the k direction

11  Range  10  x01  Default: (none)

110:*  10

11

11array3dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a 3D grid

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11array3dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array3dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11array3dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11carpetinterp2xinterpolatorxorder 10Scope: restrictedx01  INT

11Description: Order of interpolation for CarpetInterp2

11 Range 10 x01 Default: 2
110:*  10any order supported by CarpetInterp2

11

11interpolatorxcoordinates  10Scope: restrictedx01  STRING

11Description: Coordinate system

11 Range 10 x01 Default: cart3d
11.*  10must be a registered coordinate system

11

11interpolatorxname  10Scope: restrictedx01  STRING

11Description: Name of the interpolator

11 Range 10 x01 Default: Lagrange polynomial interpolation
11.*  10must be a registered interpolator

11

11interpolatorxoptions  10Scope: restrictedx01  STRING

11Description: Options for the interpolator

11 Range 10 x01 Default: order=2
11.*  10must be a valid option specification

11

11narrays1d  10Scope: restrictedx01  INT

11Description: Number of 1D grid arrays

11 Range 10 x01 Default: (none)
110:100  10

11

11narrays2d  10Scope: restrictedx01  INT

11Description: Number of 2D grid arrays

11 Range 10 x01 Default: (none)
110:100  10

11

11narrays3d  10Scope: restrictedx01  INT

11Description: Number of 3D grid arrays

11 Range 10 x01 Default: (none)
110:100  10

11nghosts  10Scope: restrictedx01  INT

11Description: Number of ghost zones

11  Range  10  x01  Default: (none)

110:*  10

11

11nparrays1d  10Scope: restrictedx01  INT

11Description: Number of 1D parallel grid arrays

11 Range 10 x01 Default: (none)
110:100  10

11

11nparrays2d  10Scope: restrictedx01  INT

11Description: Number of 2D parallel grid arrays

11 Range 10 x01 Default: (none)
110:100  10

11

11nparrays3d  10Scope: restrictedx01  INT

11Description: Number of 3D grid parrays

11 Range 10 x01 Default: (none)
110:100  10

11

11nscalars  10Scope: restrictedx01  INT

11Description: Number of grid scalars

11 Range 10 x01 Default: (none)
110:100  10

11

11parray1dxdxxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray1dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray1dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray1dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 1D grid parrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11

11parray1dxspacederivs  10Scope: restrictedx01  INT

11Description: Space derivative orders for each grid function

11  Range  10  x01  Default: (none)

110:*  10

11parray1dxtimederivs  10Scope: restrictedx01  INT

11Description: Time derivative order for each grid function

11  Range  10  x01  Default: (none)

110:*  10

11

11parray1dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a line

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11parray1dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray1dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray1dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray2dxdxxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxdxxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxdyxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxdzxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray2dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 2D parallel grid arrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11parray2dxnpointsxj  10Scope: restrictedx01  INT

11Description: Number of grid points for the 2D parallel grid arrays in the j direction

11  Range  10  x01  Default: (none)

110:*  10

11

11parray2dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a 2D grid

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11parray2dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray2dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray2dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray3dxdxxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdxxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdxxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdyxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdyxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdyxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdzxi  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11parray3dxdzxj  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxdzxk  10Scope: restrictedx01  REAL

11Description: Spacing

11 Range 10 x01 Default: 0.0
110.0:*  10

11

11parray3dxnpointsxi  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D parallel grid arrays in the i direction

11  Range  10  x01  Default: (none)

110:*  10

11

11parray3dxnpointsxj  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D parallel grid arrays in the j direction

11  Range  10  x01  Default: (none)

110:*  10

11

11parray3dxnpointsxk  10Scope: restrictedx01  INT

11Description: Number of grid points for the 3D parallel grid arrays in the k direction

11  Range  10  x01  Default: (none)

110:*  10

11

11parray3dxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a 3D grid

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11parray3dxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray3dxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11parray3dxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11scalarxvars  10Scope: restrictedx01  STRING

11Description: Names of the grid functions that should be interpolated on a point

11 Range 10 x01 Default: (none)
11ˆ$  10do not interpolate
11see [1] below  10grid function name

11

\^[A-Za-z][A-Za-z0-9\_]*[:][:][A-Za-z][A-Za-z0-9\_]*\$

11scalarxx0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11scalarxy0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11scalarxz0  10Scope: restrictedx01  REAL

11Description: Origin

11  Range  10  x01  Default: 0.0

11*:*  10

11

11usexcarpetinterp2  10Scope: restrictedx01  BOOLEAN

11Description: Use InterpGridArrays rather than CCTKxInterpGridArrays

11                          10  x01  Default: no

11

5 Interfaces

General Implements: interptoarray

Grid Variables

5.0.1 PUBLIC GROUPS

11x Group Names x10x Variable Names xx01 Details x11x
11 scalars 10 scalars x01 compact110
11                 10  x01 dimensions110
11                 10  x01 distribution11CONSTANT
11                 10  x01 group type11SCALAR
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11nscalars
11                 10  x01variable type11REAL
11 arrays1d 10 arrays1d x01 compact110
11                 10  x01 dimensions111
11                 10  x01 distribution11CONSTANT
11                 10  x01 group type11ARRAY
11 10 x01 size11ARRAY1DxNPOINTSxI
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11narrays1d
11                 10  x01variable type11REAL
11 arrays2d 10 arrays2d x01 compact110
11                 10  x01 dimensions112
11                 10  x01 distribution11CONSTANT
11                 10  x01 group type11ARRAY
11                 10  x01  size11ARRAY2DxNPOINTSxI
11                 10  x  x01  size11ARRAY2DxNPOINTSxJ
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11narrays2d
11                 10  x01variable type11REAL
11 arrays3d 10 arrays3d x01 compact110
11                 10  x01 dimensions113
11                 10  x01 distribution11CONSTANT
11                 10  x01 group type11ARRAY
11                 10  x01  size11ARRAY3DxNPOINTSxI
11                 10  x  x01  size11ARRAY3DxNPOINTSxJ
11                 10  x01  size11ARRAY3DxNPOINTSxK
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11narrays3d
11                 10  x01variable type11REAL
11 parrays1d 10 parrays1d x01 compact110
11                 10  x01 dimensions111
11                 10  x01 distribution11DEFAULT
11                 10  x01 ghostsize11NGHOSTS
11                 10  x01 group type11ARRAY
11 10 x01 size11PARRAY1DxNPOINTSxI
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11nparrays1d
11                 10  x01variable type11REAL
11 parrays2d 10 parrays2d x01 compact110
11                 10  x01 dimensions112
11                 10  x01 distribution11DEFAULT
11                 10  x01 ghostsize11NGHOSTS
11 10 x x01 ghostsize11NGHOSTS
11                 10  x01 group type11ARRAY
11                 10  x01  size11PARRAY2DxNPOINTSxI
11                 10  x  x01  size11PARRAY2DxNPOINTSxJ
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11nparrays2d
11                 10  x01variable type11REAL

11

11x Group Names x10x Variable Names xx01 Details x11x
11 parrays3d 10 parrays3d x01 compact110
11                 10  x01 dimensions113
11                 10  x01 distribution11DEFAULT
11                 10  x01 ghostsize11NGHOSTS
11 10 x x01 ghostsize11NGHOSTS
11                 10  x01 ghostsize11NGHOSTS
11                 10  x01 group type11ARRAY
11                 10  x01  size11PARRAY3DxNPOINTSxI
11                 10  x  x01  size11PARRAY3DxNPOINTSxJ
11                 10  x01  size11PARRAY3DxNPOINTSxK
11                 10  x01 timelevels111
11                 10  x01vararrayxsize11nparrays3d
11                 10  x01variable type11REAL

6 Schedule This section lists all the variables which are assigned storage by thorn CactusNumerical/InterpToArray. 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

CCTKxANALYSIS x interptoarray x interpolate to grid arrays x

11x11Language:11c
11 x 11Options: 11global
11 x 11Storage: 11scalars
11 x 11x  11arrays1d
11 x 11x  11arrays2d
11 x 11x  11arrays3d
11 x 11x  11parrays1d
11 x 11x  11parrays2d
11 x 11x  11parrays3d
11 x 11Triggers: 11scalars
11 x 11x  11arrays1d
11 x 11x  11arrays2d
11 x 11x  11arrays3d
11 x 11x  11parrays1d
11 x 11x  11parrays2d
11 x 11x  11parrays3d
11 x 11Type: 11function
11 x 11Writes: 11interptoarray::scalars
11 x 11x  11arrays1d
11 x 11x  11arrays2d
11 x 11x  11arrays3d
11 x 11x  11interptoarray::parrays1d
11 x 11x  11parrays2d
11 x 11x  11parrays3d