aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Haas <roland.haas@physics.gatech.edu>2012-08-02 08:57:44 -0700
committerRoland Haas <roland.haas@physics.gatech.edu>2012-08-02 08:57:44 -0700
commitdd757d86966ecc9716bf13d837c909476f630934 (patch)
treef249a85a6594a027f2b22937897b297c2243c243
parent1f5808f84cc12dea546153a02379815243ba7c4f (diff)
Carpet: change defaults of periodic_[xyz] to "yes" to match PUGH
If any of the periodicity parameter are set to "yes" in a parameter file or checkpoint, Carpet will still abort.
-rw-r--r--Carpet/Carpet/param.ccl8
-rw-r--r--Carpet/Carpet/src/CarpetParamCheck.cc10
2 files changed, 10 insertions, 8 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl
index 607355807..e8d24f7e9 100644
--- a/Carpet/Carpet/param.ccl
+++ b/Carpet/Carpet/param.ccl
@@ -92,21 +92,23 @@ STRING ghost_sizes "Number of ghost zones for each refinement level"
restricted:
+# Carpet ignores all periodic* parameters and aborts in ParamCheck if any is
+# changed to "yes"
BOOLEAN periodic "do not use this parameter"
{
} "no"
BOOLEAN periodic_x "do not use this parameter"
{
-} "no"
+} "yes"
BOOLEAN periodic_y "do not use this parameter"
{
-} "no"
+} "yes"
BOOLEAN periodic_z "do not use this parameter"
{
-} "no"
+} "yes"
diff --git a/Carpet/Carpet/src/CarpetParamCheck.cc b/Carpet/Carpet/src/CarpetParamCheck.cc
index cf3d861ed..c02ab02b0 100644
--- a/Carpet/Carpet/src/CarpetParamCheck.cc
+++ b/Carpet/Carpet/src/CarpetParamCheck.cc
@@ -23,11 +23,11 @@ namespace Carpet {
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- if (CCTK_ParameterQueryTimesSet ("periodic", "Carpet")
- or CCTK_ParameterQueryTimesSet ("periodic_x", "Carpet")
- or CCTK_ParameterQueryTimesSet ("periodic_y", "Carpet")
- or CCTK_ParameterQueryTimesSet ("periodic_z", "Carpet")) {
- CCTK_PARAMWARN ("Some of the parameters \"Carpet::periodic*\" have been set. These parameters are there for compatibility reasons only and must not be used.");
+ if ((CCTK_ParameterQueryTimesSet ("periodic", "Carpet") and periodic)
+ or (CCTK_ParameterQueryTimesSet ("periodic_x", "Carpet") and periodic_x)
+ or (CCTK_ParameterQueryTimesSet ("periodic_y", "Carpet") and periodic_y)
+ or (CCTK_ParameterQueryTimesSet ("periodic_z", "Carpet") and periodic_z)) {
+ CCTK_PARAMWARN ("Some of the parameters \"Carpet::periodic*\" have been set to \"yes\". These parameters are there for compatibility reasons only and must not be used.");
}
if (adaptive_stepsize and max_refinement_levels > 1) {