[cig-commits] commit: Make set_boundary set pressure boundaries on Neumann velocity boundaries correctly
Mercurial
hg at geodynamics.org
Wed Apr 27 01:15:04 PDT 2011
changeset: 217:457cd2684b09
tag: tip
user: Walter Landry <wlandry at caltech.edu>
date: Wed Apr 27 01:13:50 2011 -0700
files: src/set_boundary.C
description:
Make set_boundary set pressure boundaries on Neumann velocity boundaries correctly
diff -r ed6c6530d07a -r 457cd2684b09 src/set_boundary.C
--- a/src/set_boundary.C Wed Apr 27 01:12:49 2011 -0700
+++ b/src/set_boundary.C Wed Apr 27 01:13:50 2011 -0700
@@ -63,7 +63,9 @@ void set_boundary(const SAMRAI::hier::Pa
pp[ix][ix]=1;
if(!lower_dirichlet[ix])
{
- p(center)=-p(center+pp[ix]) + 2*p_lower[ix];
+ p(center)=-p(center+pp[ix]);
+ if(rhs)
+ p(center)+=2*p_lower[ix];
}
else
dirichlet_boundary=true;
@@ -74,7 +76,9 @@ void set_boundary(const SAMRAI::hier::Pa
pp[ix][ix]=-1;
if(!upper_dirichlet[ix])
{
- p(center)=-p(center+pp[ix]) + 2*p_upper[ix];
+ p(center)=-p(center+pp[ix]);
+ if(rhs)
+ p(center)+=2*p_upper[ix];
}
else
dirichlet_boundary=true;
More information about the CIG-COMMITS
mailing list