[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:33 UTC 2009
The following commit has been merged in the upstream branch:
commit 0d0fe13981a74ecee9e444fcfe632bacce4d19da
Author: Stephane Popinet <popinet at users.sf.net>
Date: Sat Jul 19 11:01:26 2008 +1000
New function "area" for interfacial area density
darcs-hash:20080719010126-d4795-383341a3413718a5d3d07e77c1a8f5f5c5d0883f.gz
diff --git a/src/function.h b/src/function.h
index 64a992d..e8c4eaf 100644
--- a/src/function.h
+++ b/src/function.h
@@ -40,4 +40,19 @@ static double dy (const gchar * name) { return dd (name, FTT_Y); }
static double dz (const gchar * name) { return dd (name, FTT_Z); }
#endif /* 3D */
+static double area (const gchar * name)
+{
+ GfsVariable * v = gfs_variable_from_name (GFS_DOMAIN (_sim)->variables, name);
+ if (v == NULL || !GFS_IS_VARIABLE_TRACER_VOF (v))
+ return 0.;
+ g_return_val_if_fail (_cell != NULL, 0.);
+ GfsVariableTracerVOF * t = GFS_VARIABLE_TRACER_VOF (v);
+ FttVector m, p;
+ FttComponent c;
+ for (c = 0; c < FTT_DIMENSION; c++)
+ (&m.x)[c] = GFS_VALUE (_cell, t->m[c]);
+ return gfs_plane_area_center (&m, GFS_VALUE (_cell, t->alpha), &p)/
+ (_sim->physical_params.L*ftt_cell_size (_cell));
+}
+
#endif /* __FUNCTION_H__ */
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list