aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/Carpet/param.ccl6
-rw-r--r--Carpet/Carpet/src/SetupGH.cc8
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);
+ }
}
}