[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:39 UTC 2009
The following commit has been merged in the upstream branch:
commit af663b525064dfe1906bf65f59e7d836e95b59af
Author: Stephane Popinet <popinet at users.sf.net>
Date: Sun Aug 10 16:29:44 2008 +1000
Computation of maximum interface curvature is more robust
darcs-hash:20080810062944-d4795-c048d872bfd9b1e5098df66d0ac89a42056e2daf.gz
diff --git a/src/vof.c b/src/vof.c
index b3b45f2..ff38920 100644
--- a/src/vof.c
+++ b/src/vof.c
@@ -1844,8 +1844,9 @@ static gboolean curvature_along_direction (FttCell * cell,
/* Gaussian curvature */
gdouble kg = (hxx*hyy - hxy*hxy)/(size*size*dnm*dnm);
gdouble a = km*km - kg;
- g_assert (a >= 0.);
- *kmax = fabs (km) + sqrt (a);
+ *kmax = fabs (km);
+ if (a >= 0.)
+ *kmax += sqrt (a);
}
}
#endif /* 3D */
@@ -2034,8 +2035,9 @@ static gdouble parabola_fit_curvature (ParabolaFit * p, gdouble kappamax,
if (kmax) {
gdouble kg = (hxx*hyy - hxy*hxy)/(dnm*dnm);
gdouble a = kappa*kappa/4. - kg;
- g_assert (a >= 0.);
- *kmax = fabs (kappa/2.) + sqrt (a);
+ *kmax = fabs (kappa/2.);
+ if (a >= 0.)
+ *kmax += sqrt (a);
}
#endif /* 3D */
if (fabs (kappa) > kappamax) {
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list