Skip to content

Commit 0bd11cd

Browse files
committed
add bool
1 parent 67667a1 commit 0bd11cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

applications/HDF5Application/custom_io/hdf5_file.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,9 @@ bool File::HasDataType(const std::string& rPath) const
816816
KRATOS_HDF5_CALL(H5Tclose, dtype_id)
817817
KRATOS_HDF5_CALL(H5Dclose, dset_id)
818818

819-
if constexpr(std::is_same_v<TDataType, int>) {
819+
if constexpr(std::is_same_v<TDataType, bool>) {
820+
return type == H5T_INTEGER;
821+
} else if constexpr(std::is_same_v<TDataType, int>) {
820822
return type == H5T_INTEGER;
821823
} else if constexpr(std::is_same_v<TDataType, double>) {
822824
return type == H5T_FLOAT;
@@ -1178,6 +1180,7 @@ KRATOS_HDF5_FILE_ATTRIBUTE_METHOD_INSTANTIATION(array_1d<double, 4>);
11781180
KRATOS_HDF5_FILE_ATTRIBUTE_METHOD_INSTANTIATION(array_1d<double, 6>);
11791181
KRATOS_HDF5_FILE_ATTRIBUTE_METHOD_INSTANTIATION(array_1d<double, 9>);
11801182

1183+
KRATOS_HDF5_FILE_DATA_SET_METHOD_INSTANTIATION(Vector<bool>);
11811184
KRATOS_HDF5_FILE_DATA_SET_METHOD_INSTANTIATION(Vector<char>);
11821185
KRATOS_HDF5_FILE_DATA_SET_METHOD_INSTANTIATION(Vector<int>);
11831186
KRATOS_HDF5_FILE_DATA_SET_METHOD_INSTANTIATION(Vector<double>);

0 commit comments

Comments
 (0)