diff options
Diffstat (limited to 'src/gr/gr.hh')
-rw-r--r-- | src/gr/gr.hh | 49 |
1 files changed, 38 insertions, 11 deletions
diff --git a/src/gr/gr.hh b/src/gr/gr.hh index 3014cd7..58275f5 100644 --- a/src/gr/gr.hh +++ b/src/gr/gr.hh @@ -42,9 +42,9 @@ struct cactus_grid_info cGH *GH; // --> Cactus grid hierarchy // this describes the semantics of the Cactus gij gridfns: - // true ==> the Cactus gij are conformal values as per + // true ==> the Cactus g_ij are conformal values as per // CactusEinstein/StaticConformal and the psi gridfn - // false ==> the Cactus gij are the physical metric + // false ==> the Cactus g_ij are the physical metric bool Cactus_conformal_metric; // @@ -136,6 +136,40 @@ struct Jacobian_info fp perturbation_amplitude; }; +// +// This struct holds information on what to do if various error/warning +// conditions occur. +// +struct error_info + { + // at present, we "handle" all these errors/warnings by CCTK_VWarn(); + // these parameters give the warning levels for various conditions: + + // point outside (or too close to boundary of) Cactus grid, + // i.e. geometry interpolator returns CCTK_ERROR_INTERP_POINT_OUTSIDE + // ... warning level if error occurs on first Newton iteration, + // i.e. when evaluating expansion/Jacobian for initial guess + int warn_level__point_outside__initial; + // ... warning level if error occurs on a subsequent Newton iteration + int warn_level__point_outside__subsequent; + + // the Cactus configure process didn't find a finite() function, + // so we're skipping the "check that the geometry is finite" tests + // even though the user set check_that_geometry_is_finite = "true" + int warn_level__skipping_finite_check; + + // infinity or NaN in interpolated {g_ij, partial_k g_ij, K_ij} + int warn_level__nonfinite_geometry; + + // interpolated g_ij isn't positive definite + // (usually this means we're too close to a singularity) + // ... warning level if error occurs on first Newton iteration, + // i.e. when evaluating expansion/Jacobian for initial guess + int warn_level__gij_not_positive_definite__initial; + // ... warning level if error occurs on a subsequent Newton iteration + int warn_level__gij_not_positive_definite__subsequent; + }; + //****************************************************************************** // @@ -148,18 +182,10 @@ struct Jacobian_info // ... returns false for failure (eg horizon outside grid); // if (print_msg_flag) then also reports CCTK_VWarn() at the // appropriate warning level -namespace expansion_warning_levels - { - enum { - failure = 2, // point outside grid etc - nonfinite = 2, // nonfinite gridfn detected - skip_nonfinite = 3 // no finite() function available - // ==> skipping nonfinite check - }; - } bool expansion(patch_system* ps_ptr, const struct cactus_grid_info& cgi, const struct geometry_info& gi, + const struct error_info& error_info, bool initial_flag, bool Jacobian_flag = false, bool print_msg_flag = false, jtutil::norm<fp>* H_norms_ptr = NULL); @@ -173,6 +199,7 @@ bool expansion_Jacobian(patch_system* ps_ptr, const struct cactus_grid_info& cgi, const struct geometry_info& gi, const struct Jacobian_info& Jacobian_info, + const struct error_info& error_info, bool initial_flag, bool print_msg_flag = false); // Schwarzschild_EF.cc |