From ecc2ec5e884922d44fda100672fb88fee2131c80 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Wed, 17 Jun 2020 21:34:03 +0200 Subject: [PATCH] Finalize checking for non negativity of cells' volumes --- src/mesh/MeshData.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesh/MeshData.hpp b/src/mesh/MeshData.hpp index 099cc06aa..9fab2cf9a 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: -- GitLab