16#ifndef dealii_fe_system_h
17#define dealii_fe_system_h
33template <
int dim,
int spacedim>
207template <
int dim,
int spacedim = dim>
248 const unsigned int n_elements);
257 const unsigned int n1,
259 const unsigned int n2);
268 const unsigned int n1,
270 const unsigned int n2,
272 const unsigned int n3);
281 const unsigned int n1,
283 const unsigned int n2,
285 const unsigned int n3,
287 const unsigned int n4);
296 const unsigned int n1,
298 const unsigned int n2,
300 const unsigned int n3,
302 const unsigned int n4,
304 const unsigned int n5);
492 const std::vector<unsigned int> &multiplicities);
494#if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
540 (std::is_same<typename std::decay<FEPairs>::type,
541 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
542 unsigned int>>::value ||
543 std::is_base_of<FiniteElement<dim, spacedim>,
544 typename std::decay<FEPairs>::type>::value)...>::type>
560 const std::initializer_list<
579 std::move(other_fe_system.generalized_support_points_index_table);
598 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
612 const unsigned int n_selected_components)
const override;
640 const unsigned int component)
const override;
670 const unsigned int component)
const override;
700 const unsigned int component)
const override;
731 const unsigned int component)
const override;
762 const unsigned int component)
const override;
794 const unsigned int face_index)
const override;
821 const unsigned int child,
854 const unsigned int child,
898 const unsigned int face,
899 const bool face_orientation =
true,
900 const bool face_flip =
false,
901 const bool face_rotation =
false)
const override;
912 virtual Point<dim - 1>
914 const unsigned int face_no = 0)
const override;
923 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
956 const unsigned int face_no = 0)
const override;
974 const unsigned int subface,
976 const unsigned int face_no = 0)
const override;
993 virtual std::vector<std::pair<unsigned int, unsigned int>>
1001 virtual std::vector<std::pair<unsigned int, unsigned int>>
1009 virtual std::vector<std::pair<unsigned int, unsigned int>>
1011 const unsigned int face_no = 0)
const override;
1018 const unsigned int codim = 0) const override final;
1038 const
std::vector<
Vector<
double>> &support_point_values,
1039 std::vector<
double> & dof_values) const override;
1086 virtual std::unique_ptr<
1094 &output_data)
const override;
1098 virtual std::unique_ptr<
1106 &output_data)
const override;
1108 virtual std::unique_ptr<
1116 &output_data)
const override;
1125 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1131 &output_data)
const override;
1138 const unsigned int face_no,
1142 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1148 &output_data)
const override;
1153 const unsigned int face_no,
1154 const unsigned int sub_no,
1158 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1164 &output_data)
const override;
1176 template <
class Q_or_QC>
1181 const unsigned int face_no,
1182 const unsigned int sub_no,
1183 const Q_or_QC & quadrature,
1190 &output_data)
const;
1221 std::vector<std::pair<std::unique_ptr<const FiniteElement<dim, spacedim>>,
1246 const std::vector<unsigned int> &multiplicities);
1259 template <
int structdim>
1260 std::vector<std::pair<unsigned int, unsigned int>>
1262 const unsigned int face_no = 0)
const;
1291 const unsigned int base_no,
1320 typename std::vector<
1321 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
1332 mutable std::vector<
1350 namespace FESystemImplementation
1352 template <
int dim,
int spacedim>
1355 const std::initializer_list<
1359 return std::count_if(
1363 unsigned int> &fe_system) {
1364 return fe_system.second > 0;
1370 template <
int dim,
int spacedim>
1371 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>
1374 return std::make_pair(std::move(fe.
clone()), 1u);
1379 template <
int dim,
int spacedim>
1384 std::forward<std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1387 return std::forward<
1388 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>(
1396# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
1401template <
int dim,
int spacedim>
1402template <
class... FEPairs,
typename>
1405 {internal::FESystemImplementation::promote_to_fe_pair<dim, spacedim>(
1406 std::forward<FEPairs>(fe_pairs))...})
1411template <
int dim,
int spacedim>
1413 const std::initializer_list<
1423 , base_elements(
internal::FESystemImplementation::count_nonzeros(fe_systems))
1425 std::vector<const FiniteElement<dim, spacedim> *> fes;
1426 std::vector<unsigned int> multiplicities;
1429 [&fes, &multiplicities](
1430 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1431 unsigned int> &fe_system) {
1432 fes.push_back(fe_system.first.get());
1433 multiplicities.push_back(fe_system.second);
1436 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
FESystem(FEPairs &&...fe_pairs)
virtual Point< dim > unit_support_point(const unsigned int index) const override
std::vector< std::vector< BaseOffsets > > nonprimitive_offset_tables
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
std::vector< Table< 2, unsigned int > > primitive_offset_tables
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
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
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 Q_or_QC &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 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
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
static const unsigned int invalid_unsigned_int
unsigned int n_nonzero_components