aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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') */