[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:57 UTC 2009
The following commit has been merged in the upstream branch:
commit ec88600fd662ba34d5bfb8e21340c03a0b3d6c57
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Feb 27 12:56:33 2007 +1100
Fix for overflow exception
darcs-hash:20070227015633-d4795-e977f6a52f1cf8eb040d0bf8477ddbcdd35d1666.gz
diff --git a/src/simulation.c b/src/simulation.c
index 5e800a5..2ebe940 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -1050,7 +1050,7 @@ void gfs_simulation_set_timestep (GfsSimulation * sim)
if ((cfl = min_cfl (sim)) < G_MAXDOUBLE)
sim->advection_params.dt = cfl*gfs_domain_cfl (GFS_DOMAIN (sim), FTT_TRAVERSE_LEAFS, -1);
else
- sim->advection_params.dt = G_MAXDOUBLE;
+ sim->advection_params.dt = G_MAXINT;
i = GFS_DOMAIN (sim)->variables;
while (i) {
@@ -1073,7 +1073,7 @@ void gfs_simulation_set_timestep (GfsSimulation * sim)
if (sim->advection_params.dt > sim->time.dtmax)
sim->advection_params.dt = sim->time.dtmax;
- gdouble tnext = G_MAXDOUBLE;
+ gdouble tnext = G_MAXINT;
GSList * i = sim->events->items;
while (i) {
GfsEvent * event = i->data;
@@ -1085,7 +1085,7 @@ void gfs_simulation_set_timestep (GfsSimulation * sim)
tnext = sim->time.end;
gdouble n = ceil ((tnext - t)/sim->advection_params.dt);
- if (n > 0. && n < 1e9) {
+ if (n > 0. && n < G_MAXINT) {
sim->advection_params.dt = (tnext - t)/n;
if (n == 1.)
sim->tnext = tnext;
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list