[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:53 UTC 2009
The following commit has been merged in the upstream branch:
commit a16a0f6da3449d99f7f9873f91179f1dc280ba03
Author: Stephane Popinet <popinet at users.sf.net>
Date: Thu Feb 1 08:27:33 2007 +1100
Merged advection fluxes were not correctly weighted
For solid boundaries with a variable resolution.
darcs-hash:20070131212733-d4795-bf41b1fbaa44e5049b07bcbe366db874dee7814f.gz
diff --git a/src/advection.c b/src/advection.c
index 7dc961d..17dc35e 100644
--- a/src/advection.c
+++ b/src/advection.c
@@ -837,10 +837,11 @@ fprintf (stderr, "%g %g %g\n",
while (i) {
FttCell * cell = i->data;
+ gdouble vol = ftt_cell_volume (cell);
gdouble a = GFS_IS_MIXED (cell) ? GFS_STATE (cell)->solid->a : 1.;
- total_vol += a;
- w += GFS_VARIABLE (cell, par->fv->i);
+ total_vol += vol*a;
+ w += vol*GFS_VARIABLE (cell, par->fv->i);
i = i->next;
}
w /= total_vol;
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list