aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOHDF5/src/Output.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-01-28 15:58:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-01-28 15:58:00 +0000
commitdfaee1a51775e04aecedad010bd366ab020d8e1a (patch)
tree77bbb4ad8b49216adfd07e9c38fc1a6cd80c7344 /Carpet/CarpetIOHDF5/src/Output.cc
parentc1fe2d7dbd09dfb1fe0b2636529ab49aba48a3e9 (diff)
CarpetIOHDF5: Add attribute specifying whether coordinate system is Cartesian
Add an HDF5 attribute "MapisCartesian" specifying whether the coordinate system is Cartesian. This attribute is added if there is a thorn providing this information. darcs-hash:20080128155820-dae7b-759cc1608ba8a7c9d34203b114ceb3836db0f64d.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/Output.cc')
-rw-r--r--Carpet/CarpetIOHDF5/src/Output.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc
index 898952c1f..24cbcd9cb 100644
--- a/Carpet/CarpetIOHDF5/src/Output.cc
+++ b/Carpet/CarpetIOHDF5/src/Output.cc
@@ -664,6 +664,15 @@ static int AddAttributes (const cGH *const cctkGH, const char *fullname,
free (groupname);
}
+ // Specify whether the coordinate system is Cartesian or not
+ if (CCTK_IsFunctionAliased ("MultiPatch_MapIsCartesian")) {
+ int const map_is_cartesian = MultiPatch_MapIsCartesian (Carpet::map);
+ HDF5_ERROR (attr = H5Acreate (dataset, "MapIsCartesian", H5T_NATIVE_INT,
+ dataspace, H5P_DEFAULT));
+ HDF5_ERROR (H5Awrite (attr, H5T_NATIVE_INT, & map_is_cartesian));
+ HDF5_ERROR (H5Aclose (attr));
+ }
+
hsize_t size = vdim;
HDF5_ERROR (dataspace = H5Screate_simple (1, &size, NULL));