From de697b5307fd912a9aa839e69dc926932e016174 Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 4 Oct 2006 14:44:09 +0000 Subject: Make only optional use of aliased function Coord_GroupSystem(). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@345 ebee0441-1374-4afa-a3b5-247f3ba15b9a --- interface.ccl | 2 +- src/DumpVar.c | 6 +++++- src/Write2D.c | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/interface.ccl b/interface.ccl index bd4cbd5..29d76fa 100644 --- a/interface.ccl +++ b/interface.ccl @@ -69,4 +69,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/DumpVar.c b/src/DumpVar.c index 11e69dc..65f13be 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -570,7 +570,11 @@ static void AddCommonAttributes (const cGH *GH, const ioRequest *request, name = CCTK_GroupNameFromVarI (request->vindex); FLEXIO_ERROR (IOwriteAttribute (file, "groupname", CHAR, strlen (name) + 1, name)); - coord_system_handle = Coord_GroupSystem (GH, name); + coord_system_handle = -1; + if (CCTK_IsFunctionAliased ("Coord_GroupSystem")) + { + coord_system_handle = Coord_GroupSystem (GH, name); + } free (name); itmp[0] = CCTK_GroupTypeFromVarI (request->vindex); diff --git a/src/Write2D.c b/src/Write2D.c index 31f0390..cbaae69 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -223,7 +223,11 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) /* get the coordinate ranges */ groupname = CCTK_GroupNameFromVarI (vindex); - coord_system_handle = Coord_GroupSystem (GH, groupname); + coord_system_handle = -1; + if (CCTK_IsFunctionAliased ("Coord_GroupSystem")) + { + coord_system_handle = Coord_GroupSystem (GH, groupname); + } free (groupname); if (coord_system_handle >= 0 && -- cgit v1.2.3