[cig-commits] commit: make GradientDetector work in 3d.

Mercurial hg at geodynamics.org
Thu Jun 7 13:35:42 PDT 2012


changeset:   260:ed9d6a2a5c34
user:        Sylvain Barbot <sbarbot at caltech.edu>
date:        Mon Apr 16 10:58:14 2012 -0700
files:       src/FACStokes/applyGradientDetector.C
description:
make GradientDetector work in 3d.


diff -r 970b2637b218 -r ed9d6a2a5c34 src/FACStokes/applyGradientDetector.C
--- a/src/FACStokes/applyGradientDetector.C	Wed Apr 11 15:13:42 2012 -0700
+++ b/src/FACStokes/applyGradientDetector.C	Mon Apr 16 10:58:14 2012 -0700
@@ -59,8 +59,16 @@ void SAMRAI::FACStokes::applyGradientDet
 	  {
             const pdat::SideIndex x(cell_index,ix,pdat::SideIndex::Lower);
 	    for (int d=0; d<d_dim.getValue(); ++d){
-              const hier::Index ip(1,0), jp(0,1);
-              const hier::Index pp[]={ip,jp};
+		    hier::Index ip(d_dim,0),
+			        jp(d_dim,0),
+			        kp(d_dim,0);
+		    ip(0)=1;
+		    jp(1)=1;
+		    if (3==d_dim.getValue())
+		    {
+			kp(2)=1;
+		    }
+              const hier::Index pp[]={ip,jp,kp};
 
               if(cell_index[ix]==patch.getBox().lower(ix)
                  && geom->getTouchesRegularBoundary(ix,0))



More information about the CIG-COMMITS mailing list