diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/InterpGridArrays.c | 123 | ||||
-rw-r--r-- | src/pughInterpGH.h | 19 |
2 files changed, 142 insertions, 0 deletions
diff --git a/src/InterpGridArrays.c b/src/InterpGridArrays.c index e97712d..b9873f7 100644 --- a/src/InterpGridArrays.c +++ b/src/InterpGridArrays.c @@ -185,6 +185,129 @@ int PUGHInterp_InterpGridArrays (const cGH *GH, const CCTK_INT output_array_types[], void *const output_arrays[]) { + if (CCTK_IsFunctionAliased ("SymmetryInterpolate")) { + return SymmetryInterpolate + (GH, N_dims, + local_interp_handle, param_table_handle, coord_system_handle, + N_points, interp_coords_type, interp_coords, + N_input_arrays, input_array_indices, + N_output_arrays, output_array_types, output_arrays); + } else { + return PUGHInterp_DriverInterpolate + (GH, N_dims, + local_interp_handle, param_table_handle, coord_system_handle, + N_points, interp_coords_type, interp_coords, + N_input_arrays, input_array_indices, + N_output_arrays, output_array_types, output_arrays); + } +} + + + + +/*@@ + @routine PUGHInterp_DriverInterpolate + @date 2004-05-28 + @author Erik Schnetter + @desc + PUGHInterp's interpolation routine for distributed grid arrays. + This routine provides the aliased function DriverInterpolate. + @enddesc + + @var GH + @vdesc pointer to CCTK grid hierarchy + @vtype CCTK_POINTER_TO_CONST + @vio in + @endvar + @var N_dims + @vdesc number of dimensions for the interpolation + @vtype CCTK_INT + @vio in + @endvar + @var local_interp_handle + @vdesc handle which specifies the local interpolator to use + @vtype CCTK_INT + @vio in + @endvar + @var param_table_handle + @vdesc parameter table handle for passing optional parameters to the + interpolator routine + @vtype CCTK_INT + @vio in + @endvar + @var coord_system_handle + @vdesc handle for the underlying coordinate system + @vtype CCTK_INT + @vio in + @endvar + @var N_points + @vdesc number of points to interpolate at + @vtype CCTK_INT + @vio in + @endvar + @var interp_coords_type + @vdesc CCTK datatype of the coordinate arrays as passed via + <interp_coords> (common datatype for all arrays) + @vtype CCTK_INT + @vio in + @endvar + @var interp_coords + @vdesc list of <N_dims> arrays with coordinate for <N_points> + points to interpolate at + @vtype const CCTK_POINTER_TO_CONST [] + @vio in + @endvar + @var N_input_arrays + @vdesc number of input arrays + @vtype CCTK_INT + @vio in + @endvar + @var input_array_indices + @vdesc list of <N_input_arrays> grid variables (given by their indices) + to interpolate + @vtype const CCTK_INT [] + @vio in + @endvar + @var N_output_arrays + @vdesc number of output arrays + @vtype CCTK_INT + @vio in + @endvar + @var out_array_types + @vdesc list of <N_output_arrays> requested CCTK datatypes for the + output arrays + @vtype const CCTK_INT [] + @vio in + @endvar + @var output_arrays + @vdesc list of <N_output_arrays> output arrays (given by their pointers) + which receive the interpolation results + @vtype const CCTK_POINTER [] + @vio out + @endvar + + @returntype CCTK_INT + @returndesc + 0 - successful interpolation + -1 - in case of any errors + @endreturndesc +@@*/ +CCTK_INT +PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, + CCTK_INT const N_dims, + CCTK_INT const local_interp_handle, + CCTK_INT const param_table_handle, + CCTK_INT const coord_system_handle, + CCTK_INT const N_points, + CCTK_INT const interp_coords_type, + CCTK_POINTER_TO_CONST const interp_coords [], + CCTK_INT const N_input_arrays, + CCTK_INT const input_array_indices [], + CCTK_INT const N_output_arrays, + CCTK_INT const output_array_types [], + CCTK_POINTER const output_arrays []) +{ + cGH const * restrict const GH = GH_; int i, suppress_warnings, retval; CCTK_REAL *origin_local, *delta; CCTK_INT *input_array_dims, *input_array_types, *input_array_time_levels; diff --git a/src/pughInterpGH.h b/src/pughInterpGH.h index 871cf22..4e94a18 100644 --- a/src/pughInterpGH.h +++ b/src/pughInterpGH.h @@ -47,6 +47,25 @@ int PUGHInterp_InterpGridArrays (const cGH *GH, const CCTK_INT output_array_types[], void *const output_arrays[]); + +/* prototype of PUGHInterp's routine which provides the aliased + function DriverInterpolate */ +CCTK_INT +PUGHInterp_DriverInterpolate (CCTK_POINTER_TO_CONST const GH_, + CCTK_INT const N_dims, + CCTK_INT const local_interp_handle, + CCTK_INT const param_table_handle, + CCTK_INT const coord_system_handle, + CCTK_INT const N_points, + CCTK_INT const interp_coords_type, + CCTK_POINTER_TO_CONST const interp_coords [], + CCTK_INT const N_input_arrays, + CCTK_INT const input_array_indices [], + CCTK_INT const N_output_arrays, + CCTK_INT const output_array_types [], + CCTK_POINTER const output_arrays []); + + #ifdef __cplusplus } // extern "C" #endif |