From c51e7dfc466cb5cb60bf0dde40668f99533194c8 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Tue, 25 Aug 2020 23:38:45 +0200 Subject: [PATCH] Add assert to MappingFE --- include/deal.II/fe/mapping_fe.h | 3 ++- source/fe/mapping_fe.cc | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/deal.II/fe/mapping_fe.h b/include/deal.II/fe/mapping_fe.h index 2c617b367d..aa96493fcb 100644 --- a/include/deal.II/fe/mapping_fe.h +++ b/include/deal.II/fe/mapping_fe.h @@ -49,7 +49,8 @@ DEAL_II_NAMESPACE_OPEN * equivalent to MappingQGeneric(degree). Please note that no optimizations * exploiting tensor-product structures of finite elements have been added here. * - * @note Currently, only implemented for degree==1. + * @node Currently, only implemented for elements with tensor_degree==1 and + * n_components==1. * * @ingroup simplex */ diff --git a/source/fe/mapping_fe.cc b/source/fe/mapping_fe.cc index 746abb6785..16fa154641 100644 --- a/source/fe/mapping_fe.cc +++ b/source/fe/mapping_fe.cc @@ -926,6 +926,8 @@ MappingFE::MappingFE(const FiniteElement &fe) Assert(polynomial_degree >= 1, ExcMessage("It only makes sense to create polynomial mappings " "with a polynomial degree greater or equal to one.")); + Assert(fe.tensor_degree() == 1, ExcNotImplemented()); + Assert(fe.n_components() == 1, ExcNotImplemented()); } -- 2.39.5