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

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


The following commit has been merged in the upstream branch:
commit 9b4635b4a1572f3045d3c17fdf12ceb33046ee53
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Sun Feb 5 12:15:27 2006 +1100

    Bug fix for "Pmac"
    
    Pmac was allocated as a temporary variable and thus was not
    interpolated from one timestep to the next when using adaptive
    refinement (causing trouble with the convergence rate of the Poisson
    solver). It is now a default variable.
    
    darcs-hash:20060205011527-d4795-93247d599d79f32c719b73f71bd9dc34d2ac81b3.gz

diff --git a/src/simulation.c b/src/simulation.c
index 5689ce8..76f905f 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -491,7 +491,8 @@ static void simulation_run (GfsSimulation * sim)
 
   p = gfs_variable_from_name (domain->variables, "P");
   g_assert (p);
-  pmac = gfs_temporary_variable (domain);
+  pmac = gfs_variable_from_name (domain->variables, "Pmac");
+  g_assert (pmac);
 
   gfs_simulation_refine (sim);
 
@@ -576,7 +577,6 @@ static void simulation_run (GfsSimulation * sim)
   gts_container_foreach (GTS_CONTAINER (sim->events), (GtsFunc) gfs_event_do, sim);  
   gts_container_foreach (GTS_CONTAINER (sim->events),
 			 (GtsFunc) gts_object_destroy, NULL);
-  gts_object_destroy (GTS_OBJECT (pmac));
 }
 
 static void gfs_simulation_class_init (GfsSimulationClass * klass)
@@ -776,6 +776,7 @@ static void gfs_simulation_init (GfsSimulation * object)
   GfsDerivedVariable * v = derived_variable;
 
   gfs_domain_add_variable (domain, "P")->centered = TRUE;
+  gfs_domain_add_variable (domain, "Pmac")->centered = TRUE;
   gfs_variable_set_vector (gfs_domain_add_variable (domain, "U"), FTT_X);
   gfs_variable_set_vector (gfs_domain_add_variable (domain, "V"), FTT_Y);
 #if (!FTT_2D)

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list