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

Stephane Popinet popinet at users.sourceforge.net
Fri May 15 02:51:28 UTC 2009


The following commit has been merged in the upstream branch:
commit fc8461724aff7181ff30e3b839287511d10a8bb1
Author: Stephane Popinet <popinet at users.sourceforge.net>
Date:   Mon Nov 29 10:31:51 2004 +1100

    Made gfs_divergence() interface consistent with gfs_velocity_norm() etc... (gerris--ocean--0.7--patch-21)
    
    gerris--ocean--0.7--patch-21
    Keywords:
    
    i.e. it now takes an extra GfsVariable argument.
    
    darcs-hash:20041128233151-aabb8-7203105b16cb65ebf848e84dc32e9b98d7aa6f02.gz

diff --git a/src/fluid.c b/src/fluid.c
index c334aa1..9ea9d5f 100644
--- a/src/fluid.c
+++ b/src/fluid.c
@@ -1592,20 +1592,22 @@ void gfs_normal_divergence_2D (FttCell * cell)
 /**
  * gfs_divergence:
  * @cell: a #FttCell.
+ * @v: a #GfsVariable.
  *
- * Fills variable %GFS_DIV of @cell with the divergence of the
+ * Fills variable @v of @cell with the divergence of the
  * (centered) velocity field in this cell.  
  */
-void gfs_divergence (FttCell * cell)
+void gfs_divergence (FttCell * cell, GfsVariable * v)
 {
   FttComponent c;
   gdouble div = 0.;
 
   g_return_if_fail (cell != NULL);
+  g_return_if_fail (v != NULL);
 
   for (c = 0; c < FTT_DIMENSION; c++)
     div += gfs_center_gradient (cell, c, GFS_VELOCITY_INDEX (c));
-  GFS_STATE (cell)->div = div/ftt_cell_size (cell);
+  GFS_VARIABLE (cell, v->i) = div/ftt_cell_size (cell);
 }
 
 /**
diff --git a/src/fluid.h b/src/fluid.h
index 5fd0552..fcc2537 100644
--- a/src/fluid.h
+++ b/src/fluid.h
@@ -189,7 +189,8 @@ void                  gfs_face_gradient_flux_centered(const FttCellFace * face,
 
 void                  gfs_normal_divergence          (FttCell * cell);
 void                  gfs_normal_divergence_2D       (FttCell * cell);
-void                  gfs_divergence                 (FttCell * cell);
+void                  gfs_divergence                 (FttCell * cell,
+						      GfsVariable * v);
 gdouble               gfs_vorticity_value            (FttCell * cell,
 						      FttVector * lambda);
 void                  gfs_vorticity                  (FttCell * cell,

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list