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/CarpetIOHDF5/src/Output.cc | |
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/CarpetIOHDF5/src/Output.cc')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Output.cc | 10 |
1 files changed, 7 insertions, 3 deletions
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)); |