From: Jean-Paul Pelteret Date: Tue, 20 Dec 2022 19:54:12 +0000 (+0100) Subject: Use delegate constructors in FEInterfaceValues X-Git-Tag: v9.5.0-rc1~701^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e78055bc7815cf5e8d5e4d170c0e826c74bd59a7;p=dealii.git Use delegate constructors in FEInterfaceValues --- diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index 70287b4661..32f45ceae6 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -1443,7 +1443,7 @@ public: const UpdateFlags update_flags); /** - * Same as above, but using a Q1 mapping. + * Same as above, but using the default linear mapping. */ FEInterfaceValues(const hp::FECollection &fe_collection, const hp::QCollection &quadrature_collection, @@ -2244,6 +2244,20 @@ FEInterfaceValues::FEInterfaceValues( +template +FEInterfaceValues::FEInterfaceValues( + const FiniteElement &fe, + const Quadrature & quadrature, + const UpdateFlags update_flags) + : FEInterfaceValues( + fe.reference_cell().template get_default_linear_mapping(), + fe, + quadrature, + update_flags) +{} + + + template FEInterfaceValues::FEInterfaceValues( const Mapping & mapping, @@ -2320,71 +2334,10 @@ FEInterfaceValues::FEInterfaceValues( const hp::FECollection &fe_collection, const hp::QCollection & quadrature_collection, const UpdateFlags update_flags) - : n_quadrature_points(quadrature_collection.max_n_quadrature_points()) - , fe_face_values(nullptr) - , fe_face_values_neighbor(nullptr) - , internal_hp_fe_face_values( - std::make_unique>( - fe_collection.get_reference_cell_default_linear_mapping(), - fe_collection, - quadrature_collection, - update_flags)) - , internal_hp_fe_subface_values( - std::make_unique>( - fe_collection.get_reference_cell_default_linear_mapping(), - fe_collection, - quadrature_collection, - update_flags)) - , internal_hp_fe_face_values_neighbor( - std::make_unique>( - fe_collection.get_reference_cell_default_linear_mapping(), - fe_collection, - quadrature_collection, - update_flags)) - , internal_hp_fe_subface_values_neighbor( - std::make_unique>( - fe_collection.get_reference_cell_default_linear_mapping(), - fe_collection, - quadrature_collection, - update_flags)) -{ - AssertDimension(dim, spacedim); -} - - - -template -FEInterfaceValues::FEInterfaceValues( - const FiniteElement &fe, - const Quadrature & quadrature, - const UpdateFlags update_flags) - : n_quadrature_points(quadrature.size()) - , internal_fe_face_values(std::make_unique>( - fe.reference_cell().template get_default_linear_mapping(), - fe, - quadrature, - update_flags)) - , internal_fe_subface_values(std::make_unique>( - fe.reference_cell().template get_default_linear_mapping(), - fe, - quadrature, - update_flags)) - , internal_fe_face_values_neighbor( - std::make_unique>( - fe.reference_cell() - .template get_default_linear_mapping(), - fe, - quadrature, - update_flags)) - , internal_fe_subface_values_neighbor( - std::make_unique>( - fe.reference_cell() - .template get_default_linear_mapping(), - fe, - quadrature, - update_flags)) - , fe_face_values(nullptr) - , fe_face_values_neighbor(nullptr) + : FEInterfaceValues(fe_collection.get_reference_cell_default_linear_mapping(), + fe_collection, + quadrature_collection, + update_flags) {}