[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet popinet at users.sf.net
Fri May 15 02:53:39 UTC 2009


The following commit has been merged in the upstream branch:
commit 594ca6546ee312cbbdedc3580fdafb73f00fa2eb
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Mon Aug 14 09:57:14 2006 +1000

    Tracer advection does not save "half" values anymore
    
    darcs-hash:20060813235714-d4795-1884757e417b989337c669d9c8afd7b11c91691d.gz

diff --git a/src/ocean.c b/src/ocean.c
index 9c6a7d5..637bcab 100644
--- a/src/ocean.c
+++ b/src/ocean.c
@@ -673,10 +673,10 @@ static void ocean_run (GfsSimulation * sim)
 	t->advection.dt = sim->advection_params.dt;
 	switch (t->advection.scheme) {
 	case GFS_GODUNOV: case GFS_NONE:
-	  gfs_tracer_advection_diffusion (domain, &t->advection, NULL);
+	  gfs_tracer_advection_diffusion (domain, &t->advection);
 	  break;
 	case GFS_VOF:
-	  gfs_tracer_vof_advection (domain, &t->advection, NULL);
+	  gfs_tracer_vof_advection (domain, &t->advection);
 	  gfs_domain_variable_centered_sources (domain, i->data, i->data, t->advection.dt);
 	  break;
 	}
diff --git a/src/simulation.c b/src/simulation.c
index cae8657..e6f2b49 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -504,10 +504,10 @@ static void simulation_run (GfsSimulation * sim)
 	t->advection.dt = sim->advection_params.dt;
 	switch (t->advection.scheme) {
 	case GFS_GODUNOV: case GFS_NONE:
-	  gfs_tracer_advection_diffusion (domain, &t->advection, NULL);
+	  gfs_tracer_advection_diffusion (domain, &t->advection);
 	  break;
 	case GFS_VOF:
-	  gfs_tracer_vof_advection (domain, &t->advection, NULL);
+	  gfs_tracer_vof_advection (domain, &t->advection);
 	  gfs_domain_variable_centered_sources (domain, i->data, i->data, t->advection.dt);
 	  break;
 	}
@@ -1343,10 +1343,10 @@ static void advection_run (GfsSimulation * sim)
 	t->advection.dt = sim->advection_params.dt;
 	switch (t->advection.scheme) {
 	case GFS_GODUNOV:
-	  gfs_tracer_advection_diffusion (domain, &t->advection, NULL);
+	  gfs_tracer_advection_diffusion (domain, &t->advection);
 	  break;
 	case GFS_VOF:
-	  gfs_tracer_vof_advection (domain, &t->advection, NULL);
+	  gfs_tracer_vof_advection (domain, &t->advection);
 	  gfs_domain_variable_centered_sources (domain, i->data, i->data, t->advection.dt);
 	  break;
 	case GFS_NONE:
diff --git a/src/timestep.c b/src/timestep.c
index 97fd465..2b83404 100644
--- a/src/timestep.c
+++ b/src/timestep.c
@@ -687,40 +687,17 @@ void gfs_centered_velocity_advection_diffusion (GfsDomain * domain,
   gfs_domain_timer_stop (domain, "centered_velocity_advection_diffusion");
 }
 
-static void save_previous (FttCell * cell, gpointer * data)
-{
-  GfsVariable * v = data[0];
-  GfsVariable * vh = data[1];
-
-  GFS_VARIABLE (cell, vh->i) = GFS_VARIABLE (cell, v->i);
-}
-
-static void average_previous (FttCell * cell, gpointer * data)
-{
-  GfsVariable * v = data[0];
-  GfsVariable * vh = data[1];
-
-  GFS_VARIABLE (cell, vh->i) = (GFS_VARIABLE (cell, vh->i) +
-				GFS_VARIABLE (cell, v->i))/2.;
-}
-
 /**
  * gfs_tracer_advection_diffusion:
  * @domain: a #GfsDomain.
  * @par: the advection parameters.
- * @half: a #GfsVariable or %NULL.
  *
  * Advects the @v field of @par using the current face-centered (MAC)
  * velocity field.
- *
- * If @half is not %NULL, the half-timestep value of @par->v is
- * stored in the corresponding variable.  
  */
 void gfs_tracer_advection_diffusion (GfsDomain * domain,
-				     GfsAdvectionParams * par,
-				     GfsVariable * half)
+				     GfsAdvectionParams * par)
 {
-  gpointer data[2];
   GfsSourceDiffusion * d;
 
   g_return_if_fail (domain != NULL);
@@ -728,13 +705,6 @@ void gfs_tracer_advection_diffusion (GfsDomain * domain,
 
   gfs_domain_timer_start (domain, "tracer_advection_diffusion");
 
-  if (half) {
-    data[0] = par->v;
-    data[1] = half;
-    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
-			      (FttCellTraverseFunc) save_previous, data);
-  }
-
   if ((d = source_diffusion (par->v))) {
     GfsVariable * rhs;
 
@@ -750,12 +720,6 @@ void gfs_tracer_advection_diffusion (GfsDomain * domain,
     gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, par->v);
   }
 
-  if (half) {
-    gfs_domain_cell_traverse (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,
-			      (FttCellTraverseFunc) average_previous, data);
-    gfs_domain_bc (domain, FTT_TRAVERSE_LEAFS, -1, half);
-  }
-
   gfs_domain_timer_stop (domain, "tracer_advection_diffusion");
 }
 
diff --git a/src/timestep.h b/src/timestep.h
index b13e2c8..5985bc9 100644
--- a/src/timestep.h
+++ b/src/timestep.h
@@ -64,8 +64,7 @@ void          gfs_centered_velocity_advection_diffusion (GfsDomain * domain,
 							 GfsVariable ** g,
 							 GfsFunction * alpha);
 void          gfs_tracer_advection_diffusion  (GfsDomain * domain,
-					       GfsAdvectionParams * par,
-					       GfsVariable * half);
+					       GfsAdvectionParams * par);
 
 /* GfsSurfaceGenericBc: Header */
 

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list