diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-05-02 14:16:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-05-02 14:16:00 +0000 |
commit | b888dec4354d948a5f506e55cd8a78f01b41d106 (patch) | |
tree | 934473e650349707bff1f87140392cd253bac2bc /Carpet | |
parent | a002c0f8655ff1a8fb7c692fe89418c7fde22ae5 (diff) |
Carpet: Allow fewer or more buffer zones to be specified
Introduce a parameter Carpet::additional_buffer_zones, which allows
using more or fewer buffer zones than there would be when calculated
from the ghost zones.
darcs-hash:20070502141602-dae7b-c7209f710a3186aee6dfea8700312d04562b0928.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/Carpet/param.ccl | 5 | ||||
-rw-r--r-- | Carpet/Carpet/src/SetupGH.cc | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl index bac42eb3b..a27fd6909 100644 --- a/Carpet/Carpet/param.ccl +++ b/Carpet/Carpet/param.ccl @@ -181,6 +181,11 @@ BOOLEAN use_buffer_zones "Use buffer zones" { } "no" +CCTK_INT additional_buffer_zones "Additional buffer zones" +{ + *:* :: "" +} 0 + BOOLEAN use_tapered_grids "Use tapered grids, avoiding time interpolation during evolution" { } "no" diff --git a/Carpet/Carpet/src/SetupGH.cc b/Carpet/Carpet/src/SetupGH.cc index 13a6f3ba0..74267f3e7 100644 --- a/Carpet/Carpet/src/SetupGH.cc +++ b/Carpet/Carpet/src/SetupGH.cc @@ -479,7 +479,11 @@ namespace Carpet { int const buffer_factor = use_buffer_zones ? num_integrator_substeps : 1; int const taper_factor = use_tapered_grids ? refinement_factor : 1; - i2vect const buffers = (taper_factor * buffer_factor - 1) * ghosts; + assert (all (all (buffer_factor * ghosts + additional_buffer_zones >= 0))); + i2vect const buffers = + taper_factor * (buffer_factor * ghosts + additional_buffer_zones) - + ghosts; + assert (all (all (buffers >= 0))); vdd.resize(maps); vdd.at(m) = new dh (* vhh.at(m), |