[cig-commits] commit: Minor cleanup

Mercurial hg at geodynamics.org
Sun Apr 24 06:02:23 PDT 2011


changeset:   195:1597fc3e19a6
user:        Walter Landry <wlandry at caltech.edu>
date:        Sat Apr 23 13:49:14 2011 -0700
files:       src/P_Boundary_Refine/refine.C
description:
Minor cleanup


diff -r 38bf397817ca -r 1597fc3e19a6 src/P_Boundary_Refine/refine.C
--- a/src/P_Boundary_Refine/refine.C	Sat Apr 23 00:11:53 2011 -0700
+++ b/src/P_Boundary_Refine/refine.C	Sat Apr 23 13:49:14 2011 -0700
@@ -11,13 +11,13 @@ void SAMRAI::geom::P_Boundary_Refine::re
   const pdat::CellOverlap* t_overlap =
     dynamic_cast<const pdat::CellOverlap *>(&overlap);
   const hier::BoxList& boxes = t_overlap->getDestinationBoxList();
+  const tbox::Dimension& dimension(getDim());
+  const int dim(dimension.getValue());
+
   for (hier::BoxList::Iterator b(boxes); b; b++)
     {
       hier::Box &overlap_box=b();
-
-      const tbox::Dimension& dimension(getDim());
-      TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dimension, fine, coarse, overlap_box, ratio);
-      const int dim(dimension.getValue());
+      TBOX_DIM_ASSERT_CHECK_DIM_ARGS4(dimension,fine,coarse,overlap_box,ratio);
 
       tbox::Pointer<pdat::CellData<double> >
         p = coarse.getPatchData(src_component);
@@ -30,10 +30,8 @@ void SAMRAI::geom::P_Boundary_Refine::re
       TBOX_ASSERT(p->getDepth() == 1);
 #endif
 
-      hier::Box coarse_box=coarse.getBox();
       hier::Box fine_box=fine.getBox();
       hier::Box gbox=p_fine->getGhostBox();
-      hier::Box coarse_gbox=p->getGhostBox();
 
       /* We have to infer where the boundary is from the boxes */
       int boundary_direction;
@@ -60,7 +58,6 @@ void SAMRAI::geom::P_Boundary_Refine::re
           p_min[d]=std::max(overlap_box.lower(d),gbox.lower(d));
           p_max[d]=std::min(overlap_box.upper(d),gbox.upper(d));
         }
-      hier::Box box(p_min,p_max);
 
       hier::Index ip(hier::Index::getZeroIndex(dimension)), jp(ip), kp(ip);
       ip[0]=1;



More information about the CIG-COMMITS mailing list