From: Martin Kronbichler Date: Tue, 20 Oct 2020 14:04:29 +0000 (+0200) Subject: Apply patch by Peter Munch to clean up partitioner identification X-Git-Tag: v9.3.0-rc1~995^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58ab820134dc595d71743a13da516cb4100c726;p=dealii.git Apply patch by Peter Munch to clean up partitioner identification --- diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 66bcbd9082..ccee8dbd8a 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -3137,7 +3137,6 @@ namespace internal find_vector_in_mf(const VectorType &vec, const bool check_global_compatibility = true) const { - unsigned int mf_component = numbers::invalid_unsigned_int; (void)check_global_compatibility; for (unsigned int c = 0; c < matrix_free.n_components(); ++c) if ( @@ -3148,11 +3147,12 @@ namespace internal # endif vec.get_partitioner()->is_compatible( *matrix_free.get_dof_info(c).vector_partitioner)) - { - mf_component = c; - break; - } - return mf_component; + return c; + + Assert(false, + ExcNotImplemented("Could not find partitioner that fits vector")); + + return numbers::invalid_unsigned_int; } @@ -3285,9 +3285,6 @@ namespace internal # ifdef DEAL_II_WITH_MPI const unsigned int mf_component = find_vector_in_mf(vec); - Assert(mf_component != numbers::invalid_unsigned_int, - ExcNotImplemented()); - const auto &part = get_partitioner(mf_component); if (part.n_ghost_indices() == 0 && part.n_import_indices() == 0) @@ -3378,9 +3375,6 @@ namespace internal const unsigned int mf_component = find_vector_in_mf(vec); - Assert(mf_component != numbers::invalid_unsigned_int, - ExcNotImplemented()); - const auto &part = get_partitioner(mf_component); if (part.n_ghost_indices() != 0 || part.n_import_indices() != 0) @@ -3483,8 +3477,6 @@ namespace internal { # ifdef DEAL_II_WITH_MPI const unsigned int mf_component = find_vector_in_mf(vec); - Assert(mf_component != numbers::invalid_unsigned_int, - ExcNotImplemented()); const auto &part = get_partitioner(mf_component); @@ -3574,9 +3566,6 @@ namespace internal const unsigned int mf_component = find_vector_in_mf(vec); - Assert(mf_component != numbers::invalid_unsigned_int, - ExcNotImplemented()); - const auto &part = get_partitioner(mf_component); if (part.n_ghost_indices() == 0 && part.n_import_indices() == 0)