diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-02-27 00:13:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-02-27 00:13:00 +0000 |
commit | 0ee6c90978887fc05d52d5c3c4848bad038f7b49 (patch) | |
tree | 4bd8643ff88cee59a0b8a2daa3aa8197aa25644c /Carpet/CarpetLib | |
parent | 4e65066c6ca1d1d1db232651439196097acbd9b3 (diff) |
CarpetLib: Handle empty domains correctly
Allow a processor's domain to be empty. This needs special treatment,
because such a domain must not have ghost zones added to it.
darcs-hash:20060227001303-dae7b-e0c0f4d2455add31f0b1f7d1366e0090d31c9fff.gz
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r-- | Carpet/CarpetLib/src/dh.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/dh.cc b/Carpet/CarpetLib/src/dh.cc index 3cca4137f..57628ef14 100644 --- a/Carpet/CarpetLib/src/dh.cc +++ b/Carpet/CarpetLib/src/dh.cc @@ -110,17 +110,21 @@ void dh::allocate_bboxes () if (h.outer_boundaries().at(rl).at(c)[d][f]) { dist[f][d] = 0; } else { + bool const is_empty = intr.lower()[d] > intr.upper()[d]; + if (is_empty) { + dist[f][d] = 0; + } // Check whether the boundary in this direction is // covered by other interiors vect<ivect,2> dist1(0,0); - dist1[f][d] = dist[f][d]; + dist1[f][d] = is_empty ? 0 : dist[f][d]; ibset bnd = intr.expand(dist1[0], dist1[1]) - intr; for (int cc=0; cc<h.components(rl); ++cc) { bnd -= h.extents().at(ml).at(rl).at(cc); } bool const is_interproc = bnd.empty(); boxes.at(ml).at(rl).at(c).is_interproc[d][f] = is_interproc; - if (! is_interproc) { + if (! is_empty and ! is_interproc) { dist[f][d] += buffers[f][d]; } } |