diff options
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetTracker/param.ccl | 5 | ||||
-rw-r--r-- | Carpet/CarpetTracker/src/SetPositions.cc | 32 |
2 files changed, 28 insertions, 9 deletions
diff --git a/Carpet/CarpetTracker/param.ccl b/Carpet/CarpetTracker/param.ccl index 532e81801..22c48c3a5 100644 --- a/Carpet/CarpetTracker/param.ccl +++ b/Carpet/CarpetTracker/param.ccl @@ -2,6 +2,11 @@ +BOOLEAN verbose "Tell what is going on" +{ +} no + + CCTK_INT surface[3] "Spherical surface index which is the source for the location of the refine regions" STEERABLE=always { -1 :: "disabled" diff --git a/Carpet/CarpetTracker/src/SetPositions.cc b/Carpet/CarpetTracker/src/SetPositions.cc index 1eddbecc2..74df6b15e 100644 --- a/Carpet/CarpetTracker/src/SetPositions.cc +++ b/Carpet/CarpetTracker/src/SetPositions.cc @@ -48,15 +48,29 @@ using namespace std; if (sn >= 0) { assert (sn >= 0 and sn < nsurfaces); - CCTK_VInfo (CCTK_THORNSTRING, - "Setting position of refined region #%d from surface #%d to (%g,%g,%g)", - n + 1, sn, - static_cast <double> (sf_origin_x[sn]), - static_cast <double> (sf_origin_y[sn]), - static_cast <double> (sf_origin_z[sn])); - SetParameter ("x", n, sf_origin_x[sn]); - SetParameter ("y", n, sf_origin_y[sn]); - SetParameter ("z", n, sf_origin_z[sn]); + if (sf_valid[sn] > 0) { + + if (verbose) { + CCTK_VInfo (CCTK_THORNSTRING, + "Setting position of refined region #%d from surface #%d to (%g,%g,%g)", + n + 1, sn, + static_cast <double> (sf_origin_x[sn]), + static_cast <double> (sf_origin_y[sn]), + static_cast <double> (sf_origin_z[sn])); + } + SetParameter ("x", n, sf_origin_x[sn]); + SetParameter ("y", n, sf_origin_y[sn]); + SetParameter ("z", n, sf_origin_z[sn]); + + } else { + + if (verbose) { + CCTK_VInfo (CCTK_THORNSTRING, + "No position information available for refined region #%d from surface #%d", + n + 1, sn); + } + + } } // if } // for |