[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:54 UTC 2009
The following commit has been merged in the upstream branch:
commit 86c213a0659704f38006ef70b28b9225fe28d8f9
Author: Stephane Popinet <popinet at users.sf.net>
Date: Thu Feb 22 08:44:09 2007 +1100
gfs_simulation_adapt() does not take a "stats" parameter anymore
darcs-hash:20070221214409-d4795-3540f6418f5c6e06954a442afd8b14151c5c80d4.gz
diff --git a/src/ocean.c b/src/ocean.c
index 8008674..b5783ba 100644
--- a/src/ocean.c
+++ b/src/ocean.c
@@ -331,7 +331,10 @@ static void ocean_run (GfsSimulation * sim)
gfs_correct_centered_velocities (domain, 2, g, sim->advection_params.dt/2.);
gfs_domain_timer_stop (domain, "free_surface_pressure");
- gfs_simulation_adapt (sim, NULL);
+ gfs_domain_cell_traverse (domain,
+ FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
+ gfs_simulation_adapt (sim);
gts_range_add_value (&domain->timestep, gfs_clock_elapsed (domain->timer) - tstart);
gts_range_update (&domain->timestep);
@@ -712,6 +715,9 @@ static void ocean_run (GfsSimulation * sim)
set_solid3D (sim, solid);
gfs_domain_timer_stop (domain, "free_surface_pressure");
+ gfs_domain_cell_traverse (domain,
+ FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
gfs_simulation_adapt (sim);
gts_range_add_value (&domain->timestep, gfs_clock_elapsed (domain->timer) - tstart);
diff --git a/src/simulation.c b/src/simulation.c
index 9205278..a784fd7 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -529,7 +529,11 @@ static void simulation_run (GfsSimulation * sim)
gfs_correct_centered_velocities (domain, 2, g, -sim->advection_params.dt);
}
- gfs_simulation_adapt (sim, NULL);
+ gfs_domain_cell_traverse (domain,
+ FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
+ gfs_simulation_adapt (sim);
+
gfs_approximate_projection (domain,
&sim->approx_projection_params,
&sim->advection_params, p, sim->physical_params.alpha, res);
@@ -1356,7 +1360,10 @@ static void advection_run (GfsSimulation * sim)
gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) gfs_event_half_do, sim);
- gfs_simulation_adapt (sim, NULL);
+ gfs_domain_cell_traverse (domain,
+ FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
+ gfs_simulation_adapt (sim);
sim->time.t = sim->tnext;
sim->time.i++;
@@ -1501,7 +1508,10 @@ static void poisson_run (GfsSimulation * sim)
par->residual = gfs_domain_norm_residual (domain, FTT_TRAVERSE_LEAFS, -1, 1., res1);
gfs_domain_timer_stop (domain, "poisson_cycle");
- gfs_simulation_adapt (sim, NULL);
+ gfs_domain_cell_traverse (domain,
+ FTT_POST_ORDER, FTT_TRAVERSE_NON_LEAFS, -1,
+ (FttCellTraverseFunc) gfs_cell_coarse_init, domain);
+ gfs_simulation_adapt (sim);
par->niter++;
sim->time.t = sim->tnext;
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list