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

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:51:56 UTC 2009


The following commit has been merged in the upstream branch:
commit abc464a3ea8d5d38667f1fe28da5844e5a838999
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Wed Jun 8 16:12:44 2005 +1000

    Face boundary conditions modified for consistent upwinding
    
    The former face boundaries were not "upwind aware", this was causing
    problems when, for example, a negative normal velocity was set as inflow
    condition on the left of the domain and at the same time a Dirichlet BC on a
    tracer.
    
    darcs-hash:20050608061244-fbd8f-a9d7a5800f11250c54bc8d1df713ec45d3d920ab.gz

diff --git a/src/boundary.c b/src/boundary.c
index 2c5131d..b6b0ecb 100644
--- a/src/boundary.c
+++ b/src/boundary.c
@@ -225,11 +225,9 @@ static void homogeneous_dirichlet (FttCellFace * f, GfsBc * b)
 
 static void face_dirichlet (FttCellFace * f, GfsBc * b)
 {
-  gdouble v = gfs_function_face_value (GFS_BC_VALUE (b)->val, f,
-		   GFS_SIMULATION (gfs_box_domain (b->b->box))->time.t);
-  
   GFS_STATE (f->cell)->f[f->d].v = 
-    GFS_STATE (f->neighbor)->f[FTT_OPPOSITE_DIRECTION (f->d)].v = v;
+    gfs_function_face_value (GFS_BC_VALUE (b)->val, f,
+			     GFS_SIMULATION (gfs_box_domain (b->b->box))->time.t);
 }
 
 static void gfs_bc_dirichlet_init (GfsBc * object)
@@ -278,14 +276,11 @@ static void homogeneous_neumann (FttCellFace * f, GfsBc * b)
 
 static void face_neumann (FttCellFace * f, GfsBc * b)
 {
-  gdouble v = 
+  GFS_STATE (f->cell)->f[f->d].v = 
     GFS_VARIABLE (f->neighbor, b->v->i) +
     gfs_function_face_value (GFS_BC_VALUE (b)->val, f, 
 	         GFS_SIMULATION (gfs_box_domain (b->b->box))->time.t)
     *ftt_cell_size (f->cell)/2.;
-
-  GFS_STATE (f->cell)->f[f->d].v = 
-    GFS_STATE (f->neighbor)->f[FTT_OPPOSITE_DIRECTION (f->d)].v = v;
 }
 
 static void gfs_bc_neumann_init (GfsBc * object)

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list