[cig-commits] commit: Use coarsen() instead of divide by 2

Mercurial hg at geodynamics.org
Fri Feb 25 14:16:27 PST 2011


changeset:   79:aaf51ce594f3
user:        Walter Landry <wlandry at caltech.edu>
date:        Wed Feb 09 10:50:12 2011 -0800
files:       P_Refine.C
description:
Use coarsen() instead of divide by 2


diff -r 2ab32fdb1026 -r aaf51ce594f3 P_Refine.C
--- a/P_Refine.C	Wed Feb 09 10:37:34 2011 -0800
+++ b/P_Refine.C	Wed Feb 09 10:50:12 2011 -0800
@@ -84,7 +84,7 @@ void SAMRAI::geom::P_Refine::refine(
          ip[1]=0;
          jp[0]=0;
          jp[1]=1;
-         pdat::CellIndex center(fine/2);
+         pdat::CellIndex center(hier::Index::coarsen(fine,hier::Index(2,2)));
          double dp_dx,dp_dy;
 
          /* Pressure is cell-centered, so prolongation is a



More information about the CIG-COMMITS mailing list