aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@3af55ef0-e5e4-43b4-b020-ca5761ff09b2>2006-10-04 14:45:28 +0000
committertradke <tradke@3af55ef0-e5e4-43b4-b020-ca5761ff09b2>2006-10-04 14:45:28 +0000
commit356ea7693dec23224b27a942d033e08b1dbcf6fb (patch)
treee750f2f15258a1969801b00248300bb6baf870a2
parent08ceae92602e989b62c0fbddd19818d5c88097a0 (diff)
Make only optional use of aliased function Coord_GroupSystem().
git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOSDF/trunk@11 3af55ef0-e5e4-43b4-b020-ca5761ff09b2
-rw-r--r--interface.ccl2
-rw-r--r--src/Write1D.c10
-rw-r--r--src/Write2D.c10
-rw-r--r--src/Write3D.c10
4 files changed, 22 insertions, 10 deletions
diff --git a/interface.ccl b/interface.ccl
index 7f0609b..e0fa51e 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -43,4 +43,4 @@ CCTK_INT FUNCTION Coord_GroupSystem \
(CCTK_POINTER_TO_CONST IN GH, \
CCTK_STRING IN groupname)
-REQUIRES FUNCTION Coord_GroupSystem
+USES FUNCTION Coord_GroupSystem
diff --git a/src/Write1D.c b/src/Write1D.c
index 31073b4..60d855a 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -134,9 +134,13 @@ int IOSDF_Write1D (const cGH *GH, int vindex, const char *alias)
}
/* get the coordinate system associated with this grid variable */
- groupname = CCTK_GroupName (gindex);
- coord_system_handle = Coord_GroupSystem (GH, groupname);
- free (groupname);
+ coord_system_handle = -1;
+ if (CCTK_IsFunctionAliased ("Coord_GroupSystem"))
+ {
+ groupname = CCTK_GroupName (gindex);
+ coord_system_handle = Coord_GroupSystem (GH, groupname);
+ free (groupname);
+ }
myproc = CCTK_MyProc (GH);
diff --git a/src/Write2D.c b/src/Write2D.c
index 2906c79..5681f7d 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -113,9 +113,13 @@ int IOSDF_Write2D (const cGH *GH, int vindex, const char *alias)
maxdir = gdata.dim == 2 ? 1 : 3;
/* get the coordinate system associated with this grid variable */
- groupname = CCTK_GroupName (gindex);
- coord_system_handle = Coord_GroupSystem (GH, groupname);
- free (groupname);
+ coord_system_handle = -1;
+ if (CCTK_IsFunctionAliased ("Coord_GroupSystem"))
+ {
+ groupname = CCTK_GroupName (gindex);
+ coord_system_handle = Coord_GroupSystem (GH, groupname);
+ free (groupname);
+ }
dir = gdata.dim < 3 ? gdata.dim : 3;
diff --git a/src/Write3D.c b/src/Write3D.c
index 314146b..3d4db78 100644
--- a/src/Write3D.c
+++ b/src/Write3D.c
@@ -100,9 +100,13 @@ int IOSDF_Write3D (const cGH *GH, int vindex, const char *alias)
}
/* get the coordinate system associated with this grid variable */
- groupname = CCTK_GroupName (gindex);
- coord_system_handle = Coord_GroupSystem (GH, groupname);
- free (groupname);
+ coord_system_handle = -1;
+ if (CCTK_IsFunctionAliased ("Coord_GroupSystem"))
+ {
+ groupname = CCTK_GroupName (gindex);
+ coord_system_handle = Coord_GroupSystem (GH, groupname);
+ free (groupname);
+ }
/* get the total number of grid points to check for zero-sized variables */
/* set the extent vector (copy from 'int' to 'CCTK_INT') */