15#ifndef dealii_fe_system_h
16#define dealii_fe_system_h
32template <
int dim,
int spacedim>
206template <
int dim,
int spacedim = dim>
247 const unsigned int n_elements);
256 const unsigned int n1,
258 const unsigned int n2);
267 const unsigned int n1,
269 const unsigned int n2,
271 const unsigned int n3);
280 const unsigned int n1,
282 const unsigned int n2,
284 const unsigned int n3,
286 const unsigned int n4);
295 const unsigned int n1,
297 const unsigned int n2,
299 const unsigned int n3,
301 const unsigned int n4,
303 const unsigned int n5);
491 const std::vector<unsigned int> &multiplicities);
493#if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
539 (std::is_same_v<std::decay_t<FEPairs>,
540 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
542 std::is_base_of_v<FiniteElement<dim, spacedim>,
543 std::decay_t<FEPairs>>)...>>
559 const std::initializer_list<
577 std::move(other_fe_system.generalized_support_points_index_table))
596 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
610 const unsigned int n_selected_components)
const override;
638 const unsigned int component)
const override;
668 const unsigned int component)
const override;
699 const unsigned int component)
const override;
730 const unsigned int component)
const override;
761 const unsigned int component)
const override;
793 const unsigned int face_index)
const override;
820 const unsigned int child,
853 const unsigned int child,
890 const unsigned int face_dof_index,
891 const unsigned int face,
892 const unsigned char combined_orientation =
904 virtual Point<dim - 1>
906 const unsigned int face_no = 0)
const override;
915 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
948 const unsigned int face_no = 0)
const override;
966 const unsigned int subface,
968 const unsigned int face_no = 0)
const override;
985 virtual std::vector<std::pair<unsigned int, unsigned int>>
993 virtual std::vector<std::pair<unsigned int, unsigned int>>
1001 virtual std::vector<std::pair<unsigned int, unsigned int>>
1003 const unsigned int face_no = 0)
const override;
1010 const unsigned int codim = 0) const override final;
1030 const
std::vector<
Vector<
double>> &support_point_values,
1031 std::vector<
double> &dof_values) const override;
1078 virtual std::unique_ptr<
1086 &output_data)
const override;
1090 virtual std::unique_ptr<
1098 &output_data)
const override;
1100 virtual std::unique_ptr<
1108 &output_data)
const override;
1122 &output_data)
const override;
1129 const unsigned int face_no,
1138 &output_data)
const override;
1143 const unsigned int face_no,
1144 const unsigned int sub_no,
1153 &output_data)
const override;
1165 template <
class Q_or_QC>
1170 const unsigned int face_no,
1171 const unsigned int sub_no,
1172 const Q_or_QC &quadrature,
1179 &output_data)
const;
1210 std::vector<std::pair<std::unique_ptr<const FiniteElement<dim, spacedim>>,
1235 const std::vector<unsigned int> &multiplicities);
1248 template <
int structdim>
1249 std::vector<std::pair<unsigned int, unsigned int>>
1251 const unsigned int face_no = 0)
const;
1280 const unsigned int base_no,
1309 typename std::vector<
1310 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
1321 mutable std::vector<
1341 namespace FESystemImplementation
1343 template <
int dim,
int spacedim>
1346 const std::initializer_list<
1350 return std::count_if(
1354 unsigned int> &fe_system) {
1355 return fe_system.second > 0;
1361 template <
int dim,
int spacedim>
1362 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>
1365 return std::make_pair(std::move(fe.
clone()), 1u);
1370 template <
int dim,
int spacedim>
1374 ->
decltype(std::forward<
1375 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1378 return std::forward<
1379 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>(
1387# if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900
1392template <
int dim,
int spacedim>
1393template <
class... FEPairs,
typename>
1396 {internal::FESystemImplementation::promote_to_fe_pair<dim, spacedim>(
1397 std::forward<FEPairs>(fe_pairs))...})
1402template <
int dim,
int spacedim>
1404 const std::initializer_list<
1414 , base_elements(
internal::FESystemImplementation::count_nonzeros(fe_systems))
1416 std::vector<const FiniteElement<dim, spacedim> *> fes;
1417 std::vector<unsigned int> multiplicities;
1420 [&fes, &multiplicities](
1421 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1422 unsigned int> &fe_system) {
1423 fes.push_back(fe_system.first.get());
1424 multiplicities.push_back(fe_system.second);
1427 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
std::mutex restriction_matrix_mutex
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 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< 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
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 unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const unsigned char combined_orientation=ReferenceCell::default_combined_face_orientation()) const override
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) 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 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
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
std::mutex prolongation_matrix_mutex
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.
static constexpr unsigned char default_combined_face_orientation()
#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
typename enable_if_all< Values... >::type enable_if_all_t