[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 99c6f31f26c0b771d92cc617919c93a9daa1504a
Author: Stephane Popinet <popinet at users.sourceforge.net>
Date: Mon Nov 29 10:26:29 2004 +1100
Replaced static cell_is_cut function with exported gfs_cell_is_cut (gerris--ocean--0.7--patch-20)
gerris--ocean--0.7--patch-20
Keywords:
Used for new gfsview solid entity.
darcs-hash:20041128232629-aabb8-0563aca7563ec61ca9e6b903a05da553c5c631f0.gz
diff --git a/src/fluid.c b/src/fluid.c
index ac5716c..c334aa1 100644
--- a/src/fluid.c
+++ b/src/fluid.c
@@ -1811,14 +1811,26 @@ static void face_overlaps_box (GtsTriangle * t, gpointer * data)
}
}
-static GtsSurface * cell_is_cut (FttCell * cell, GtsSurface * s)
+/**
+ * gfs_cell_is_cut:
+ * @cell: a #FttCell.
+ * @s: a #GtsSurface.
+ *
+ * Returns: a new #GtsSurface containing the faces of @s which may
+ * intersect @cell or %NULL if no faces of @s intersects @cell.
+ */
+GtsSurface * gfs_cell_is_cut (FttCell * cell, GtsSurface * s)
{
GtsSurface * s1 = NULL;
gpointer data[2];
GtsBBox bb;
FttVector p;
- gdouble h = ftt_cell_size (cell)/1.99999;
+ gdouble h;
+
+ g_return_val_if_fail (cell != NULL, NULL);
+ g_return_val_if_fail (s != NULL, NULL);
+ h = ftt_cell_size (cell)/1.99999;
ftt_cell_pos (cell, &p);
bb.x1 = p.x - h; bb.y1 = p.y - h;
bb.x2 = p.x + h; bb.y2 = p.y + h;
@@ -1842,7 +1854,7 @@ static void cell_traverse_cut (FttCell * cell,
FttCellTraverseCutFunc func,
gpointer data)
{
- GtsSurface * s1 = cell_is_cut (cell, s);
+ GtsSurface * s1 = gfs_cell_is_cut (cell, s);
if (s1 == NULL)
return;
diff --git a/src/fluid.h b/src/fluid.h
index 629a9ea..5fd0552 100644
--- a/src/fluid.h
+++ b/src/fluid.h
@@ -228,6 +228,8 @@ void gfs_cell_traverse_mixed (FttCell * root,
FttTraverseFlags flags,
FttCellTraverseFunc func,
gpointer data);
+GtsSurface * gfs_cell_is_cut (FttCell * cell,
+ GtsSurface * s);
typedef void (* FttCellTraverseCutFunc) (FttCell * cell,
GtsSurface * s,
gpointer data);
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list