[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:22 UTC 2009
The following commit has been merged in the upstream branch:
commit d2053b3e0c1f672fa776537f5e42576301d70032
Author: Stephane Popinet <popinet at users.sf.net>
Date: Fri Jun 6 20:42:04 2008 +1000
Fix for inconsistent treatment of maxlevel adaptive parameter
This patch should ensure that cells are never more refined than maxlevel.
darcs-hash:20080606104204-d4795-1e3a4d2177e7bdebb0acb84760c7e933c3fed6a2.gz
diff --git a/src/adaptive.c b/src/adaptive.c
index fb189a0..cd3518c 100644
--- a/src/adaptive.c
+++ b/src/adaptive.c
@@ -928,14 +928,14 @@ static void refine_cell_mark (FttCell * cell, AdaptLocalParams * p)
while (i) {
GfsAdapt * a = i->data;
if (a->active) {
- if (level < gfs_function_value (a->maxlevel, cell) &&
- (* a->cost) (cell, a) > a->cmax) {
+ guint maxlevel = gfs_function_value (a->maxlevel, cell);
+ if (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) ||
- (* a->cost) (cell, a) > a->cmax/a->cfactor)
+ (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