[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:17 UTC 2009
The following commit has been merged in the upstream branch:
commit 41af2ed1039382d6281528caee860e07edef1b48
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue May 6 07:14:02 2008 +1000
New derived variables rx, ry and rz
darcs-hash:20080505211402-d4795-24b482bd9e4428235e5f5193feac7a51925778f6.gz
diff --git a/src/simulation.c b/src/simulation.c
index af610d4..d326661 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -614,6 +614,45 @@ static gdouble cell_cz (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
return p.z;
}
+static gdouble cell_rx (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
+{
+ FttVector p;
+
+ g_return_val_if_fail (cell != NULL || face != NULL, 0.);
+
+ if (face)
+ ftt_face_pos (face, &p);
+ else
+ ftt_cell_pos (cell, &p);
+ return p.x;
+}
+
+static gdouble cell_ry (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
+{
+ FttVector p;
+
+ g_return_val_if_fail (cell != NULL || face != NULL, 0.);
+
+ if (face)
+ ftt_face_pos (face, &p);
+ else
+ ftt_cell_pos (cell, &p);
+ return p.y;
+}
+
+static gdouble cell_rz (FttCell * cell, FttCellFace * face, GfsSimulation * sim)
+{
+ FttVector p;
+
+ g_return_val_if_fail (cell != NULL || face != NULL, 0.);
+
+ if (face)
+ ftt_face_pos (face, &p);
+ else
+ ftt_cell_pos (cell, &p);
+ return p.z;
+}
+
static gdouble cell_dV (FttCell * cell)
{
gdouble dV = ftt_cell_volume (cell);
@@ -744,6 +783,9 @@ static void simulation_init (GfsSimulation * object)
{ "cx", "x-coordinate of the center of the cell", cell_cx },
{ "cy", "y-coordinate of the center of the cell", cell_cy },
{ "cz", "z-coordinate of the center of the cell", cell_cz },
+ { "rx", "x-coordinate of the center of the cell (internal)", cell_rx },
+ { "ry", "y-coordinate of the center of the cell (internal)", cell_ry },
+ { "rz", "z-coordinate of the center of the cell (internal)", cell_rz },
{ "dV", "volume of the cell", cell_dV},
{ "t", "Physical time", cell_t },
{ "dt", "Timestep", cell_dt },
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list