diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2006-10-04 14:46:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2006-10-04 14:46:00 +0000 |
commit | ab2a03ea8ec093cc15b197aba8b2c4d11789b510 (patch) | |
tree | 5c897de1f5bf2427c3228fc58f7fbac0f6e3ec53 /Carpet | |
parent | 77601aa15273672a9e3ca86a59795144e4dc7d00 (diff) |
CarpetIOHDF5: use aliased function Coord_GroupSystem() only optionally
If no thorn provided this aliased function, CarpetIOHDF5 assumes that no
coordinate information is available.
darcs-hash:20061004144616-776a0-00da12cca7d6b6ad1ae0a38a96923f771239de79.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetIOHDF5/interface.ccl | 2 | ||||
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Output.cc | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Carpet/CarpetIOHDF5/interface.ccl b/Carpet/CarpetIOHDF5/interface.ccl index 82104d1a5..02dc20ffc 100644 --- a/Carpet/CarpetIOHDF5/interface.ccl +++ b/Carpet/CarpetIOHDF5/interface.ccl @@ -27,7 +27,7 @@ CCTK_INT this_iteration TYPE=scalar CCTK_INT FUNCTION Coord_GroupSystem \ (CCTK_POINTER_TO_CONST IN GH, \ CCTK_STRING IN groupname) -REQUIRES FUNCTION Coord_GroupSystem +USES FUNCTION Coord_GroupSystem # function to check whether existing output files should be truncated or not CCTK_INT FUNCTION IO_TruncateOutputFiles \ diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc index 2268ce2a8..cdc99210c 100644 --- a/Carpet/CarpetIOHDF5/src/Output.cc +++ b/Carpet/CarpetIOHDF5/src/Output.cc @@ -611,9 +611,13 @@ static int AddAttributes (const cGH *const cctkGH, const char *fullname, // write bbox attributes if we have coordinate system info CCTK_REAL origin[dim], delta[dim]; - char *groupname = CCTK_GroupNameFromVarI (request->vindex); - int coord_system_handle = Coord_GroupSystem (cctkGH, groupname); - free (groupname); + int coord_system_handle = -1; + if (CCTK_IsFunctionAliased ("Coord_GroupSystem")) + { + char *groupname = CCTK_GroupNameFromVarI (request->vindex); + coord_system_handle = Coord_GroupSystem (cctkGH, groupname); + free (groupname); + } hsize_t size = vdim; HDF5_ERROR (dataspace = H5Screate_simple (1, &size, NULL)); |