[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:56 UTC 2009
The following commit has been merged in the upstream branch:
commit fdc6c2de2be954923c8ac5e32ffd73c72c43276a
Author: Stephane Popinet <popinet at users.sf.net>
Date: Wed Feb 7 15:00:23 2007 +1100
Fix for small VOF fragments in vof_fine_coarse()
darcs-hash:20070207040023-d4795-02a682c9575b1b62c0eaec806994aee4033a1ade.gz
diff --git a/src/vof.c b/src/vof.c
index fbe136d..9bb2b52 100644
--- a/src/vof.c
+++ b/src/vof.c
@@ -711,11 +711,13 @@ static void vof_fine_coarse (FttCell * parent, GfsVariable * v)
gdouble n = 0.;
for (c = 0; c < FTT_DIMENSION; c++)
n += fabs ((&m.x)[c]);
- g_assert (n > 0.);
- for (c = 0; c < FTT_DIMENSION; c++) {
- (&m.x)[c] /= n;
+ if (n > 0.)
+ for (c = 0; c < FTT_DIMENSION; c++)
+ (&m.x)[c] /= n;
+ else /* fixme: this is a small fragment */
+ m.x = 1.;
+ for (c = 0; c < FTT_DIMENSION; c++)
GFS_VARIABLE (parent, t->m[c]->i) = (&m.x)[c];
- }
GFS_VARIABLE (parent, t->alpha->i) = gfs_plane_alpha (&m, f);
}
}
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list