diff options
author | jthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2002-02-27 14:28:36 +0000 |
---|---|---|
committer | jthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2002-02-27 14:28:36 +0000 |
commit | 717d39a68230908f36b7098e66d0dd76dd067148 (patch) | |
tree | 397cda867657459ef518b65cd87def3517958253 /src/UniformCartesian/Startup.c | |
parent | ac713b27a07fa17689464ac2e9e7275169f116ea (diff) |
initial checkin of new LocalInterp thorn
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@2 df1f8a13-aa1d-4dd4-9681-27ded5b42416
Diffstat (limited to 'src/UniformCartesian/Startup.c')
-rw-r--r-- | src/UniformCartesian/Startup.c | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/src/UniformCartesian/Startup.c b/src/UniformCartesian/Startup.c new file mode 100644 index 0000000..b25dc9f --- /dev/null +++ b/src/UniformCartesian/Startup.c @@ -0,0 +1,185 @@ +/*@@ + @file Startup.c + @date Sun Jul 04 1999 + @author Thomas Radke + @desc + Startup routines for LocalInterp/UniformCartesian + @enddesc + + @history + @date 22 Jan 2002 + @author Jonathan Thornburg + @hdesc Move all local-interpolation code from LocalInterp to here + @endhistory + + @version $Header$ + @@*/ + +#include <stdlib.h> + +#include "cctk.h" +#include "cctk_Interp.h" +#include "Interpolate.h" + +/* the rcs ID and its dummy function to use it */ +static const char *rcsid = "$Header$"; +CCTK_FILEVERSION(CactusBase_LocalInterp_UniformCartesian_Startup_c) + + +/* prototypes of externally-visible routines defined in this source file */ +void LocalInterp_UC_Startup(void); + +/* prototypes of static routines defined in this source file */ +static int LocalInterp_InterpLocal_1stOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]); +static int LocalInterp_InterpLocal_2ndOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]); +static int LocalInterp_InterpLocal_3rdOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]); + +/******************************************************************************/ + +/*@@ + @routine LocalInterp_InterpLocal_NthOrder + @date Wed 14 Feb 2001 + @author Thomas Radke + @desc + Wrappers for the different interpolation operators + registered for first/second/third order interpolation. + These wrappers just call the common interpolation routine + passing all arguments plus the interpolation order. + @enddesc + + @returntype int + @returndesc + the return code of the common interpolation routine + @endreturndesc + @@*/ +static int LocalInterp_InterpLocal_1stOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]) +{ + return (LocalInterp_InterpLocal (GH, 1, num_points, num_dims, + num_in_arrays, num_out_arrays, + coord_dims, coord_arrays, coord_array_types, + interp_coord_arrays, interp_coord_array_types, + in_arrays, in_array_types, + out_arrays, out_array_types)); +} + + +static int LocalInterp_InterpLocal_2ndOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]) +{ + return (LocalInterp_InterpLocal (GH, 2, num_points, num_dims, + num_in_arrays, num_out_arrays, + coord_dims, coord_arrays, coord_array_types, + interp_coord_arrays, interp_coord_array_types, + in_arrays, in_array_types, + out_arrays, out_array_types)); +} + + +static int LocalInterp_InterpLocal_3rdOrder(cGH *GH, + int num_points, + int num_dims, + int num_in_arrays, + int num_out_arrays, + const int coord_dims[], + const void *const coord_arrays[], + const int coord_array_types[], + const void *const interp_coord_arrays[], + const int interp_coord_array_types[], + const void *const in_arrays[], + const int in_array_types[], + void *const out_arrays[], + const int out_array_types[]) +{ + return (LocalInterp_InterpLocal (GH, 3, num_points, num_dims, + num_in_arrays, num_out_arrays, + coord_dims, coord_arrays, coord_array_types, + interp_coord_arrays, interp_coord_array_types, + in_arrays, in_array_types, + out_arrays, out_array_types)); +} + +/******************************************************************************/ + +/*@@ + @routine LocalInterp_Startup + @date Sun Jul 04 1999 + @author Thomas Radke + @desc + The startup registration routine for LocalInterp. + Registers the interpolation operators with the flesh. + @enddesc + @calls CCTK_InterpRegisterOperatorLocal + @@*/ +void LocalInterp_UC_Startup(void) +{ + CCTK_InterpRegisterOperatorLocal (LocalInterp_InterpLocal_1stOrder, + "first-order uniform cartesian"); + CCTK_InterpRegisterOperatorLocal (LocalInterp_InterpLocal_2ndOrder, + "second-order uniform cartesian"); + CCTK_InterpRegisterOperatorLocal (LocalInterp_InterpLocal_3rdOrder, + "third-order uniform cartesian"); +} |