[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:40 UTC 2009
The following commit has been merged in the upstream branch:
commit 9118f4cd8c830dabccac22835c2729b0cea52bd7
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Aug 15 19:02:12 2006 +1000
Volume fraction weighting of surface tension term
darcs-hash:20060815090212-d4795-a3b34b3faa3f267173f61a68549f3847d192bf9b.gz
diff --git a/src/poisson.c b/src/poisson.c
index 7fc8672..ec68496 100644
--- a/src/poisson.c
+++ b/src/poisson.c
@@ -458,17 +458,24 @@ static void tension_coeff (FttCellFace * face, gpointer * data)
gdouble c2 = GFS_VARIABLE (face->neighbor, t->c->i);
gdouble w1 = GFS_IS_FULL (c1) ? 0. : c1*(1. - c1);
gdouble w2 = GFS_IS_FULL (c2) ? 0. : c2*(1. - c2);
-
- if (w1 + w2 > 0.) {
- GfsVariable * alpha = data[2];
-
+#if 1
+#if 1
+ if (w1 + w2 > 0.)
v *= (w1*GFS_VARIABLE (face->cell, t->k->i) +
w2*GFS_VARIABLE (face->neighbor, t->k->i))/(w1 + w2);
- if (alpha)
- v *= gfs_face_interpolated_value (face, alpha->i);
- }
else
- v = 0.;
+#endif
+ v *= (GFS_VARIABLE (face->cell, t->k->i) +
+ GFS_VARIABLE (face->neighbor, t->k->i))/2.;
+#else
+ if (w1 > 0. && w2 > 0.)
+ v *= (GFS_VARIABLE (face->cell, t->k->i) +
+ GFS_VARIABLE (face->neighbor, t->k->i))/2.;
+ else if (w1 > 0.)
+ v *= GFS_VARIABLE (face->cell, t->k->i);
+ else if (w2 > 0.)
+ v *= GFS_VARIABLE (face->neighbor, t->k->i);
+#endif
if (alpha)
v *= gfs_face_interpolated_value (face, alpha->i);
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list