diff options
Diffstat (limited to 'src/GeneralizedPolynomial-Uniform/common/store.c')
-rw-r--r-- | src/GeneralizedPolynomial-Uniform/common/store.c | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/common/store.c b/src/GeneralizedPolynomial-Uniform/common/store.c new file mode 100644 index 0000000..d074b34 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/store.c @@ -0,0 +1,166 @@ +/* store.c -- store molecule coefficients in Jacobian */ +/* $Header$ */ + +#include "cctk.h" +#include "../InterpLocalUniform.h" + +#include "structs.h" +#include "store.h" + +/******************************************************************************/ + +/* + * 1-D routines + */ + +#undef COEFF +#define COEFF(mi) Jacobian_ptr[Jacobian_mi_stride*mi] + +void LocalInterp_store_1d_cube2 + (fp factor, const struct coeffs_struct_1d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_1d_cube3 + (fp factor, const struct coeffs_struct_1d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_1d_cube4 + (fp factor, const struct coeffs_struct_1d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_1d_cube5 + (fp factor, const struct coeffs_struct_1d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_1d_cube6 + (fp factor, const struct coeffs_struct_1d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size6/store-coeffs.c" +} + +void LocalInterp_store_1d_cube7 + (fp factor, const struct coeffs_struct_1d_cube_size7 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size7/store-coeffs.c" +} + +/******************************************************************************/ + +/* + * 2-D routines + */ + +#undef COEFF +#define COEFF(mi,mj) Jacobian_ptr[ Jacobian_mi_stride*mi \ + + Jacobian_mj_stride*mj ] + +void LocalInterp_store_2d_cube2 + (fp factor, const struct coeffs_struct_2d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_2d_cube3 + (fp factor, const struct coeffs_struct_2d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_2d_cube4 + (fp factor, const struct coeffs_struct_2d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_2d_cube5 + (fp factor, const struct coeffs_struct_2d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_2d_cube6 + (fp factor, const struct coeffs_struct_2d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size6/store-coeffs.c" +} + +/******************************************************************************/ + +/* + * 3-D routines + */ + +#undef COEFF +#define COEFF(mi,mj,mk) Jacobian_ptr[ Jacobian_mi_stride*mi \ + + Jacobian_mj_stride*mj \ + + Jacobian_mk_stride*mk ] + +void LocalInterp_store_3d_cube2 + (fp factor, const struct coeffs_struct_3d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_3d_cube3 + (fp factor, const struct coeffs_struct_3d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_3d_cube4 + (fp factor, const struct coeffs_struct_3d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_3d_cube5 + (fp factor, const struct coeffs_struct_3d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_3d_cube6 + (fp factor, const struct coeffs_struct_3d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size6/store-coeffs.c" +} |