[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:54:32 UTC 2009
The following commit has been merged in the upstream branch:
commit 8cffd196c0a406e7077d990826b1e897d52e8318
Author: Stephane Popinet <popinet at users.sf.net>
Date: Sun Aug 19 10:19:48 2007 +1000
VariableFiltered was not taking the number of iterations into account
darcs-hash:20070819001948-d4795-c4a789f649b0dc92c35f342417c02b387126b6c9.gz
diff --git a/src/variable.c b/src/variable.c
index f000551..28663a2 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -362,7 +362,11 @@ static void variable_filtered_read (GtsObject ** o, GtsFile * fp)
return;
}
v->niter = atoi (fp->token->str);
- gts_file_next_token (fp);
+ if (v->niter == 0) {
+ gts_file_error (fp, "niter must be strictly positive");
+ return;
+ }
+ gts_file_next_token (fp);
if (GFS_VARIABLE1 (v)->description)
g_free (GFS_VARIABLE1 (v)->description);
@@ -380,8 +384,9 @@ static void variable_filtered_event_half (GfsEvent * event, GfsSimulation * sim)
{
guint n = GFS_VARIABLE_FILTERED (event)->niter;
- while (n--)
- gfs_domain_filter (GFS_DOMAIN (sim), GFS_VARIABLE_FILTERED (event)->v, GFS_VARIABLE1 (event));
+ gfs_domain_filter (GFS_DOMAIN (sim), GFS_VARIABLE_FILTERED (event)->v, GFS_VARIABLE1 (event));
+ while (--n)
+ gfs_domain_filter (GFS_DOMAIN (sim), GFS_VARIABLE1 (event), NULL);
}
static gboolean variable_filtered_event (GfsEvent * event, GfsSimulation * sim)
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list