diff options
author | schnetter <> | 2002-01-09 20:14:00 +0000 |
---|---|---|
committer | schnetter <> | 2002-01-09 20:14:00 +0000 |
commit | 89251e522c0570f83ed6c145ed4e860c27d79dc5 (patch) | |
tree | 1860f9e9dcb87f8a6cdda282688b27d95dcd2e99 /CarpetAttic | |
parent | bf64f8c277ebf0d4227ca977b4ea0269f6b214b3 (diff) |
Added a parameter that prevents outputting the ghost zones. Untested.
darcs-hash:20020109201424-07bb3-b447e6ee9cb5c4d024b39f3190e59956d12325f4.gz
Diffstat (limited to 'CarpetAttic')
-rw-r--r-- | CarpetAttic/CarpetIOFlexIO/param.ccl | 12 | ||||
-rw-r--r-- | CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc | 25 |
2 files changed, 34 insertions, 3 deletions
diff --git a/CarpetAttic/CarpetIOFlexIO/param.ccl b/CarpetAttic/CarpetIOFlexIO/param.ccl index e4e5d7004..a8a8ba0cc 100644 --- a/CarpetAttic/CarpetIOFlexIO/param.ccl +++ b/CarpetAttic/CarpetIOFlexIO/param.ccl @@ -1,5 +1,5 @@ # Parameter definitions for thorn CarpetIOFlexIO -# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/param.ccl,v 1.3 2001/12/05 01:06:30 schnetter Exp $ +# $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/param.ccl,v 1.4 2002/01/09 21:14:24 schnetter Exp $ @@ -21,6 +21,16 @@ BOOLEAN verbose "Produce log output" +BOOLEAN out3D_ghosts "Output ghost zones as well" +{ +} "yes" + +BOOLEAN out3D_outer_ghosts "Output outer boundary ghost zones as well" +{ +} "yes" + + + CCTK_STRING outdir3D "Name of 3D FlexIO output directory, overrides outdir" STEERABLE = ALWAYS { .* :: "A regex which matches everything" diff --git a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc index 78b1d2916..859e75c4b 100644 --- a/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc +++ b/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc @@ -32,7 +32,7 @@ #include "ioflexio.hh" -static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.13 2001/12/05 01:06:31 schnetter Exp $"; +static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIO/src/ioflexio.cc,v 1.14 2002/01/09 21:14:25 schnetter Exp $"; @@ -257,7 +257,28 @@ namespace CarpetIOFlexIO { = (*ff) (tl, reflevel, component, mglevel); // Make temporary copy on processor 0 - const bbox<int,dim> ext = data->extent(); + bbox<int,dim> ext = data->extent(); + vect<int,dim> lo = ext.lower(); + vect<int,dim> hi = ext.upper(); + vect<int,dim> str = ext.stride(); + + // Ignore ghost zones if desired + for (int d=0; d<dim; ++d) { + bool output_lower_ghosts + = cgh->cctk_bbox[2*d] ? out3D_outer_ghosts : out3D_ghosts; + bool output_upper_ghosts + = cgh->cctk_bbox[2*d+1] ? out3D_outer_ghosts : out3D_ghosts; + + if (! output_lower_ghosts) { + lo[d] += cgh->cctk_nghostzones[d] * str[d]; + } + if (! output_upper_ghosts) { + hi[d] -= cgh->cctk_nghostzones[d] * str[d]; + } + } + + ext = bbox<int,dim>(lo,hi,str); + generic_data<dim>* const tmp = data->make_typed (); tmp->allocate (ext, 0); tmp->copy_from (data, ext); |