[cig-commits] commit: More tweaks to make side-based variables sync correctly.

Mercurial hg at geodynamics.org
Thu Mar 17 13:01:22 PDT 2011


changeset:   9:2436fcd9e549
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Thu Mar 17 12:59:17 2011 -0700
files:       source/SAMRAI/pdat/SideGeometry.C
description:
More tweaks to make side-based variables sync correctly.


diff -r 3308aba02946 -r 2436fcd9e549 source/SAMRAI/pdat/SideGeometry.C
--- a/source/SAMRAI/pdat/SideGeometry.C	Mon Mar 14 13:42:16 2011 -0700
+++ b/source/SAMRAI/pdat/SideGeometry.C	Thu Mar 17 12:59:17 2011 -0700
@@ -153,9 +153,9 @@ tbox::Pointer<hier::BoxOverlap> SideGeom
    // Perform a quick-and-dirty intersection to see if the boxes might overlap
 
    const hier::Box src_box =
-      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
+     hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts);
    const hier::Box src_shift =
-      hier::Box::shift(src_box, src_offset);
+      hier::Box::shift(src_box * src_mask, src_offset);
    const hier::Box dst_ghost =
       hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
 
@@ -177,7 +177,9 @@ tbox::Pointer<hier::BoxOverlap> SideGeom
                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))
+            if(src_box.lower(d)<=dst_side.lower(d)
+               && src_box.upper(d)<=dst_side.lower(d)+1
+               && src_shift.lower(d)==src_shift.upper(d))
               src_side.upper(d)-=1;
             const hier::Box together = dst_side * src_side;
             if (!together.empty()) {



More information about the CIG-COMMITS mailing list