[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:08 UTC 2009
The following commit has been merged in the upstream branch:
commit a693db9c944ea1b0fa1790e03e19a9b957803c8e
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Mar 14 14:02:42 2006 +1100
Merged cells can be formed using children cells at coarse/fine interfaces
darcs-hash:20060314030242-d4795-cede6d7e11c8daf38e402c00213b23a82f6c6ee8.gz
diff --git a/src/advection.c b/src/advection.c
index e73a0f0..e906d07 100644
--- a/src/advection.c
+++ b/src/advection.c
@@ -610,18 +610,39 @@ static void set_merged (FttCell * cell)
ftt_cell_neighbors (cell, &neighbor);
for (i = 0; i < FTT_NEIGHBORS && abest < 1.; i++)
if (neighbor.c[i] && !GFS_CELL_IS_BOUNDARY (neighbor.c[i]) && solid->s[i] > 0.) {
- if (GFS_IS_MIXED (neighbor.c[i])) {
- gdouble a = GFS_STATE (neighbor.c[i])->solid->a;
-
- if (a > abest) {
- abest = a;
+ if (FTT_CELL_IS_LEAF (neighbor.c[i])) {
+ if (GFS_IS_MIXED (neighbor.c[i])) {
+ gdouble a = GFS_STATE (neighbor.c[i])->solid->a;
+
+ if (a > abest) {
+ abest = a;
+ solid->merged = neighbor.c[i];
+ }
+ }
+ else {
solid->merged = neighbor.c[i];
+ return;
}
}
else {
- g_assert (FTT_CELL_IS_LEAF (neighbor.c[i]));
- solid->merged = neighbor.c[i];
- return;
+ FttCellChildren child;
+ guint j, n = ftt_cell_children_direction (neighbor.c[i], FTT_OPPOSITE_DIRECTION (i), &child);
+
+ for (j = 0; j < n; j++)
+ if (child.c[j]) {
+ if (GFS_IS_MIXED (child.c[j])) {
+ gdouble a = GFS_STATE (child.c[j])->solid->a;
+
+ if (a > abest) {
+ abest = a;
+ solid->merged = child.c[j];
+ }
+ }
+ else {
+ solid->merged = child.c[j];
+ return;
+ }
+ }
}
}
if (abest == 0.)
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list