[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:54:18 UTC 2009
The following commit has been merged in the upstream branch:
commit c5bb8d9fdf50228f5e1a17cadf320bd61d92ce6a
Author: Stephane Popinet <popinet at users.sf.net>
Date: Fri Apr 20 14:53:29 2007 +1000
New predefined spatial function 'sphere()'
darcs-hash:20070420045329-d4795-cf1fb2a8c4d01566a0d8172ed0d6c4ba89ea1bfa.gz
diff --git a/src/spatial.h b/src/spatial.h
index 40a823f..9068551 100644
--- a/src/spatial.h
+++ b/src/spatial.h
@@ -28,4 +28,9 @@ static double ellipse (double xc, double yc, double a, double b)
return (_x - xc)*(_x - xc)/(a*a) + (_y - yc)*(_y - yc)/(b*b) - 1.;
}
+static double sphere (double xc, double yc, double zc, double r)
+{
+ return (_x - xc)*(_x - xc) + (_y - yc)*(_y - yc) + (_z - zc)*(_z - zc) - r*r;
+}
+
#endif /* __SPATIAL_H__ */
diff --git a/src/utils.c b/src/utils.c
index b887f99..004ac87 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -610,7 +610,7 @@ static void function_read (GtsObject ** o, GtsFile * fp)
}
if (f->spatial)
fputs ("double f (double x, double y, double z) {\n"
- " _x = x; _y = y;\n",
+ " _x = x; _y = y; _z = z;\n",
fin);
else {
fputs ("typedef double (* Func) (const FttCell * cell,\n"
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list