aboutsummaryrefslogtreecommitdiff
path: root/src/GeneralizedPolynomial-Uniform/template.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/GeneralizedPolynomial-Uniform/template.c')
-rw-r--r--src/GeneralizedPolynomial-Uniform/template.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/template.c b/src/GeneralizedPolynomial-Uniform/template.c
index 3cb2c38..5cb934b 100644
--- a/src/GeneralizedPolynomial-Uniform/template.c
+++ b/src/GeneralizedPolynomial-Uniform/template.c
@@ -421,6 +421,17 @@ int FUNCTION_NAME(/***** coordinate system *****/
#error "N_DIMS may not be > 3!"
#endif
+/* layout of axes and min/max ends in out_of_range_tolerance[] array */
+#define X_AXIS_MIN 0
+#define X_AXIS_MAX 1
+#define Y_AXIS_MIN 2
+#define Y_AXIS_MAX 3
+#define Z_AXIS_MIN 4
+#define Z_AXIS_MAX 5
+#if (N_DIMS > 3)
+ #error "N_DIMS may not be > 3!"
+#endif
+
/* basic sanity check on molecule size */
#define MOLECULE_M_COUNT (MOLECULE_MAX_M - MOLECULE_MIN_M + 1)
#if (MOLECULE_SIZE != MOLECULE_M_COUNT)
@@ -740,8 +751,9 @@ int pt;
= LocalInterp_molecule_posn(origin_x, delta_x,
input_array_min_subscripts[X_AXIS],
input_array_max_subscripts[X_AXIS],
- out_of_range_tolerance[X_AXIS],
MOLECULE_SIZE,
+ out_of_range_tolerance[X_AXIS_MIN],
+ out_of_range_tolerance[X_AXIS_MAX],
interp_coords_fp[X_AXIS],
&x_temp,
(int *) NULL, (int *) NULL);
@@ -753,8 +765,9 @@ int pt;
= LocalInterp_molecule_posn(origin_y, delta_y,
input_array_min_subscripts[Y_AXIS],
input_array_max_subscripts[Y_AXIS],
- out_of_range_tolerance[Y_AXIS],
MOLECULE_SIZE,
+ out_of_range_tolerance[Y_AXIS_MIN],
+ out_of_range_tolerance[Y_AXIS_MAX],
interp_coords_fp[Y_AXIS],
&y_temp,
(int *) NULL, (int *) NULL);
@@ -766,8 +779,9 @@ int pt;
= LocalInterp_molecule_posn(origin_z, delta_z,
input_array_min_subscripts[Z_AXIS],
input_array_max_subscripts[Z_AXIS],
- out_of_range_tolerance[Z_AXIS],
MOLECULE_SIZE,
+ out_of_range_tolerance[Z_AXIS_MIN],
+ out_of_range_tolerance[Z_AXIS_MAX],
interp_coords_fp[Z_AXIS],
&z_temp,
(int *) NULL, (int *) NULL);