[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:13 UTC 2009
The following commit has been merged in the upstream branch:
commit 1daea20554f483eb34bc53e3c977d67d0375d9a7
Author: Stephane Popinet <popinet at users.sf.net>
Date: Fri May 12 11:35:21 2006 +1000
Coarse cells on the Poisson hierarchy with only one neighbor are "turned off"
these cells could cause poor convergence of the Poisson solver (see the dumbell
test case).
darcs-hash:20060512013521-d4795-61f888c7fdb8f0e9079ef2a29b5429628165aa98.gz
diff --git a/src/poisson.c b/src/poisson.c
index 3725f8b..a55104c 100644
--- a/src/poisson.c
+++ b/src/poisson.c
@@ -372,6 +372,7 @@ static void face_coeff_from_below (FttCell * cell)
{
FttDirection d;
GfsFaceStateVector * f = GFS_STATE (cell)->f;
+ guint neighbors = 0;
for (d = 0; d < FTT_NEIGHBORS; d++) {
FttCellChildren child;
@@ -383,7 +384,14 @@ static void face_coeff_from_below (FttCell * cell)
if (child.c[i])
f[d].v += GFS_STATE (child.c[i])->f[d].v;
f[d].v /= n;
+
+ if (f[d].v > 0. && !GFS_CELL_IS_BOUNDARY (ftt_cell_neighbor (cell, d)))
+ neighbors++;
}
+
+ if (neighbors == 1)
+ for (d = 0; d < FTT_NEIGHBORS; d++)
+ f[d].v = 0.;
}
/**
diff --git a/test/dumbell/dumbell.sh b/test/dumbell/dumbell.sh
index 32bcc64..cd18ef4 100755
--- a/test/dumbell/dumbell.sh
+++ b/test/dumbell/dumbell.sh
@@ -3,7 +3,7 @@
bottom=.255
top=.49
-tac <<EOF | shapes -v - > dumbell.gts
+tac <<EOF | shapes - > dumbell.gts
-0.51 -0.51
-0.51 $bottom
-0.1 $bottom
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list