From dcb8b55821491d0dbd5aea9f785e63f66c599641 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sun, 22 Nov 2020 07:00:57 +0100 Subject: [PATCH] Work on some asserts in MatrixFree --- include/deal.II/matrix_free/evaluation_kernels.h | 6 ++++++ .../deal.II/matrix_free/mapping_info.templates.h | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index 036b628f59..dff4ba1e00 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -2504,6 +2504,9 @@ namespace internal const unsigned int face_orientation, const Table<2, unsigned int> &orientation_map) { + Assert(data.element_type != MatrixFreeFunctions::tensor_none, + ExcNotImplemented()); + constexpr unsigned int static_dofs_per_face = fe_degree > -1 ? Utilities::pow(fe_degree + 1, dim - 1) : numbers::invalid_unsigned_int; @@ -2594,6 +2597,9 @@ namespace internal const unsigned int face_orientation, const Table<2, unsigned int> &orientation_map) { + Assert(data.element_type != MatrixFreeFunctions::tensor_none, + ExcNotImplemented()); + if (face_orientation) adjust_for_face_orientation(dim, n_components, diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index 02ef441e58..47e0d5c252 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -376,12 +376,17 @@ namespace internal flag &= quad[my_q][q].get_tensor_basis()[0] == quad[my_q][q].get_tensor_basis()[i]; } -#ifdef DEAL_II_WITH_SIMPLEX_SUPPORT + if (flag == false) - cell_data[my_q].descriptor[q].initialize(quad[my_q][q], - update_default); - else + { +#ifdef DEAL_II_WITH_SIMPLEX_SUPPORT + cell_data[my_q].descriptor[q].initialize(quad[my_q][q], + update_default); +#else + Assert(false, ExcNotImplemented()); #endif + } + else cell_data[my_q].descriptor[q].initialize( quad[my_q][q].get_tensor_basis()[0], update_default); } -- 2.39.5