[cig-commits] commit: Make side-based variables sync correctly

Mercurial hg at geodynamics.org
Mon Mar 14 13:45:41 PDT 2011


changeset:   8:3308aba02946
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Mon Mar 14 13:42:16 2011 -0700
files:       source/SAMRAI/pdat/SideGeometry.C
description:
Make side-based variables sync correctly


diff -r 58e35e9c1fa8 -r 3308aba02946 source/SAMRAI/pdat/SideGeometry.C
--- a/source/SAMRAI/pdat/SideGeometry.C	Mon Mar 14 12:05:14 2011 -0700
+++ b/source/SAMRAI/pdat/SideGeometry.C	Mon Mar 14 13:42:16 2011 -0700
@@ -172,7 +172,13 @@ tbox::Pointer<hier::BoxOverlap> SideGeom
       for (int d = 0; d < dim.getValue(); d++) {
          if (dirs(d)) {
             const hier::Box dst_side = toSideBox(dst_ghost, d);
-            const hier::Box src_side = toSideBox(src_shift, d);
+            hier::Box src_side = toSideBox(src_shift, d);
+            /* Modify src_side.lower so that grids that are on the
+               left/bottom of do not try to update the side on the
+               boundary between the two grids. This way both grids
+               know that the upper grid "owns" that point. */ 
+            if(src_side.lower(d)<=dst_side.lower(d))
+              src_side.upper(d)-=1;
             const hier::Box together = dst_side * src_side;
             if (!together.empty()) {
                dst_boxes[d].unionBoxes(together);



More information about the CIG-COMMITS mailing list