[cig-commits] commit: Revert the changes for syncing the sides. It did not work in the case

Mercurial hg at geodynamics.org
Fri Mar 18 20:09:39 PDT 2011


changeset:   10:4e3ac0f6b796
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Fri Mar 18 19:48:26 2011 -0700
files:       source/SAMRAI/pdat/SideGeometry.C
description:
Revert the changes for syncing the sides.  It did not work in the case
where you are coarsening.  For example, suppose, in 1D, the fine box
is (0,10) side centered (so (0,9) cell centered) and the coarse box is
(0,100).  Then when coarsening the results are put in a coarse box
(0,5).  However, if there is a processor boundary at 5, then it will
only coarsen to the (0,5) box, not the (5,100).  When syncing, the
(5,100) box takes precedence, so it never gets the coarsening result.


diff -r 2436fcd9e549 -r 4e3ac0f6b796 source/SAMRAI/pdat/SideGeometry.C
--- a/source/SAMRAI/pdat/SideGeometry.C	Thu Mar 17 12:59:17 2011 -0700
+++ b/source/SAMRAI/pdat/SideGeometry.C	Fri Mar 18 19:48:26 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);
+      hier::Box::grow(src_geometry.d_box, src_geometry.d_ghosts) * src_mask;
    const hier::Box src_shift =
-      hier::Box::shift(src_box * src_mask, src_offset);
+      hier::Box::shift(src_box, src_offset);
    const hier::Box dst_ghost =
       hier::Box::grow(dst_geometry.d_box, dst_geometry.d_ghosts);
 
@@ -172,15 +172,7 @@ 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);
-            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_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 src_side = toSideBox(src_shift, d);
             const hier::Box together = dst_side * src_side;
             if (!together.empty()) {
                dst_boxes[d].unionBoxes(together);



More information about the CIG-COMMITS mailing list