From: Simon Sticko Date: Thu, 28 Mar 2024 07:06:10 +0000 (+0100) Subject: Instantiate MappingC1 for dim <= spacedim X-Git-Tag: v9.6.0-rc1~443^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00754e194b04d28b1c5d975254307858e6c686a4;p=dealii.git Instantiate MappingC1 for dim <= spacedim The mapping is not implemened for dim!=spacedim, but it is better to get ExcNotImplemented than missing symbols. --- diff --git a/include/deal.II/fe/mapping_c1.h b/include/deal.II/fe/mapping_c1.h index adaee0547f..352d9d93ea 100644 --- a/include/deal.II/fe/mapping_c1.h +++ b/include/deal.II/fe/mapping_c1.h @@ -63,8 +63,8 @@ public: */ virtual void add_line_support_points( - const typename Triangulation::cell_iterator &cell, - std::vector> &a) const override; + const typename Triangulation::cell_iterator &cell, + std::vector> &a) const override; /** * For dim=3. Append the support points of all shape functions @@ -77,8 +77,8 @@ public: */ virtual void add_quad_support_points( - const typename Triangulation::cell_iterator &cell, - std::vector> &a) const override; + const typename Triangulation::cell_iterator &cell, + std::vector> &a) const override; }; /** @} */ diff --git a/source/fe/mapping_c1.cc b/source/fe/mapping_c1.cc index 4989e12874..f27c76787d 100644 --- a/source/fe/mapping_c1.cc +++ b/source/fe/mapping_c1.cc @@ -31,6 +31,7 @@ MappingC1::MappingC1() : MappingQ(3) { Assert(dim > 1, ExcImpossibleInDim(dim)); + Assert(dim == spacedim, ExcNotImplemented()); } @@ -156,8 +157,8 @@ MappingC1<2>::add_line_support_points( template void MappingC1::add_line_support_points( - const typename Triangulation::cell_iterator &, - std::vector> &) const + const typename Triangulation::cell_iterator &, + std::vector> &) const { DEAL_II_NOT_IMPLEMENTED(); } @@ -191,8 +192,8 @@ MappingC1<2>::add_quad_support_points(const Triangulation<2>::cell_iterator &, template void MappingC1::add_quad_support_points( - const typename Triangulation::cell_iterator &, - std::vector> &) const + const typename Triangulation::cell_iterator &, + std::vector> &) const { DEAL_II_NOT_IMPLEMENTED(); } diff --git a/source/fe/mapping_c1.inst.in b/source/fe/mapping_c1.inst.in index 9c8149b4cf..fa36f5e909 100644 --- a/source/fe/mapping_c1.inst.in +++ b/source/fe/mapping_c1.inst.in @@ -14,7 +14,9 @@ -for (deal_II_dimension : DIMENSIONS) +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { - template class MappingC1; +#if deal_II_dimension <= deal_II_space_dimension + template class MappingC1; +#endif }