19 #include <deal.II/base/config.h> 21 #include <deal.II/fe/block_mask.h> 22 #include <deal.II/fe/component_mask.h> 23 #include <deal.II/fe/fe_base.h> 24 #include <deal.II/fe/fe_update_flags.h> 25 #include <deal.II/fe/fe_values_extractors.h> 26 #include <deal.II/fe/mapping.h> 28 #include <deal.II/lac/full_matrix.h> 33 DEAL_II_NAMESPACE_OPEN
35 template <
int dim,
int spacedim>
37 template <
int dim,
int spacedim>
39 template <
int dim,
int spacedim>
41 template <
int dim,
int spacedim>
43 template <
int dim,
int spacedim>
647 template <
int dim,
int spacedim = dim>
795 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>
796 operator^(
const unsigned int multiplicity)
const;
809 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
847 operator[](
const unsigned int fe_index)
const;
886 const unsigned int component)
const;
921 const unsigned int component)
const;
956 const unsigned int component)
const;
991 const unsigned int component)
const;
1026 const unsigned int component)
const;
1039 const unsigned int face_index)
const;
1209 constraints(const ::internal::SubfaceCase<dim> &subface_case =
1229 const ::internal::SubfaceCase<dim> &subface_case =
1309 const unsigned int subface,
1334 virtual std::vector<std::pair<unsigned int, unsigned int>>
1341 virtual std::vector<std::pair<unsigned int, unsigned int>>
1348 virtual std::vector<std::pair<unsigned int, unsigned int>>
1383 const unsigned int codim = 0)
const;
1462 std::pair<unsigned int, unsigned int>
1476 const unsigned int index)
const;
1487 std::pair<unsigned int, unsigned int>
1500 const bool face_orientation,
1501 const bool face_flip,
1502 const bool face_rotation)
const;
1558 virtual unsigned int 1560 const unsigned int face,
1561 const bool face_orientation =
true,
1562 const bool face_flip =
false,
1563 const bool face_rotation =
false)
const;
1574 const bool line_orientation)
const;
1746 get_sub_fe(
const unsigned int first_component,
1747 const unsigned int n_selected_components)
const;
1771 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1782 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1804 std::pair<unsigned int, unsigned int>
1812 std::pair<unsigned int, unsigned int>
1818 std::pair<unsigned int, types::global_dof_index>
2000 virtual std::pair<Table<2, bool>, std::vector<unsigned int>>
2040 const std::vector<Point<dim>> &
2104 const std::vector<
Point<dim - 1>> &
2122 virtual Point<dim - 1>
2137 const std::vector<Point<dim>> &
2161 const std::vector<
Point<dim - 1>> &
2307 std::vector<double> & nodal_values)
const;
2329 <<
"The shape function with index " << arg1
2330 <<
" is not primitive, i.e. it is vector-valued and " 2331 <<
"has more than one non-zero vector component. This " 2332 <<
"function cannot be called for these shape functions. " 2333 <<
"Maybe you want to use the same function with the " 2334 <<
"_component suffix?");
2348 "You are trying to access the values or derivatives of shape functions " 2349 "on the reference cell of an element that does not define its shape " 2350 "functions through mapping from the reference cell. Consequently, " 2351 "you cannot ask for shape function values or derivatives on the " 2361 "You are trying to access the support points of a finite " 2362 "element that either has no support points at all, or for " 2363 "which the corresponding tables have not been implemented.");
2372 "You are trying to access the matrices that describe how " 2373 "to embed a finite element function on one cell into the " 2374 "finite element space on one of its children (i.e., the " 2375 "'embedding' or 'prolongation' matrices). However, the " 2376 "current finite element can either not define this sort of " 2377 "operation, or it has not yet been implemented.");
2387 "You are trying to access the matrices that describe how " 2388 "to restrict a finite element function from the children " 2389 "of one cell to the finite element space defined on their " 2390 "parent (i.e., the 'restriction' or 'projection' matrices). " 2391 "However, the current finite element can either not define " 2392 "this sort of operation, or it has not yet been " 2402 <<
"The interface matrix has a size of " << arg1 <<
"x" << arg2
2403 <<
", which is not reasonable for the current element " 2404 "in the present dimension.");
2427 const bool isotropic_restriction_only =
false,
2428 const bool isotropic_prolongation_only =
false);
2547 std::vector<std::pair<unsigned int, unsigned int>>
2566 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>>
2572 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>>
2601 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>>
2655 static std::vector<unsigned int>
2758 virtual std::unique_ptr<InternalDataBase>
2763 FiniteElementRelatedData<dim, spacedim> &output_data)
const = 0;
2806 virtual std::unique_ptr<InternalDataBase>
2811 FiniteElementRelatedData<dim, spacedim> &output_data)
const;
2854 virtual std::unique_ptr<InternalDataBase>
2861 &output_data)
const;
2950 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
2953 const InternalDataBase &fe_internal,
2956 &output_data)
const = 0;
3003 const unsigned int face_no,
3007 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3010 const InternalDataBase &fe_internal,
3013 &output_data)
const = 0;
3063 const unsigned int face_no,
3064 const unsigned int sub_no,
3068 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
3071 const InternalDataBase &fe_internal,
3074 &output_data)
const = 0;
3076 friend class InternalDataBase;
3078 friend class FEValues<dim, spacedim>;
3081 friend class FESystem<dim, spacedim>;
3085 #ifndef DEAL_II_MSVC 3086 static_assert(dim <= spacedim,
3087 "The dimension <dim> of a FiniteElement must be less than or " 3088 "equal to the space dimension <spacedim> in which it lives.");
3096 template <
int dim,
int spacedim>
3102 ExcMessage(
"A fe_index of zero is the only index allowed here"));
3108 template <
int dim,
int spacedim>
3109 inline std::pair<unsigned int, unsigned int>
3111 const unsigned int index)
const 3123 template <
int dim,
int spacedim>
3132 template <
int dim,
int spacedim>
3135 const unsigned int index)
const 3142 template <
int dim,
int spacedim>
3145 const unsigned int component,
3146 const unsigned int index)
const 3149 const std::vector<std::pair<unsigned int, unsigned int>>::const_iterator it =
3152 std::pair<unsigned int, unsigned int>(component, index));
3155 ExcMessage(
"You are asking for the number of the shape function " 3156 "within a system element that corresponds to vector " 3159 " and within this to " 3163 "shape function exists."));
3169 template <
int dim,
int spacedim>
3170 inline std::pair<unsigned int, unsigned int>
3172 const unsigned int index)
const 3199 template <
int dim,
int spacedim>
3200 inline std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
3202 const unsigned int index)
const 3211 template <
int dim,
int spacedim>
3212 inline std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
3214 const unsigned int index)
const 3223 template <
int dim,
int spacedim>
3226 const unsigned int index)
const 3233 template <
int dim,
int spacedim>
3234 inline std::pair<unsigned int, unsigned int>
3236 const unsigned int index)
const 3246 template <
int dim,
int spacedim>
3247 inline std::pair<unsigned int, unsigned int>
3249 const unsigned int index)
const 3256 template <
int dim,
int spacedim>
3257 inline std::pair<unsigned int, types::global_dof_index>
3259 const unsigned int index)
const 3266 return std::pair<unsigned int, types::global_dof_index>(
3274 template <
int dim,
int spacedim>
3277 const unsigned int index)
const 3286 template <
int dim,
int spacedim>
3296 template <
int dim,
int spacedim>
3306 template <
int dim,
int spacedim>
3315 template <
int dim,
int spacedim>
3338 template <
int dim,
int spacedim>
3341 const unsigned int cell_dof_index)
const 3360 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcFEHasNoSupportPoints()
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 InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
const unsigned int first_hex_index
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const =0
BlockMask block_mask(const FEValuesExtractors::Scalar &scalar) const
bool restriction_is_additive(const unsigned int index) const
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
std::vector< std::vector< FullMatrix< double > > > restriction
#define DeclException2(Exception2, type1, type2, outsequence)
virtual std::size_t memory_consumption() const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
virtual bool operator==(const FiniteElement< dim, spacedim > &fe) const
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index) const
std::vector< Point< dim > > generalized_support_points
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const
FullMatrix< double > interface_constraints
bool operator!=(const FiniteElement< dim, spacedim > &) const
unsigned int n_nonzero_components(const unsigned int i) const
FiniteElement(const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
const FiniteElement< dim, spacedim > & get_sub_fe(const ComponentMask &mask) const
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const
static ::ExceptionBase & ExcUnitShapeValuesDoNotExist()
virtual Point< dim > unit_support_point(const unsigned int index) const
const std::vector< Point< dim - 1 > > & get_unit_face_support_points() const
bool restriction_is_implemented() const
const std::vector< Point< dim > > & get_generalized_support_points() const
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
#define AssertIndexRange(index, range)
virtual ~InternalDataBase()=default
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
bool isotropic_prolongation_is_implemented() const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
bool has_generalized_support_points() const
std::vector< Point< dim - 1 > > unit_face_support_points
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const =0
static std::vector< unsigned int > compute_n_nonzero_components(const std::vector< ComponentMask > &nonzero_components)
size_type block_size(const unsigned int i) const
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
bool is_primitive() const
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
static ::ExceptionBase & ExcInterpolationNotImplemented()
std::vector< Point< dim - 1 > > generalized_face_support_points
const std::vector< unsigned int > n_nonzero_components_table
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
bool has_face_support_points() const
std::vector< Point< dim > > unit_support_points
bool has_support_points() const
virtual std::unique_ptr< 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
unsigned int component_to_block_index(const unsigned int component) const
static ::ExceptionBase & ExcFENotPrimitive()
static ::ExceptionBase & ExcMessage(std::string arg1)
const FullMatrix< double > & constraints(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const unsigned int first_quad_index
virtual std::size_t memory_consumption() const
#define DeclException1(Exception1, type1, outsequence)
std::vector< std::vector< FullMatrix< double > > > prolongation
std::pair< unsigned int, unsigned int > component_to_base_index(const unsigned int component) const
#define Assert(cond, exc)
unsigned int element_multiplicity(const unsigned int index) const
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim, spacedim > &fe_other) const final
Abstract base class for mapping classes.
GeometryPrimitive get_associated_geometry_primitive(const unsigned int cell_dof_index) const
const ComponentMask & get_nonzero_components(const unsigned int i) const
#define DeclExceptionMsg(Exception, defaulttext)
#define DeclException0(Exception0)
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
bool constraints_are_implemented(const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
static ::ExceptionBase & ExcWrongInterfaceMatrixSize(int arg1, int arg2)
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index) const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_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 InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
virtual std::string get_name() const =0
static ::ExceptionBase & ExcProjectionVoid()
bool has_generalized_face_support_points() const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
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
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &nodal_values) const
const unsigned int dofs_per_cell
static ::ExceptionBase & ExcShapeFunctionNotPrimitive(int arg1)
types::global_dof_index first_block_of_base(const unsigned int b) const
unsigned int adjust_line_dof_index_for_line_orientation(const unsigned int index, const bool line_orientation) const
const std::vector< Point< dim > > & get_unit_support_points() const
unsigned int global_dof_index
unsigned int component_to_system_index(const unsigned int component, const unsigned int index) const
virtual std::unique_ptr< 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
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Table< 2, int > adjust_quad_dof_index_for_face_orientation_table
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const
const FiniteElement< dim, spacedim > & operator[](const unsigned int fe_index) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index) const
static ::ExceptionBase & ExcEmbeddingVoid()
virtual double shape_value(const unsigned int i, const Point< dim > &p) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
virtual bool hp_constraints_are_implemented() const
size_type block_start(const unsigned int i) const
bool prolongation_is_implemented() const
const unsigned int first_line_index
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
const bool cached_primitivity
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const
const std::vector< ComponentMask > nonzero_components
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
std::vector< std::pair< unsigned int, unsigned int > > face_system_to_component_table
virtual ~FiniteElement() override=default
bool isotropic_restriction_is_implemented() const
BlockIndices base_to_block_indices
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > face_system_to_base_table
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const
unsigned int n_base_elements() const
unsigned int size() const
static const unsigned int space_dimension
unsigned int adjust_quad_dof_index_for_face_orientation(const unsigned int index, const bool face_orientation, const bool face_flip, const bool face_rotation) const
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 InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
std::vector< int > adjust_line_dof_index_for_line_orientation_table
TableIndices< 2 > interface_constraints_size() const
std::pair< unsigned int, size_type > global_to_local(const size_type i) const
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
const std::vector< bool > restriction_is_additive_flags
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > operator^(const unsigned int multiplicity) const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
virtual std::unique_ptr< InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
const std::vector< Point< dim - 1 > > & get_generalized_face_support_points() const