[cig-commits] commit: Pass center_dist as a double, not an int. Fix the sign of the comparison for corners.
Mercurial
hg at geodynamics.org
Thu Mar 29 11:54:48 PDT 2012
changeset: 133:550bf5907a58
user: Walter Landry <wlandry at caltech.edu>
date: Thu Mar 29 11:48:01 2012 -0700
files: Interface.hxx
description:
Pass center_dist as a double, not an int. Fix the sign of the comparison for corners.
diff -r a51337341828 -r 550bf5907a58 Interface.hxx
--- a/Interface.hxx Thu Mar 29 11:46:52 2012 -0700
+++ b/Interface.hxx Thu Mar 29 11:48:01 2012 -0700
@@ -28,7 +28,7 @@ public:
}
template <int ny> void compute_xy(const int &i, const int &j,
- const int ¢er_dist,
+ const double ¢er_dist,
const double dist[][ny])
{
intersect_sides[0]=(sign(dist[i][j])!=sign(dist[i+1][j])
@@ -41,7 +41,7 @@ public:
for(int n0=0;n0<2;++n0)
for(int n1=0;n1<2;++n1)
{
- intersect_corner[n0][n1]=(center==sign(dist[i+n0][j+n1]));
+ intersect_corner[n0][n1]=(center!=sign(dist[i+n0][j+n1]));
if(intersect_corner[n0][n1])
{
double delta(center_dist-dist[i+n0][j+n1]);
More information about the CIG-COMMITS
mailing list