[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sourceforge.net
Fri May 15 02:51:25 UTC 2009
The following commit has been merged in the upstream branch:
commit fa54a291852979c787892e06ab8b629d4743d22b
Author: Stephane Popinet <popinet at users.sourceforge.net>
Date: Tue Nov 16 08:27:08 2004 +1100
Added tolerance on timestep calculation (gerris--ocean--0.7--patch-11)
gerris--ocean--0.7--patch-11
Keywords:
To try to avoid very small timesteps (< 1e-9) due to round-off errors
on times of multiple simultaneous events.
darcs-hash:20041115212708-aabb8-8e1be487758cb93a5423dbb1d86375935bd8ab14.gz
diff --git a/src/simulation.c b/src/simulation.c
index a674614..67e5f8b 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -861,13 +861,13 @@ void gfs_simulation_set_timestep (GfsSimulation * sim)
GfsEvent * event = i->data;
GSList * next = i->next;
- if (t < event->t && sim->tnext > event->t) {
+ if (t < event->t && sim->tnext > event->t - 1e-9) {
sim->advection_params.dt = event->t - t;
sim->tnext = event->t;
}
i = next;
}
- if (sim->tnext > sim->time.end) {
+ if (sim->tnext > sim->time.end - 1e-9) {
sim->advection_params.dt = sim->time.end - t;
sim->tnext = sim->time.end;
}
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list