diff options
Diffstat (limited to 'src/InterpLocalUniform.c')
-rw-r--r-- | src/InterpLocalUniform.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/InterpLocalUniform.c b/src/InterpLocalUniform.c index 9e7653e..96a2cb7 100644 --- a/src/InterpLocalUniform.c +++ b/src/InterpLocalUniform.c @@ -63,9 +63,6 @@ #include "Lagrange-maximum-degree/all_prototypes.h" #include "Hermite/all_prototypes.h" -#undef AEILOCALINTERP_DEBUG /* define this for verbose debugging output */ -#undef AEILOCALINTERP_DEBUG2 /* define this for even more verbose debugging output */ - /* the rcs ID and its dummy function to use it */ static const char* rcsid = "$Header$"; CCTK_FILEVERSION(AEITHorns_AEILocalInterp_src_InterpLocalUniform_c) @@ -1118,6 +1115,14 @@ if (N_dims > MAX_N_DIMS) * get the parameters from the parameter table, filling in defaults as needed */ +CCTK_INT debug; +status = get_and_check_INT(param_table_handle, "debug", + false, 0, /* optional parameter defaulting to 0 */ + false, 0, 0, NULL, + &debug); +if (status != 0) + then return status; /*** ERROR RETURN ***/ + { CCTK_INT order; status = get_and_check_INT(param_table_handle, "order", @@ -1540,10 +1545,11 @@ if (p_interp_fn == NULL_INTERP_FN_PTR) } /* call the subfunction to actually do the interpolation */ -#ifdef AEILOCALINTERP_DEBUG -printf("AEILocalInterp::InterpLocalUniform.c: calling interpolator fn (N_interp_points=%d)\n", N_interp_points); -fflush(stdout); -#endif +if (debug > 0) + then { + printf("AEILocalInterp::InterpLocalUniform.c: calling interpolator fn (N_interp_points=%d)\n", N_interp_points); + fflush(stdout); + } { struct molecule_structure_flags molecule_structure_flags; const int return_code @@ -1561,15 +1567,17 @@ const int return_code N_output_arrays, output_array_type_codes, output_arrays, operand_indices, operation_codes, + debug, &error_info, &molecule_structure_flags, p_molecule_min_max_m_info, p_molecule_positions, p_Jacobian_info); -#ifdef AEILOCALINTERP_DEBUG -printf("AEILocalInterp::InterpLocalUniform.c: back from interpolator fn with return_code=%d\n", return_code); -fflush(stdout); -#endif +if (debug > 0) + then { + printf("AEILocalInterp::InterpLocalUniform.c: back from interpolator fn with return_code=%d\n", return_code); + fflush(stdout); + } /******************************************************************************/ @@ -1645,10 +1653,11 @@ if (p_Jacobian_info != NULL) free(Jacobian_info.Jacobian_pointer); } -#ifdef AEILOCALINTERP_DEBUG -printf("AEILocalInterp::InterpLocalUniform.c: returning %d\n", return_code); -fflush(stdout); -#endif +if (debug > 0) + then { + printf("AEILocalInterp::InterpLocalUniform.c: returning %d\n", return_code); + fflush(stdout); + } return return_code; /*** NORMAL RETURN ***/ } } |