[SCM] Gerris Flow Solver branch, upstream, updated. e8f73a07832050124d2b8bf6c6f35b33180e65a8
Stephane Popinet
popinet at users.sf.net
Tue Nov 24 12:25:17 UTC 2009
The following commit has been merged in the upstream branch:
commit 83beb12a54b74e518d6fc827e2abdc3cf1a22624
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Oct 13 11:34:58 2009 +1100
Adaptivity takes "minlevel" into account properly
darcs-hash:20091013003458-d4795-cff75f8a8703e6c9bd6a2bb3a27a633d334ea581.gz
diff --git a/src/adaptive.c b/src/adaptive.c
index 5bb81cc..839d592 100644
--- a/src/adaptive.c
+++ b/src/adaptive.c
@@ -1016,14 +1016,16 @@ static void refine_cell_mark (FttCell * cell, AdaptLocalParams * p)
while (i) {
GfsAdapt * a = i->data;
if (a->active) {
+ guint minlevel = gfs_function_value (a->minlevel, cell);
guint maxlevel = gfs_function_value (a->maxlevel, cell);
- if (FTT_CELL_IS_LEAF (cell) && level < maxlevel && (* a->cost) (cell, a) > a->cmax) {
+ if (FTT_CELL_IS_LEAF (cell) &&
+ (level < minlevel ||
+ (level < maxlevel && (* a->cost) (cell, a) > a->cmax))) {
REFINABLE (cell, p) = TRUE;
COARSENABLE (cell, p) = FALSE;
return;
}
- if (level < gfs_function_value (a->minlevel, cell) ||
- (level < maxlevel && (* a->cost) (cell, a) > a->cmax/a->cfactor))
+ if (level < minlevel || (level < maxlevel && (* a->cost) (cell, a) > a->cmax/a->cfactor))
COARSENABLE (cell, p) = FALSE;
}
i = i->next;
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list