diff --git a/src/mesh/MeshData.hpp b/src/mesh/MeshData.hpp index 099cc06aa8c4a85f8f5042a9ac45bdb504f76924..9fab2cf9aa8f782125ae21683634b1c6fff68dee 100644 --- a/src/mesh/MeshData.hpp +++ b/src/mesh/MeshData.hpp @@ -2,10 +2,11 @@ #define MESH_DATA_HPP #include <algebra/TinyVector.hpp> -#include <utils/PugsUtils.hpp> - #include <mesh/ItemValue.hpp> #include <mesh/SubItemValuePerItem.hpp> +#include <utils/Exceptions.hpp> +#include <utils/Messenger.hpp> +#include <utils/PugsUtils.hpp> #include <map> @@ -229,10 +230,9 @@ class MeshData return true; }(); -#warning add parallel reduction - // if (not parallel::allReduceMin(is_valid)) { - // throw NormalError("mesh contains cells of non-positive volume"); - // } + if (not parallel::allReduceAnd(is_valid)) { + throw NormalError("mesh contains cells of non-positive volume"); + } } public: