diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-06-04 19:24:36 -0700 |
---|---|---|
committer | Roland Haas <roland.haas@physics.gatech.edu> | 2012-06-04 19:24:36 -0700 |
commit | 2c626b4e52af42beedc5a0bc78576c6b42447600 (patch) | |
tree | af2ad59a5e395b252a9c7b9a47e49c3c369b73de | |
parent | 233a4e865258af3ade35bab1da69ef5061051c6c (diff) |
Carpet: check ghost size against restrion operator order
if use_higher_order_restriction = yes
-rw-r--r-- | Carpet/Carpet/param.ccl | 6 | ||||
-rw-r--r-- | Carpet/Carpet/src/SetupGH.cc | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl index 0a3644a53..607355807 100644 --- a/Carpet/Carpet/param.ccl +++ b/Carpet/Carpet/param.ccl @@ -20,6 +20,12 @@ shares: IO USES STRING out_dir +shares: CarpetLib + +USES BOOLEAN use_higher_order_restriction +USES INT restriction_order_space + + private: BOOLEAN domain_from_coordbase "Use the domain description from CoordBase" diff --git a/Carpet/Carpet/src/SetupGH.cc b/Carpet/Carpet/src/SetupGH.cc index c43c73ae8..25448abf1 100644 --- a/Carpet/Carpet/src/SetupGH.cc +++ b/Carpet/Carpet/src/SetupGH.cc @@ -2683,11 +2683,19 @@ namespace Carpet { int const min_nghosts = ((prolongation_stencil_size + refinement_factor - 1) / (refinement_factor - 1)); + int const min_nghosts_restrict = + restriction_order_space / 2; if (any (any (ghosts.AT(rl) < i2vect (min_nghosts)))) { CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, "There are not enough ghost zones for the desired spatial prolongation order on map %d, refinement level %d. With a spatial prolongation order of %d, you need at least %d ghost zones.", m, rl, my_prolongation_order_space, min_nghosts); } + if (use_higher_order_restriction and + any (any (ghosts.AT(rl) < i2vect (min_nghosts_restrict)))) { + CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, + "There are not enough ghost zones for the desired restriction order on map %d, refinement level %d. With a restriction order of %d, you need at least %d ghost zones.", + m, rl, restriction_order_space, min_nghosts_restrict); + } } } |