From: Peter Munch Date: Tue, 25 Aug 2020 21:38:45 +0000 (+0200) Subject: Add assert to MappingFE X-Git-Tag: v9.3.0-rc1~1151^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10843%2Fhead;p=dealii.git Add assert to MappingFE --- 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()); }