From dd757d86966ecc9716bf13d837c909476f630934 Mon Sep 17 00:00:00 2001 From: Roland Haas Date: Thu, 2 Aug 2012 08:57:44 -0700 Subject: 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. --- Carpet/Carpet/param.ccl | 8 +++++--- Carpet/Carpet/src/CarpetParamCheck.cc | 10 +++++----- 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) { -- cgit v1.2.3