[cig-commits] commit: Make it apply correct conditions on the coarse/fine boundaries.
Mercurial
hg at geodynamics.org
Fri Feb 25 14:16:36 PST 2011
changeset: 82:88d5f062757c
user: Walter Landry <wlandry at caltech.edu>
date: Wed Feb 09 11:29:46 2011 -0800
files: StokesFACOps/Update_V.C
description:
Make it apply correct conditions on the coarse/fine boundaries.
diff -r ce96d956e908 -r 88d5f062757c StokesFACOps/Update_V.C
--- a/StokesFACOps/Update_V.C Wed Feb 09 11:15:03 2011 -0800
+++ b/StokesFACOps/Update_V.C Wed Feb 09 11:29:46 2011 -0800
@@ -88,12 +88,12 @@ void SAMRAI::solv::StokesFACOps::Update_
bool set_boundary(false);
if(center[axis]==pbox.lower(axis)+1)
{
- offset[axis]=-1;
+ offset[axis]=-2;
set_boundary=true;
}
- else if(center[axis]==pbox.upper(axis)-1)
+ else if(center[axis]==pbox.upper(axis))
{
- offset[axis]=1;
+ offset[axis]=2;
set_boundary=true;
}
@@ -101,11 +101,11 @@ void SAMRAI::solv::StokesFACOps::Update_
if(set_boundary)
{
dv=(*v)(pdat::SideIndex
- (center-offset,
+ (center+offset,
axis,
pdat::SideIndex::Lower))
- (*v)(pdat::SideIndex
- (center+offset,axis,
+ (center,axis,
pdat::SideIndex::Lower));
}
@@ -150,30 +150,9 @@ void SAMRAI::solv::StokesFACOps::Update_
<< (*v_rhs)(pdat::SideIndex(center,
axis,
pdat::SideIndex::Lower))
- << " ";
-
- // tbox::plog << "Update "
- // << axis << " "
- // << off_axis << " "
- // << j << " "
- // << center[axis] << " "
- // << pbox.lower(axis) << " "
- // << pbox.upper(axis) << " "
- // << pbox.lower(off_axis) << " "
- // << pbox.upper(off_axis) << " "
- // << (*v_rhs)(pdat::SideIndex(center,
- // axis,
- // pdat::SideIndex::Lower)) << " "
- // << right[0] << " "
- // << right[1] << " "
- // << (*v)(pdat::SideIndex
- // (right,
- // axis,
- // pdat::SideIndex::Lower)) << " "
- // << delta_Rx << " "
- // << (theta_momentum/C_vx) << " "
- // << "\n";
-
+ << " "
+ << std::boolalpha
+ << set_boundary << " ";
/* No scaling here, though there should be. */
maxres=std::max(maxres,delta_Rx);
@@ -186,12 +165,12 @@ void SAMRAI::solv::StokesFACOps::Update_
derivative is zero. */
if(set_boundary)
{
- (*v)(pdat::SideIndex
- (center+offset,axis,
- pdat::SideIndex::Lower))=
- (*v)(pdat::SideIndex(center-offset,axis,
- pdat::SideIndex::Lower))
- -dv;
+ (*v)(pdat::SideIndex(center+offset,axis,
+ pdat::SideIndex::Lower))=
+ (*v)(pdat::SideIndex(center,axis,pdat::SideIndex::Lower)) + dv;
+ tbox::plog << offset(0) << " "
+ << offset(1) << " "
+ << dv << " ";
}
}
}
More information about the CIG-COMMITS
mailing list