[cig-commits] commit: Remove an unused variable and add some comments.
Mercurial
hg at geodynamics.org
Fri Apr 6 10:29:02 PDT 2012
changeset: 149:32f74f34089c
user: Walter Landry <wlandry at caltech.edu>
date: Fri Apr 06 10:20:15 2012 -0700
files: compute_coefficients/Interface.hxx
description:
Remove an unused variable and add some comments.
diff -r dd823a902bdc -r 32f74f34089c compute_coefficients/Interface.hxx
--- a/compute_coefficients/Interface.hxx Mon Apr 02 20:06:55 2012 -0700
+++ b/compute_coefficients/Interface.hxx Fri Apr 06 10:20:15 2012 -0700
@@ -11,7 +11,6 @@ public:
public:
FTensor::Tensor1<double,2> grid_pos, pos[2], corner_pos[2][2],
anticorner_pos[2];
- int corner_dir;
bool intersect_dd[2], intersect_sides[2], intersect_corner[2][2],
intersect_anticorner[2][2];
bool intersect_dp;
@@ -31,6 +30,9 @@ public:
const double ¢er_dist,
const double dist[][ny])
{
+ /* This has to be consistent with the checks for the second
+ derivatives. Otherwise, the stencil weights may get too large
+ for off-center points */
intersect_sides[0]=(sign(dist[i][j])!=sign(dist[i+1][j])
&& sign(dist[i][j+1])!=sign(dist[i+1][j+1])
&& sign(dist[i][j])==sign(dist[i][j+1]));
@@ -50,6 +52,12 @@ public:
tangent(0)=-norm(1);
tangent(1)=norm(0);
+ /* Use the intersection with the element boundary, not
+ the straight line from the center of the element to
+ the corner element. This may cause problems when the
+ interface just barely skims the element. We did it
+ this way because then the weighting of the stencil
+ always sums to zero. May want to change this. */
/* TODO: this assumes straight boundaries */
if(std::fabs(tangent(0))>std::fabs(tangent(1)))
{
More information about the CIG-COMMITS
mailing list