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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:54:12 UTC 2009


The following commit has been merged in the upstream branch:
commit 52d463bc2882dcbeaa1dd09999761df20a927f35
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed Apr 11 15:23:17 2007 +1000

    Changed fine_coarse gradient calculation
    
    Fine cells on the left-hand-side of the fine-coarse boundary are taken
    into account only if they are not mixed. This is to ensure the
    stability of the GfsOcean model (the nz test case).
    
    darcs-hash:20070411052317-d4795-0cdea091307bb84d5c55d4691b9d38ff34d96efb.gz

diff --git a/src/fluid.c b/src/fluid.c
index b5aedb3..66b2df7 100644
--- a/src/fluid.c
+++ b/src/fluid.c
@@ -169,10 +169,7 @@ static GfsGradient interpolate_1D1 (FttCell * cell,
 
   f = gfs_cell_face (cell, d);
   if (f.neighbor) {
-    gdouble p2;
-    gdouble x2 = 1.;
-
-    p2 = average_neighbor_value (&f, v, &x2);
+    gdouble x2 = 1., p2 = average_neighbor_value (&f, v, &x2);
     p.a = 1. - x/x2;
     p.b = p2*x/x2;
   }
@@ -304,7 +301,7 @@ static Gradient gradient_fine_coarse (const FttCellFace * face,
   p = interpolate_2D1 (face->neighbor, dp[0], dp[1], 1./4., 1./4., v);
 #endif /* FTT_3D */
 
-  if (n == NULL) {
+  if (n == NULL || GFS_IS_MIXED (n)) {
     g.a = 2./3.;
     g.b = 2.*p.a/3.;
     g.c = 2.*p.b/3.;

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list