aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorschnetter <>2003-07-17 10:24:00 +0000
committerschnetter <>2003-07-17 10:24:00 +0000
commitbac6d0d7c1da09b5764f67fcec05483bfc5efe24 (patch)
treef6835fd86049e69d8667a4e1b5ff9c2939c98148 /Carpet
parent854607faa6d46e42db3d6ac1eec9d9197fb4f127 (diff)
Don't put a buffer zone at outer boundaries of refined grids.
darcs-hash:20030717102405-07bb3-14d73938a57d6ba625cbd2a90bad5ca3905472f5.gz
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/dh.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/dh.cc b/Carpet/CarpetLib/src/dh.cc
index b140d68b4..4f800d5a4 100644
--- a/Carpet/CarpetLib/src/dh.cc
+++ b/Carpet/CarpetLib/src/dh.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.37 2003/07/16 21:45:58 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.38 2003/07/17 12:24:05 schnetter Exp $
#include <assert.h>
@@ -261,13 +261,14 @@ void dh<D>::recompose (const int initialise_upto) {
#if 0
// (the restriction must not fill points that are used
// to prolongate the boundaries)
+ const int pss = prolongation_stencil_size();
ibset recvs = intrf.contracted_for(intr) & intr;
for (int ccc=0; ccc<h.components(rl); ++ccc) {
const iblist& sendlist
= boxes[rl][ccc][ml].send_ref_bnd_fine[cc];
for (typename iblist::const_iterator sli = sendlist.begin();
sli != sendlist.end(); ++sli) {
- recvs -= *sli;
+ recvs -= (*sli).expand(pss+1,pss+1);
}
}
recvs.normalize();
@@ -281,8 +282,15 @@ void dh<D>::recompose (const int initialise_upto) {
boxes[rl ][c ][ml].recv_ref_fine [cc].push_back(recv);
}
#else
- const ivect buf (buffer_width);
- const ibbox recv = (intrf.contracted_for(intr).expand(-buf,-buf)
+ ivect buf[2];
+ for (int d=0; d<D; ++d) {
+ for (int f=0; f<2; ++f) {
+ buf[f][d] = (h.outer_boundaries[rl+1][c][d][f]
+ ? 0 : buffer_width);
+ }
+ }
+ const ibbox recv = (intrf.contracted_for(intr)
+ .expand(-buf[0], -buf[1])
& intr);
const ibbox send = recv.expanded_for(intrf);
assert (send.empty() == recv.empty());