aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <>2002-10-14 18:40:00 +0000
committerschnetter <>2002-10-14 18:40:00 +0000
commit6c9081e9835315674a243ecd4de35e4ea6401d89 (patch)
treeab47b331961f581ab80a4878b6a93370ddabb227
parent996f39983c4aa7dbbecf805c91be8839dfc29abe (diff)
Do not add ghost zones at outer boundaries.
darcs-hash:20021014184038-07bb3-8863372324acbcaa3b92125474b01ce1401ed6e4.gz
-rw-r--r--Carpet/CarpetLib/src/dh.cc13
-rw-r--r--Carpet/CarpetLib/src/dh.hh7
2 files changed, 17 insertions, 3 deletions
diff --git a/Carpet/CarpetLib/src/dh.cc b/Carpet/CarpetLib/src/dh.cc
index 807125a90..a77187e14 100644
--- a/Carpet/CarpetLib/src/dh.cc
+++ b/Carpet/CarpetLib/src/dh.cc
@@ -6,7 +6,7 @@
copyright : (C) 2000 by Erik Schnetter
email : schnetter@astro.psu.edu
- $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.20 2002/08/30 16:03:20 schnetter Exp $
+ $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.21 2002/10/14 20:40:38 schnetter Exp $
***************************************************************************/
@@ -80,7 +80,12 @@ void dh<D>::recompose () {
// (the content of the exterior is completely determined by
// the interior of this or other components; the content of
// the exterior is redundant)
- boxes[rl][c][ml].exterior = intr.expand(lghosts, ughosts);
+ ivect ldist(lghosts), udist(ughosts);
+ for (int d=0; d<D; ++d) {
+ if (h.outer_boundaries[rl][c][d][0]) ldist[d] = 0;
+ if (h.outer_boundaries[rl][c][d][1]) udist[d] = 0;
+ }
+ boxes[rl][c][ml].exterior = intr.expand(ldist, udist);
// Boundaries (ghost zones only)
// (interior + boundaries = exterior)
@@ -252,6 +257,10 @@ void dh<D>::recompose () {
}
}
+ // Check that no boundaries are left over
+ if (rl==0) assert (sync_not.empty());
+ assert (recv_not.empty());
+
} // for ml
} // for c
} // for rl
diff --git a/Carpet/CarpetLib/src/dh.hh b/Carpet/CarpetLib/src/dh.hh
index 00e9035a7..0c9884d88 100644
--- a/Carpet/CarpetLib/src/dh.hh
+++ b/Carpet/CarpetLib/src/dh.hh
@@ -6,7 +6,7 @@
copyright : (C) 2000 by Erik Schnetter
email : schnetter@astro.psu.edu
- $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.hh,v 1.10 2002/05/05 22:17:01 schnetter Exp $
+ $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.hh,v 1.11 2002/10/14 20:40:39 schnetter Exp $
***************************************************************************/
@@ -57,6 +57,11 @@ class dh: public dimgeneric_dh {
typedef vector<iblist> iblistvect; // vector of lists
public:
+
+ // in here, the term "boundary" means both ghost zones and
+ // refinement boundaries, but does not refer to outer (physical)
+ // boundaries.
+
struct dboxes {
ibbox exterior; // whole region (including boundaries)