aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-05-31 17:38:54 +0000
committerjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-05-31 17:38:54 +0000
commit45bae10912dddd6637783e4f4e9777f0865723c6 (patch)
treedd7392b3fcf323ec8b85b29a2430fe9115fa6c25 /src
parentdec5ac51bc6343698282a1460652cde52d36e66f (diff)
* fix a bug in Jacobian querying where the code read (roughly)
status = ... if (status == ...) { ... } else if (status2 == ...) /* should be status, not status2 */ { ... } else ... * change wording in error messages to refer to CCTK_InterpLocalUniform(), not InterpLocalUniform() git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@59 df1f8a13-aa1d-4dd4-9681-27ded5b42416
Diffstat (limited to 'src')
-rw-r--r--src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c152
1 files changed, 81 insertions, 71 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
index db804cb..0d18e17 100644
--- a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
+++ b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
@@ -359,7 +359,7 @@ CCTK_FILEVERSION(CactusBase_LocalInterp_src_GeneralizedPolynomialUniform_InterpL
+ part*Jacobian_part_stride]
where
offset = Jacobian_offset[out]
- or is 0 if input_array_offsets is absent
+ or is 0 if Jacobian_offset[] is absent
pt = the point number
(stride_i,stride_j,stride_k) = Jacobian_m_strides[]
part = 0 for real values,
@@ -466,8 +466,8 @@ if (N_dims > MAX_N_DIMS)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): implementation restriction: N_dims=%d\n"
-" but we only support N_dims <= MAX_N_DIMS=%d!",
+" CCTK_InterpLocalUniform(): implementation restriction: N_dims=%d\n"
+" but we only support N_dims <= MAX_N_DIMS=%d!",
N_dims,
MAX_N_DIMS);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
@@ -488,9 +488,10 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad or missing table entry for \"order\" parameter!\n"
-" (order is a mandatory parameter)\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad or missing table entry\n"
+" for \"order\" parameter!\n"
+" (this is a mandatory parameter)\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -499,8 +500,8 @@ if ((order < 1) || (order > MAX_ORDER))
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): implementation restriction: order=%d\n"
-" but we only support 1 <= order <= MAX_ORDER=%d!",
+" CCTK_InterpLocalUniform(): implementation restriction: order=%d\n"
+" but we only support 1 <= order <= MAX_ORDER=%d!",
order,
MAX_ORDER);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
@@ -536,8 +537,8 @@ else if (status == N_dims)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): invalid out_of_range_tolerance[axis=%d] = %g!\n"
-" (valid values are -1.0 or >= 0.0)",
+" CCTK_InterpLocalUniform(): invalid out_of_range_tolerance[axis=%d] = %g!\n"
+" (valid values are -1.0 or >= 0.0)",
axis, out_of_range_tolerance[axis]);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
}
@@ -547,9 +548,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry\n"
-" for \"out_of_range_tolerance\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"out_of_range_tolerance\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -584,9 +585,9 @@ else if (status == 0)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): error setting default molecule family\n"
-" in parameter table!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): error setting default molecule family\n"
+" in parameter table!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -608,8 +609,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry for \"molecule_family\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"molecule_family\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -628,8 +630,8 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry for \"smoothing\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry for \"smoothing\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -661,9 +663,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry\n"
-" for \"input_array_offsets\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"input_array_offsets\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -686,8 +688,8 @@ if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): can't default \"input_array_strides\"\n"
-" with input_array_dims == NULL!");
+" CCTK_InterpLocalUniform(): can't default \"input_array_strides\"\n"
+" with input_array_dims == NULL!");
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
}
{
@@ -707,9 +709,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry\n"
-" for \"input_array_offsets\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"input_array_offsets\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -734,9 +736,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry\n"
-" for \"input_array_min_subscripts\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"input_array_min_subscripts\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -754,8 +756,8 @@ if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): can't default \"input_array_max_subscripts\"\n"
-" with input_array_dims == NULL!");
+" CCTK_InterpLocalUniform(): can't default \"input_array_max_subscripts\"\n"
+" with input_array_dims == NULL!");
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
}
{
@@ -773,9 +775,9 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry\n"
-" for \"input_array_max_subscripts\" parameter!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"input_array_max_subscripts\" parameter!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -807,8 +809,8 @@ if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): can't default \"operand_indices\"\n"
-" with N_input_arrays=%d != N_output_arrays=%d!"
+" CCTK_InterpLocalUniform(): can't default \"operand_indices\"\n"
+" with N_input_arrays=%d != N_output_arrays=%d!"
,
N_input_arrays, N_output_arrays);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
@@ -835,9 +837,9 @@ else if (status == N_output_arrays)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): operand_indices[out=%d]=%d specifies\n"
-" nonexistent input array!\n"
-" (valid range is 0 <= value < N_input_arrays=%d)"
+" CCTK_InterpLocalUniform(): operand_indices[out=%d]=%d specifies\n"
+" nonexistent input array!\n"
+" (valid range is 0 <= value < N_input_arrays=%d)"
,
out, operand_indices[out],
N_input_arrays);
@@ -851,7 +853,8 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry for \"operand_indices\" parameter!\n"
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"operand_indices\" parameter!\n"
" error status=%d",
status);
return status; /*** ERROR RETURN ***/
@@ -883,8 +886,9 @@ if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
free(input_array_offsets);
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
-"InterpLocalUniform(): can't default \"operation_codes\"\n"
-" with N_input_arrays=%d != N_output_arrays=%d!"
+"\n"
+" CCTK_InterpLocalUniform(): can't default \"operation_codes\"\n"
+" with N_input_arrays=%d != N_output_arrays=%d!"
,
N_input_arrays, N_output_arrays);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
@@ -900,7 +904,8 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad table entry for \"operation_codes\" parameter!\n"
+" CCTK_InterpLocalUniform(): bad table entry\n"
+" for \"operation_codes\" parameter!\n"
" error status=%d",
status);
return status; /*** ERROR RETURN ***/
@@ -927,9 +932,9 @@ if ((status1 < 0) || (status2 < 0))
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"interp_molecule_{min,max}_m\"\n"
-" table entry/entries!\n"
-" error status1=%d status2=%d"
+" CCTK_InterpLocalUniform(): bad \"interp_molecule_{min,max}_m\"\n"
+" table entry/entries!\n"
+" error status1=%d status2=%d"
,
status1, status2);
return (status1 < 0) ? status1 : status2; /*** ERROR RETURN ***/
@@ -970,8 +975,8 @@ else {
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"molecule_positions\" table entry!\n"
-" error status=%d",
+" CCTK_InterpLocalUniform(): bad \"molecule_positions\" table entry!\n"
+" error status=%d",
status);
return status; /*** ERROR RETURN ***/
}
@@ -1000,8 +1005,9 @@ if (status < 0)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"Jacobian_pointer\" table entry!\n"
-" error status=%d"
+" CCTK_InterpLocalUniform(): bad \"Jacobian_pointer\" table entry!\n"
+" (preliminary check)\n"
+" error status=%d"
,
status);
return status; /*** ERROR RETURN ***/
@@ -1055,8 +1061,8 @@ if (status)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"Jacobian_pointer\" table entry!\n"
-" error status=%d"
+" CCTK_InterpLocalUniform(): bad \"Jacobian_pointer\" table entry!\n"
+" error status=%d"
,
status);
return status; /*** ERROR RETURN ***/
@@ -1081,7 +1087,7 @@ if (status)
then {
/* ok ==> no-op here */
}
- else if (status2 == UTIL_ERROR_TABLE_NO_SUCH_KEY)
+ else if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
then {
/* default offset = all 0 */
LocalInterp_zero_int_array(N_output_arrays,
@@ -1096,8 +1102,8 @@ if (status)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"Jacobian_offset\" table entry!\n"
-" error status=%d"
+" CCTK_InterpLocalUniform(): bad \"Jacobian_offset\" table entry!\n"
+" error status=%d"
,
status);
return status; /*** ERROR RETURN ***/
@@ -1123,10 +1129,10 @@ if (status)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): bad \"Jacobian_interp_point_stride and/or\n"
-" \"Jacobian_m_strides\" and/or\n"
-" \"Jacobian_part_stride\" table entry/entries!\n"
-" error status1=%d status2=%d status3=%d"
+" CCTK_InterpLocalUniform(): bad \"Jacobian_interp_point_stride and/or\n"
+" \"Jacobian_m_strides\" and/or\n"
+" \"Jacobian_part_stride\" table entry/entries!\n"
+" error status1=%d status2=%d status3=%d"
,
status1, status2, status3);
return (status1 < 0) ? status1 /*** ERROR RETURN ***/
@@ -1244,9 +1250,10 @@ if (p_interp_fn == NULL_INTERP_FN_PTR)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): interpolation not implemented\n"
-" for the combination\n"
-" N_dims=%d, molecule_family=\"%s\", order=%d, smoothing=%d",
+" CCTK_InterpLocalUniform(): interpolation not implemented\n"
+" for the combination N_dims=%d,\n"
+" molecule_family=\"%s\",\n"
+" order=%d, smoothing=%d",
N_dims, molecule_family_string, order, smoothing);
return UTIL_ERROR_BAD_INPUT; /*** ERROR RETURN ***/
}
@@ -1307,8 +1314,8 @@ if (return_code == CCTK_ERROR_INTERP_POINT_X_RANGE)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): error setting out-of-range table entry/entries!"
-" error status1=%d status2=%d status3=%d",
+" CCTK_InterpLocalUniform(): error setting out-of-range table entry/entries!"
+ " error status1=%d status2=%d status3=%d",
status1, status2, status3);
return (status1 < 0) ? status1 /*** ERROR RETURN ***/
: (status2 < 0) ? status2 /*** ERROR RETURN ***/
@@ -1349,8 +1356,11 @@ if ((status1 < 0) || (status2 < 0) || (status3 < 0) || (status4 < 0))
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): error setting Jacobian structure table entry/entries!"
-" error status1=%d status2=%d status3=%d status4=%d",
+" CCTK_InterpLocalUniform(): error setting Jacobian structure\n"
+" table entry/entries!"
+" error status1=%d status2=%d\n"
+" status3=%d status4=%d"
+ ,
status1, status2, status3, status4);
return (status1 < 0) ? status1 /*** ERROR RETURN ***/
: (status2 < 0) ? status2 /*** ERROR RETURN ***/
@@ -1391,9 +1401,9 @@ if (p_molecule_min_max_m_info != NULL)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" InterpLocalUniform(): error setting\n"
-" \"molecule_{min,max}_m\" table entry/entries!"
-" error status1=%d status2=%d",
+" CCTK_InterpLocalUniform(): error setting\n"
+" \"molecule_{min,max}_m\" table entry/entries!"
+" error status1=%d status2=%d",
status1, status2);
return (status1 < 0) ? status1 : status2; /*** ERROR RETURN ***/
}