16#ifndef dealii_fe_system_h
17# define dealii_fe_system_h
31# include <type_traits>
40template <
int dim,
int spacedim>
214template <
int dim,
int spacedim = dim>
255 const unsigned int n_elements);
264 const unsigned int n1,
266 const unsigned int n2);
275 const unsigned int n1,
277 const unsigned int n2,
279 const unsigned int n3);
288 const unsigned int n1,
290 const unsigned int n2,
292 const unsigned int n3,
294 const unsigned int n4);
303 const unsigned int n1,
305 const unsigned int n2,
307 const unsigned int n3,
309 const unsigned int n4,
311 const unsigned int n5);
499 const std::vector<unsigned int> &multiplicities);
501# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
547 (std::is_same<typename std::decay<FEPairs>::type,
548 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
549 unsigned int>>::value ||
550 std::is_base_of<FiniteElement<dim, spacedim>,
551 typename std::decay<FEPairs>::type>::value)...>::type>
567 const std::initializer_list<
586 std::move(other_fe_system.generalized_support_points_index_table);
605 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
619 const unsigned int n_selected_components)
const override;
647 const unsigned int component)
const override;
677 const unsigned int component)
const override;
707 const unsigned int component)
const override;
738 const unsigned int component)
const override;
769 const unsigned int component)
const override;
801 const unsigned int face_index)
const override;
828 const unsigned int child,
861 const unsigned int child,
905 const unsigned int face,
906 const bool face_orientation =
true,
907 const bool face_flip =
false,
908 const bool face_rotation =
false)
const override;
919 virtual Point<dim - 1>
921 const unsigned int face_no = 0)
const override;
930 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
963 const unsigned int face_no = 0)
const override;
981 const unsigned int subface,
983 const unsigned int face_no = 0)
const override;
1000 virtual std::vector<std::pair<unsigned int, unsigned int>>
1008 virtual std::vector<std::pair<unsigned int, unsigned int>>
1016 virtual std::vector<std::pair<unsigned int, unsigned int>>
1018 const unsigned int face_no = 0)
const override;
1025 const unsigned int codim = 0) const override final;
1045 const
std::vector<
Vector<
double>> &support_point_values,
1046 std::vector<
double> & dof_values) const override;
1060 virtual
std::unique_ptr<
1064 const
Mapping<dim, spacedim> &mapping,
1066 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1068 &output_data) const override;
1072 virtual
std::unique_ptr<
1076 const
Mapping<dim, spacedim> & mapping,
1077 const
hp::QCollection<dim - 1> &quadrature,
1078 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1080 &output_data) const override;
1082 virtual
std::unique_ptr<
1086 const
Mapping<dim, spacedim> &mapping,
1088 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1090 &output_data) const override;
1094 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1097 const
Mapping<dim, spacedim> & mapping,
1099 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1103 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1105 &output_data) const override;
1111 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1112 const
unsigned int face_no,
1113 const
hp::QCollection<dim - 1> & quadrature,
1114 const
Mapping<dim, spacedim> & mapping,
1116 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1120 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1122 &output_data) const override;
1126 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1127 const
unsigned int face_no,
1128 const
unsigned int sub_no,
1130 const
Mapping<dim, spacedim> & mapping,
1132 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1136 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1138 &output_data) const override;
1150 template <
int dim_1>
1153 const
Mapping<dim, spacedim> & mapping,
1154 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1155 const
unsigned int face_no,
1156 const
unsigned int sub_no,
1157 const
hp::QCollection<dim_1> & quadrature,
1161 const
internal::FEValuesImplementation::MappingRelatedData<dim, spacedim>
1163 internal::FEValuesImplementation::FiniteElementRelatedData<dim, spacedim>
1164 &output_data) const;
1204 const
std::vector<
unsigned int> &multiplicities);
1217 template <
int structdim>
1218 std::vector<
std::pair<
unsigned int,
unsigned int>>
1220 const
unsigned int face_no = 0) const;
1249 const unsigned int base_no,
1278 typename std::vector<
1279 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
1290 mutable std::vector<
1308 namespace FESystemImplementation
1310 template <
int dim,
int spacedim>
1313 const std::initializer_list<
1317 return std::count_if(
1321 unsigned int> &fe_system) {
1322 return fe_system.second > 0;
1328 template <
int dim,
int spacedim>
1329 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>
1332 return std::make_pair(std::move(fe.
clone()), 1u);
1337 template <
int dim,
int spacedim>
1342 std::forward<std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1345 return std::forward<
1346 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>(
1354# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
1359template <
int dim,
int spacedim>
1360template <
class... FEPairs,
typename>
1363 {internal::FESystemImplementation::promote_to_fe_pair<dim, spacedim>(
1364 std::forward<FEPairs>(fe_pairs))...})
1369template <
int dim,
int spacedim>
1371 const std::initializer_list<
1381 , base_elements(
internal::FESystemImplementation::count_nonzeros(fe_systems))
1383 std::vector<const FiniteElement<dim, spacedim> *> fes;
1384 std::vector<unsigned int> multiplicities;
1387 [&fes, &multiplicities](
1388 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1389 unsigned int> &fe_system) {
1390 fes.push_back(fe_system.first.get());
1391 multiplicities.push_back(fe_system.second);
1394 for (
const auto &p : fe_systems)
void set_fe_data(const unsigned int base_no, std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase >)
InternalData(const unsigned int n_base_elements)
std::vector< std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > > base_fe_datas
std::vector< internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > > base_fe_output_objects
FiniteElement< dim, spacedim >::InternalDataBase & get_fe_data(const unsigned int base_no) const
internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > & get_fe_output_object(const unsigned int base_no) const
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
FESystem(const std::initializer_list< std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > > &fe_systems)
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
FESystem(const FESystem< dim, spacedim > &)=delete
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
void compute_fill(const Mapping< dim, spacedim > &mapping, const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const hp::QCollection< dim_1 > &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
virtual Point< dim > unit_support_point(const unsigned int index) const override
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) const override
std::vector< std::pair< std::unique_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::string get_name() const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual const FiniteElement< dim, spacedim > & get_sub_fe(const unsigned int first_component, const unsigned int n_selected_components) const override
FESystem(const FiniteElement< dim, spacedim > &fe1, const unsigned int n1, const FiniteElement< dim, spacedim > &fe2, const unsigned int n2, const FiniteElement< dim, spacedim > &fe3, const unsigned int n3)
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
FESystem(FEPairs &&... fe_pairs)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
FESystem(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
static const unsigned int invalid_face_number
virtual bool hp_constraints_are_implemented() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
FESystem(const FiniteElement< dim, spacedim > &fe1, const unsigned int n1, const FiniteElement< dim, spacedim > &fe2, const unsigned int n2, const FiniteElement< dim, spacedim > &fe3, const unsigned int n3, const FiniteElement< dim, spacedim > &fe4, const unsigned int n4, const FiniteElement< dim, spacedim > &fe5, const unsigned int n5)
void build_interface_constraints()
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const override
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const ::internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
void initialize(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &dof_values) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_object_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
FESystem(const FiniteElement< dim, spacedim > &fe1, const unsigned int n1, const FiniteElement< dim, spacedim > &fe2, const unsigned int n2, const FiniteElement< dim, spacedim > &fe3, const unsigned int n3, const FiniteElement< dim, spacedim > &fe4, const unsigned int n4)
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
FESystem(const FiniteElement< dim, spacedim > &fe, const unsigned int n_elements)
std::vector< std::vector< std::size_t > > generalized_support_points_index_table
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
FESystem(FESystem< dim, spacedim > &&other_fe_system) noexcept
virtual std::size_t memory_consumption() const override
virtual ~FESystem() override=default
FESystem(const FiniteElement< dim, spacedim > &fe1, const unsigned int n1, const FiniteElement< dim, spacedim > &fe2, const unsigned int n2)
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
unsigned int n_base_elements() const
friend class InternalDataBase
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
@ matrix
Contents is actually a matrix.
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
static const unsigned int invalid_unsigned_int