aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-07-01 14:18:34 +0000
committerjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2002-07-01 14:18:34 +0000
commit51b4ae69948e0624025be006687a9e0dc9c916b6 (patch)
tree9f13afa20edf550a2fd5a06a57fda9b9cc903067 /src
parent6cf791615b7a5a434642822372e2a4d75498e8dc (diff)
fix a bug where the default value for the Jacobian-query parameter-table
entry Jacobian_part_stride (= stride in Jacobian array for real/complex part) wasn't handled: docs have always said this is optional, and defaults to 0 if omitted from the parameter table, but the code treated this as an error --> fix to supply the default value (0) git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@73 df1f8a13-aa1d-4dd4-9681-27ded5b42416
Diffstat (limited to 'src')
-rw-r--r--src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c45
1 files changed, 32 insertions, 13 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
index f4f2631..a137b06 100644
--- a/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
+++ b/src/GeneralizedPolynomial-Uniform/InterpLocalUniform.c
@@ -1137,10 +1137,7 @@ if (status)
N_dims,
Jacobian_info.Jacobian_m_strides,
"Jacobian_m_strides");
- status3 = Util_TableGetInt(param_table_handle,
- & Jacobian_info.Jacobian_part_stride,
- "Jacobian_part_stride");
- if ((status1 < 0) || (status2 != N_dims) || (status3 < 0))
+ if ((status1 < 0) || (status2 != N_dims))
then {
free(operation_codes);
free(operand_indices);
@@ -1150,15 +1147,37 @@ if (status)
CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
__LINE__, __FILE__, CCTK_THORNSTRING,
"\n"
-" 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 ***/
- : (status2 < 0) ? status2 /*** ERROR RETURN ***/
- : status3; /*** ERROR RETURN ***/
+" CCTK_InterpLocalUniform(): bad \"Jacobian_interp_point_stride\" and/or\n"
+" \"Jacobian_m_strides\" table entry/entries!\n"
+" error status1=%d status2=%d"
+,
+ status1, status2);
+ return (status1 < 0) ? status1 : status2; /*** ERROR RETURN ***/
+ }
+
+ status = Util_TableGetInt(param_table_handle,
+ & Jacobian_info.Jacobian_part_stride,
+ "Jacobian_part_stride");
+ if (status == 1)
+ then {
+ /* ok ==> no-op here */
+ }
+ else if (status == UTIL_ERROR_TABLE_NO_SUCH_KEY)
+ then Jacobian_info.Jacobian_part_stride = 0; /* default */
+ else {
+ free(operation_codes);
+ free(operand_indices);
+ free(input_array_offsets);
+ free(Jacobian_info.Jacobian_pointer);
+ free(Jacobian_info.Jacobian_offset);
+ CCTK_VWarn(ERROR_MSG_SEVERITY_LEVEL,
+ __LINE__, __FILE__, CCTK_THORNSTRING,
+"\n"
+" CCTK_InterpLocalUniform(): bad \"Jacobian_part_stride\" table entry!\n"
+" error status=%d"
+,
+ status);
+ return status; /*** ERROR RETURN ***/
}
p_Jacobian_info = & Jacobian_info;