diff options
author | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2000-09-06 10:02:02 +0000 |
---|---|---|
committer | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2000-09-06 10:02:02 +0000 |
commit | dd9c9d870c34614091836f411c909ba33f6830a9 (patch) | |
tree | 67aad5dc2e93403ac012301a58e1ecec716cdeb0 /src/Hyperslab.c | |
parent | 419d9d9a1454d82670320f5162b8f968e1637fd2 (diff) |
Another bugfix for getting the global hyperslab if we have periodic BC.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@34 10716dce-81a3-4424-a2c8-48026a0d3035
Diffstat (limited to 'src/Hyperslab.c')
-rw-r--r-- | src/Hyperslab.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Hyperslab.c b/src/Hyperslab.c index 2870dc5..b2bbce7 100644 --- a/src/Hyperslab.c +++ b/src/Hyperslab.c @@ -370,6 +370,10 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, { hsize_global [hdim]++; } + if (GA->connectivity->perme [vdim]) + { + hsize_global [hdim] -= 2 * GA->extras->nghostzones [vdim]; + } hsize [hdim] = (endpoint [vdim] - startpoint [vdim]) / downsample [vdim]; if ((endpoint [vdim] - startpoint [vdim]) % downsample [vdim]) { @@ -401,7 +405,9 @@ int Hyperslab_GetLocalHyperslab (cGH *GH, int vindex, int vtimelvl, hoffset_global [hdim] = (my_global_startpoint [vdim] - global_startpoint [vdim]) / downsample [vdim]; if (GA->connectivity->perme [vdim]) + { hoffset_global [hdim] -= GA->extras->nghostzones [vdim]; + } #ifdef DEBUG printf ("hoffset_global, hsize in direction %d: %d, %d\n", hdim, hoffset_global [hdim], hsize [hdim]); |