15 #include <type_traits>
35 if constexpr(std::is_same_v<primitive_type, char>) {
36 return H5T_NATIVE_CHAR;
37 }
else if constexpr(std::is_same_v<primitive_type, int>) {
38 return H5T_NATIVE_INT;
39 }
else if constexpr(std::is_same_v<primitive_type, double>) {
40 return H5T_NATIVE_DOUBLE;
41 }
else if constexpr(std::is_same_v<primitive_type, hsize_t>) {
42 return H5T_NATIVE_HSIZE;
44 static_assert(!std::is_same_v<primitive_type, primitive_type>,
"Unsupported data type.");
TDataType PrimitiveType
Definition: data_type_traits.h:42
hid_t GetPrimitiveH5Type()
Definition: data_type_utilities.h:31
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21