aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@40f6ab95-0e4f-0410-8daa-ee8d7420be1d>2007-08-23 21:10:04 +0000
committerschnetter <schnetter@40f6ab95-0e4f-0410-8daa-ee8d7420be1d>2007-08-23 21:10:04 +0000
commitf3db0bdf01c05888ca41a5fe35284e8b0c8c1d73 (patch)
tree1be2d2c8031d8eb6e6c815ee7838da98caea7d50
parentcb5eccc91f93b482b5072f4bab04fb9218190953 (diff)
Add new variable sf_active. In constrast to sf_valid, it indicates
whether a surface was found in the past, and thus whether it may still be used, although it is probably somewhat inaccurate. Using this version of SphericalSurface requires updating all using thorns, since sf_active has to be set correctly. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SphericalSurface/trunk@26 40f6ab95-0e4f-0410-8daa-ee8d7420be1d
-rw-r--r--interface.ccl6
-rw-r--r--schedule.ccl2
-rw-r--r--src/radius.c2
-rw-r--r--src/setup.c1
4 files changed, 11 insertions, 0 deletions
diff --git a/interface.ccl b/interface.ccl
index 03af59d..833b7e3 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -8,6 +8,12 @@ IMPLEMENTS: SphericalSurface
PUBLIC:
# To be defined by the setting thorn.
+# Suggested meanings:
+# zero: The surface data are invalid (garbage)
+# one: The surface data are valid in principle, although they may be outdated
+CCTK_INT sf_active[nsurfaces] TYPE=scalar
+
+# To be defined by the setting thorn.
# Suggested meanings:
# zero: No surface is provided at this time step
# negative: No surface could be found at this time step
diff --git a/schedule.ccl b/schedule.ccl
index ad7de7b..a4aac33 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,6 +1,7 @@
# Schedule definitions for thorn SphericalSurface
# $Header$
+STORAGE: sf_active
STORAGE: sf_valid
STORAGE: sf_info
STORAGE: sf_radius sf_origin
@@ -12,6 +13,7 @@ STORAGE: sf_shape_descriptors
SCHEDULE SphericalSurface_Setup AT basegrid
{
LANG: C
+ OPTIONS: global
} "Calculate surface coordinate descriptors"
diff --git a/src/radius.c b/src/radius.c
index 0356259..0958b4c 100644
--- a/src/radius.c
+++ b/src/radius.c
@@ -40,6 +40,7 @@ void SphericalSurface_Set (CCTK_ARGUMENTS)
if (set_spherical[n]) {
+ sf_active[n] = +1;
sf_valid[n] = +1;
sf_area[n] = 4 * pi * pow (radius[n], 2);
@@ -103,6 +104,7 @@ void SphericalSurface_Set (CCTK_ARGUMENTS)
CCTK_REAL const ry2 = pow (radius_y[n], 2);
CCTK_REAL const rz2 = pow (radius_z[n], 2);
+ sf_active[n] = +1;
sf_valid[n] = +1;
sf_area[n] = 0 * 4 * pi * pow (radius[n], 2);
diff --git a/src/setup.c b/src/setup.c
index 3bc37d9..d4cd599 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -115,6 +115,7 @@ void SphericalSurface_Setup (CCTK_ARGUMENTS)
/* mark surface as uninitialised */
+ sf_active[n] = 0;
sf_valid[n] = 0;
} /* for n */