16 #ifndef dealii_fe_system_h 17 # define dealii_fe_system_h 23 # include <deal.II/base/config.h> 25 # include <deal.II/base/thread_management.h> 27 # include <deal.II/fe/fe.h> 28 # include <deal.II/fe/fe_tools.h> 31 # include <type_traits> 36 DEAL_II_NAMESPACE_OPEN
38 template <
int dim,
int spacedim>
169 template <
int dim,
int spacedim = dim>
204 const unsigned int n_elements);
213 const unsigned int n1,
215 const unsigned int n2);
224 const unsigned int n1,
226 const unsigned int n2,
228 const unsigned int n3);
237 const unsigned int n1,
239 const unsigned int n2,
241 const unsigned int n3,
243 const unsigned int n4);
252 const unsigned int n1,
254 const unsigned int n2,
256 const unsigned int n3,
258 const unsigned int n4,
260 const unsigned int n5);
448 const std::vector<unsigned int> &multiplicities);
450 # if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900 495 typename =
typename enable_if_all<
496 (std::is_same<typename std::decay<FEPairs>::type,
497 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
498 unsigned int>>::value ||
499 std::is_base_of<FiniteElement<dim, spacedim>,
500 typename std::decay<FEPairs>::type>::value)...>::type>
516 const std::initializer_list<
548 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
549 clone()
const override;
561 get_sub_fe(
const unsigned int first_component,
562 const unsigned int n_selected_components)
const override;
590 const unsigned int component)
const override;
620 const unsigned int component)
const override;
650 const unsigned int component)
const override;
681 const unsigned int component)
const override;
712 const unsigned int component)
const override;
744 const unsigned int face_index)
const override;
771 const unsigned int child,
804 const unsigned int child,
848 const unsigned int face,
849 const bool face_orientation =
true,
850 const bool face_flip =
false,
851 const bool face_rotation =
false)
const override;
862 virtual Point<dim - 1>
872 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
921 const unsigned int subface,
939 virtual std::vector<std::pair<unsigned int, unsigned int>>
947 virtual std::vector<std::pair<unsigned int, unsigned int>>
955 virtual std::vector<std::pair<unsigned int, unsigned int>>
964 const unsigned int codim = 0) const override final;
984 const
std::vector<
Vector<
double>> &support_point_values,
985 std::vector<
double> & dof_values) const override;
999 virtual
std::unique_ptr<
1003 const
Mapping<dim, spacedim> &mapping,
1005 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1007 &output_data) const override;
1009 virtual
std::unique_ptr<
1013 const
Mapping<dim, spacedim> &mapping,
1015 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1017 &output_data) const override;
1019 virtual
std::unique_ptr<
1023 const
Mapping<dim, spacedim> &mapping,
1025 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1027 &output_data) const override;
1031 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1034 const
Mapping<dim, spacedim> & mapping,
1035 const typename
Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1036 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1039 const typename
FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
1040 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1042 &output_data) const override;
1045 fill_fe_face_values(
1046 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1047 const
unsigned int face_no,
1049 const
Mapping<dim, spacedim> & mapping,
1050 const typename
Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1051 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1054 const typename
FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
1055 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1057 &output_data) const override;
1060 fill_fe_subface_values(
1061 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1062 const
unsigned int face_no,
1063 const
unsigned int sub_no,
1065 const
Mapping<dim, spacedim> & mapping,
1066 const typename
Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1067 const ::
internal::FEValuesImplementation::MappingRelatedData<dim,
1070 const typename
FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
1071 ::
internal::FEValuesImplementation::FiniteElementRelatedData<dim,
1073 &output_data) const override;
1085 template <
int dim_1>
1088 const
Mapping<dim, spacedim> & mapping,
1089 const typename
Triangulation<dim, spacedim>::cell_iterator &cell,
1090 const
unsigned int face_no,
1091 const
unsigned int sub_no,
1094 const typename
Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
1095 const typename
FiniteElement<dim, spacedim>::InternalDataBase &fe_data,
1096 const
internal::FEValuesImplementation::MappingRelatedData<dim, spacedim>
1098 internal::FEValuesImplementation::FiniteElementRelatedData<dim, spacedim>
1099 &output_data) const;
1139 const
std::vector<
unsigned int> &multiplicities);
1152 template <
int structdim>
1153 std::vector<
std::pair<
unsigned int,
unsigned int>>
1183 const unsigned int base_no,
1191 get_fe_data(
const unsigned int base_no)
const;
1199 get_fe_output_object(
const unsigned int base_no)
const;
1212 typename std::vector<
1213 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
1224 mutable std::vector<
1242 namespace FESystemImplementation
1244 template <
int dim,
int spacedim>
1247 const std::initializer_list<
1251 return std::count_if(
1254 [](
const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1255 unsigned int> &fe_system) {
1256 return fe_system.second > 0;
1262 template <
int dim,
int spacedim>
1263 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>
1266 return std::make_pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1267 unsigned int>(std::move(fe.
clone()), 1u);
1272 template <
int dim,
int spacedim>
1280 return std::forward<
1281 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>(
1289 # if !defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 1900 1294 template <
int dim,
int spacedim>
1295 template <
class... FEPairs,
typename>
1298 {internal::FESystemImplementation::promote_to_fe_pair<dim, spacedim>(
1299 std::forward<FEPairs>(fe_pairs))...})
1304 template <
int dim,
int spacedim>
1306 const std::initializer_list<
1318 std::vector<const FiniteElement<dim, spacedim> *> fes;
1319 std::vector<unsigned int> multiplicities;
1322 [&fes, &multiplicities](
1323 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1324 unsigned int> &fe_system) {
1325 fes.push_back(fe_system.first.get());
1326 multiplicities.push_back(fe_system.second);
1329 for (
const auto &p : fe_systems)
1338 DEAL_II_NAMESPACE_CLOSE
virtual std::size_t memory_consumption() const override
virtual Point< dim > unit_support_point(const unsigned int index) const override
std::vector< internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > > base_fe_output_objects
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
void build_interface_constraints()
void initialize(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities)
virtual std::string get_name() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_object_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
virtual Tensor< 4, dim > shape_4th_derivative(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
virtual ~FESystem() override=default
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
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
virtual double shape_value(const unsigned int i, const Point< dim > &p) 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
virtual const FiniteElement< dim, spacedim > & get_sub_fe(const unsigned int first_component, const unsigned int n_selected_components) const override
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
LinearAlgebra::distributed::Vector< Number > Vector
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
std::vector< std::vector< std::size_t > > generalized_support_points_index_table
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
static const unsigned int invalid_face_number
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
Abstract base class for mapping classes.
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 Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
virtual bool hp_constraints_are_implemented() const override
std::vector< std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > > base_fe_datas
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
FESystem(const FiniteElement< dim, spacedim > &fe, const unsigned int n_elements)
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 Quadrature< 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 Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
unsigned int n_base_elements() 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
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_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::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::vector< std::pair< std::unique_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index) const override