deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members

#include <deal.II/fe/fe_system.h>

Inheritance diagram for FESystem< dim, spacedim >:
Inheritance graph
[legend]

Classes

struct  BaseOffsets
 
class  InternalData
 

Public Types

enum  Conformity {
  unknown = 0x00 , L2 = 0x01 , Hcurl = 0x02 , Hdiv = 0x04 ,
  H1 = Hcurl | Hdiv , H2 = 0x0e
}
 

Public Member Functions

 FESystem ()=delete
 
 FESystem (const FiniteElement< dim, spacedim > &fe, const unsigned int n_elements)
 
 FESystem (const FiniteElement< dim, spacedim > &fe1, const unsigned int n1, const FiniteElement< dim, spacedim > &fe2, const unsigned int n2)
 
 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)
 
 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)
 
 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)
 
 FESystem (const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
 
template<class... FEPairs, typename = enable_if_all_t< (std::is_same_v<std::decay_t<FEPairs>, std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>> || std::is_base_of_v<FiniteElement<dim, spacedim>, std::decay_t<FEPairs>>)...>>
 FESystem (FEPairs &&...fe_pairs)
 
 FESystem (const std::initializer_list< std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > > &fe_systems)
 
 FESystem (const FESystem< dim, spacedim > &)=delete
 
 FESystem (FESystem< dim, spacedim > &&other_fe_system) noexcept
 
virtual ~FESystem () override=default
 
virtual std::string get_name () const override
 
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone () const override
 
virtual UpdateFlags requires_update_flags (const UpdateFlags update_flags) const override
 
virtual const FiniteElement< dim, spacedim > & get_sub_fe (const unsigned int first_component, const unsigned int n_selected_components) const override
 
virtual double shape_value (const unsigned int i, const Point< dim > &p) const override
 
virtual double shape_value_component (const unsigned int i, const Point< dim > &p, const unsigned int component) const override
 
virtual Tensor< 1, dim > shape_grad (const unsigned int i, const Point< dim > &p) const override
 
virtual Tensor< 1, dim > shape_grad_component (const unsigned int i, const Point< dim > &p, const unsigned int component) const override
 
virtual Tensor< 2, dim > shape_grad_grad (const unsigned int i, const Point< dim > &p) 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 Tensor< 3, dim > shape_3rd_derivative (const unsigned int i, const Point< dim > &p) 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 Tensor< 4, dim > shape_4th_derivative (const unsigned int i, const Point< dim > &p) const override
 
virtual Tensor< 4, dim > shape_4th_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 FiniteElement< dim, spacedim > & base_element (const unsigned int index) const override
 
virtual bool has_support_on_face (const unsigned int shape_index, const unsigned int face_index) 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 const FullMatrix< double > & get_prolongation_matrix (const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) 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 > unit_support_point (const unsigned int index) const override
 
virtual Point< dim - 1 > unit_face_support_point (const unsigned int index, const unsigned int face_no=0) const override
 
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes () const override
 
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 std::size_t memory_consumption () const override
 
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned intoperator^ (const unsigned int multiplicity) const
 
virtual bool operator== (const FiniteElement< dim, spacedim > &fe) const
 
bool operator== (const FiniteElementData &) const
 
bool operator!= (const FiniteElement< dim, spacedim > &) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
ReferenceCell reference_cell () const
 
unsigned int n_unique_2d_subobjects () const
 
unsigned int n_unique_faces () const
 
unsigned int n_dofs_per_vertex () const
 
unsigned int n_dofs_per_line () const
 
unsigned int n_dofs_per_quad (unsigned int face_no=0) const
 
unsigned int max_dofs_per_quad () const
 
unsigned int n_dofs_per_hex () const
 
unsigned int n_dofs_per_face (unsigned int face_no=0, unsigned int child=0) const
 
unsigned int max_dofs_per_face () const
 
unsigned int n_dofs_per_cell () const
 
template<int structdim>
unsigned int n_dofs_per_object (const unsigned int i=0) const
 
unsigned int n_components () const
 
unsigned int n_blocks () const
 
const BlockIndicesblock_indices () const
 
unsigned int tensor_degree () const
 
bool conforms (const Conformity) const
 
unsigned int get_first_line_index () const
 
unsigned int get_first_quad_index (const unsigned int quad_no=0) const
 
unsigned int get_first_hex_index () const
 
unsigned int get_first_face_line_index (const unsigned int face_no=0) const
 
unsigned int get_first_face_quad_index (const unsigned int face_no=0) const
 
Functions to support hp
virtual bool hp_constraints_are_implemented () const override
 
virtual void get_face_interpolation_matrix (const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
 
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 std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities (const FiniteElement< dim, spacedim > &fe_other) const override
 
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities (const FiniteElement< dim, spacedim > &fe_other) 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
 
virtual FiniteElementDomination::Domination compare_for_domination (const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
 
Transfer and constraint matrices
bool prolongation_is_implemented () const
 
bool isotropic_prolongation_is_implemented () const
 
bool restriction_is_implemented () const
 
bool isotropic_restriction_is_implemented () const
 
bool restriction_is_additive (const unsigned int index) const
 
const FullMatrix< double > & constraints (const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
 
bool constraints_are_implemented (const ::internal::SubfaceCase< dim > &subface_case=::internal::SubfaceCase< dim >::case_isotropic) const
 
Index computations
std::pair< unsigned int, unsigned intsystem_to_component_index (const unsigned int index) const
 
unsigned int component_to_system_index (const unsigned int component, const unsigned int index) const
 
std::pair< unsigned int, unsigned intface_system_to_component_index (const unsigned int index, const unsigned int face_no=0) const
 
unsigned int adjust_quad_dof_index_for_face_orientation (const unsigned int index, const unsigned int face_no, const unsigned char combined_orientation) const
 
unsigned int adjust_line_dof_index_for_line_orientation (const unsigned int index, const unsigned char combined_orientation) const
 
const ComponentMaskget_nonzero_components (const unsigned int i) const
 
unsigned int n_nonzero_components (const unsigned int i) const
 
bool is_primitive () const
 
bool is_primitive (const unsigned int i) const
 
virtual const Table< 2, bool > & get_local_dof_sparsity_pattern () const
 
unsigned int n_base_elements () const
 
unsigned int element_multiplicity (const unsigned int index) const
 
const FiniteElement< dim, spacedim > & get_sub_fe (const ComponentMask &mask) const
 
std::pair< std::pair< unsigned int, unsigned int >, unsigned intsystem_to_base_index (const unsigned int index) const
 
std::pair< std::pair< unsigned int, unsigned int >, unsigned intface_system_to_base_index (const unsigned int index, const unsigned int face_no=0) const
 
types::global_dof_index first_block_of_base (const unsigned int b) const
 
std::pair< unsigned int, unsigned intcomponent_to_base_index (const unsigned int component) const
 
std::pair< unsigned int, unsigned intblock_to_base_index (const unsigned int block) const
 
std::pair< unsigned int, types::global_dof_indexsystem_to_block_index (const unsigned int component) const
 
unsigned int component_to_block_index (const unsigned int component) const
 
Component and block matrices
ComponentMask component_mask (const FEValuesExtractors::Scalar &scalar) const
 
ComponentMask component_mask (const FEValuesExtractors::Vector &vector) const
 
ComponentMask component_mask (const FEValuesExtractors::SymmetricTensor< 2 > &sym_tensor) const
 
ComponentMask component_mask (const BlockMask &block_mask) const
 
BlockMask block_mask (const FEValuesExtractors::Scalar &scalar) const
 
BlockMask block_mask (const FEValuesExtractors::Vector &vector) const
 
BlockMask block_mask (const FEValuesExtractors::SymmetricTensor< 2 > &sym_tensor) const
 
BlockMask block_mask (const ComponentMask &component_mask) const
 
Support points and interpolation
const std::vector< Point< dim > > & get_unit_support_points () const
 
bool has_support_points () const
 
const std::vector< Point< dim - 1 > > & get_unit_face_support_points (const unsigned int face_no=0) const
 
bool has_face_support_points (const unsigned int face_no=0) const
 
const std::vector< Point< dim > > & get_generalized_support_points () const
 
bool has_generalized_support_points () const
 
GeometryPrimitive get_associated_geometry_primitive (const unsigned int cell_dof_index) const
 
EnableObserverPointer functionality

Classes derived from EnableObserverPointer provide a facility to subscribe to this object. This is mostly used by the ObserverPointer class.

void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Static Public Member Functions

static ::ExceptionBaseExcShapeFunctionNotPrimitive (int arg1)
 
static ::ExceptionBaseExcFENotPrimitive ()
 
static ::ExceptionBaseExcUnitShapeValuesDoNotExist ()
 
static ::ExceptionBaseExcFEHasNoSupportPoints ()
 
static ::ExceptionBaseExcEmbeddingVoid ()
 
static ::ExceptionBaseExcProjectionVoid ()
 
static ::ExceptionBaseExcWrongInterfaceMatrixSize (int arg1, int arg2)
 
static ::ExceptionBaseExcInterpolationNotImplemented ()
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Public Attributes

const unsigned int dofs_per_vertex
 
const unsigned int dofs_per_line
 
const unsigned int dofs_per_quad
 
const unsigned int dofs_per_hex
 
const unsigned int first_line_index
 
const unsigned int first_quad_index
 
const unsigned int first_hex_index
 
const unsigned int first_face_line_index
 
const unsigned int first_face_quad_index
 
const unsigned int dofs_per_face
 
const unsigned int dofs_per_cell
 
const unsigned int components
 
const unsigned int degree
 
const Conformity conforming_space
 
const BlockIndices block_indices_data
 

Static Public Attributes

static constexpr unsigned int space_dimension = spacedim
 
static constexpr unsigned int dimension = dim
 

Protected Member Functions

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 hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) 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 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 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 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
 
template<class Q_or_QC >
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
 
void reinit_restriction_and_prolongation_matrices (const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
 
TableIndices< 2 > interface_constraints_size () const
 
virtual std::unique_ptr< InternalDataBaseget_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 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
 
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 InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) 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
 
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
 

Static Protected Member Functions

static std::vector< unsigned intcompute_n_nonzero_components (const std::vector< ComponentMask > &nonzero_components)
 

Protected Attributes

std::vector< std::vector< FullMatrix< double > > > restriction
 
std::vector< std::vector< FullMatrix< double > > > prolongation
 
FullMatrix< double > interface_constraints
 
std::vector< Point< dim > > unit_support_points
 
std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points
 
std::vector< Point< dim > > generalized_support_points
 
std::vector< std::vector< Point< dim - 1 > > > generalized_face_support_points
 
std::vector< Table< 2, int > > adjust_quad_dof_index_for_face_orientation_table
 
std::vector< intadjust_line_dof_index_for_line_orientation_table
 
std::vector< std::pair< unsigned int, unsigned int > > system_to_component_table
 
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > face_system_to_component_table
 
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
 
std::vector< std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > > face_system_to_base_table
 
BlockIndices base_to_block_indices
 
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
 
const std::vector< boolrestriction_is_additive_flags
 
const std::vector< ComponentMasknonzero_components
 
const std::vector< unsigned intn_nonzero_components_table
 
const bool cached_primitivity
 
Table< 2, boollocal_dof_sparsity_pattern
 

Private Types

using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 

Private Member Functions

void initialize (const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
 
void build_interface_constraints ()
 
template<int structdim>
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
 
void check_no_subscribers () const noexcept
 

Private Attributes

std::vector< Table< 2, unsigned int > > primitive_offset_tables
 
std::vector< std::vector< BaseOffsets > > nonprimitive_offset_tables
 
std::vector< std::pair< std::unique_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
 
std::vector< std::vector< std::size_t > > generalized_support_points_index_table
 
std::mutex restriction_matrix_mutex
 
std::mutex prolongation_matrix_mutex
 
std::atomic< unsigned intcounter
 
std::map< std::string, unsigned intcounter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 
const ReferenceCell reference_cell_kind
 
const unsigned int number_of_unique_2d_subobjects
 
const unsigned int number_unique_faces
 
const std::vector< unsigned intn_dofs_on_quad
 
const unsigned int dofs_per_quad_max
 
const std::vector< unsigned intfirst_index_of_quads
 
const std::vector< unsigned intfirst_line_index_of_faces
 
const std::vector< unsigned intfirst_quad_index_of_faces
 
const std::vector< unsigned intn_dofs_on_face
 
const unsigned int dofs_per_face_max
 

Static Private Attributes

static const unsigned int invalid_face_number = numbers::invalid_unsigned_int
 
static std::mutex mutex
 

Friends

class FE_Enriched< dim, spacedim >
 

Detailed Description

template<int dim, int spacedim = dim>
class FESystem< dim, spacedim >

This class provides an interface to group several elements together into one, vector-valued element. As example, consider the Taylor-Hood element that is used for the solution of the Stokes and Navier-Stokes equations: There, the velocity (of which there are as many components as the dimension \(d\) of the domain) is discretized with \(Q_2\) elements and the pressure with \(Q_1\) elements. Mathematically, the finite element space for the coupled problem is then often written as \(V_h = Q_2^d \times Q_1\) where the exponentiation is understood to be the tensor product of spaces – i.e., in 2d, we have \(V_h=Q_2\times Q_2\times Q_1\) – and tensor products lead to vectors where each component of the vector-valued function space corresponds to a scalar function in one of the \(Q_2\) or \(Q_1\) spaces. Using the FESystem class, this space is created using

FESystem<dim> taylor_hood_fe (FE_Q<dim>(2)^dim, // velocity components
FE_Q<dim>(1)); // pressure component
Definition fe_q.h:554

The creation of this element here corresponds to taking tensor-product powers of the \(Q_2\) element in the first line of the list of arguments to the FESystem constructor, and then concatenation via another tensor product with the element in the second line. This kind of construction is used, for example, in the step-22 tutorial program.

Similarly, step-8 solves an elasticity equation where we need to solve for the displacement of a solid object. The displacement again has \(d\) components if the domain is \(d\)-dimensional, and so the combined finite element is created using

FESystem<dim> displacement_fe (FE_Q<dim>(1)^dim);

where now each (vector) component of the combined element corresponds to a \(Q_1\) space.

To the outside world, FESystem objects look just like a usual finite element object, they just happen to be composed of several other finite elements that are possibly of different type. These "base elements" can themselves have multiple components and, in particular, could also be vector-valued – for example, if one of the base elements is an FESystem itself (see also below). An example is given in the documentation of namespace FETools::Compositing, when using the "tensor product" strategy.

Vector valued elements are discussed in a number of tutorial programs, for example step-8, step-20, step-21, step-22, and in particular in the Handling vector valued problems topic.

Note
The material presented here is also discussed in video lecture 19, video lecture 20. (All video lectures are also available here.)

FESystem, components and blocks

An FESystem, except in the most trivial case, produces a vector-valued finite element with several components. The number of components n_components() corresponds to the dimension of the solution function in the PDE system, and correspondingly also to the number of equations your PDE system has. For example, the mixed Laplace system covered in step-20 has \(d+1\) components in \(d\) space dimensions: the scalar pressure and the \(d\) components of the velocity vector. Similarly, the elasticity equation covered in step-8 has \(d\) components in \(d\) space dimensions. In general, the number of components of a FESystem element is the accumulated number of components of all base elements times their multiplicities. A bit more on components is also given in the glossary entry on components.

While the concept of components is important from the viewpoint of a partial differential equation, the finite element side looks a bit different Since not only FESystem, but also vector-valued elements like FE_RaviartThomas, have several components. The concept needed here is a block. Each block encompasses the set of degrees of freedom associated with a single base element of an FESystem, where base elements with multiplicities count multiple times. These blocks are usually addressed using the information in DoFHandler::block_info(). The number of blocks of a FESystem object is simply the sum of all multiplicities of base elements and is given by n_blocks().

For example, the FESystem for the Taylor-Hood element for the three-dimensional Stokes problem can be built using the code

const FE_Q<3> u(2);
const FE_Q<3> p(1);
FESystem<3> sys1(u,3, p,1);

or more concisely via

FESystem<3> sys1(FE_Q<3>(2),3,
FE_Q<3>(1),1);

or even shorter (mimicking the mathematical notation that we are dealing with a \(Q_2^3 \times Q_1\) element):

FESystem<3> sys1(FE_Q<3>(2)^3,
FE_Q<3>(1));

This example creates an FESystem sys1 with four components, three for the velocity components and one for the pressure, and also four blocks with the degrees of freedom of each of the velocity components and the pressure in a separate block each. The number of blocks is four since the first base element is repeated three times.

On the other hand, a Taylor-Hood element can also be constructed using

FESystem<3> U(u,3);
FESystem<3> sys2(U, p);

The FESystem sys2 created here has the same four components, but the degrees of freedom are distributed into only two blocks. The first block has all velocity degrees of freedom from U, while the second block contains the pressure degrees of freedom. Note that while U itself has 3 blocks, the FESystem sys2 does not attempt to split U into its base elements but considers it a block of its own. By blocking all velocities into one system first as in sys2, we achieve the same block structure that would be generated if instead of using a \(Q_2^3\) element for the velocities we had used vector-valued base elements, for instance like using a mixed discretization of Darcy's law using

This example also produces a system with four components, but only two blocks.

In most cases, the composed element behaves as if it were a usual element. It just has more degrees of freedom than most of the "common" elements. However the underlying structure is visible in the restriction, prolongation and interface constraint matrices, which do not couple the degrees of freedom of the base elements. E.g. the continuity requirement is imposed for the shape functions of the subobjects separately; no requirement exist between shape functions of different subobjects, i.e. in the above example: on a hanging node, the respective value of the u velocity is only coupled to u at the vertices and the line on the larger cell next to this vertex, but there is no interaction with v and w of this or the other cell.

Internal information on numbering of degrees of freedom

The overall numbering of degrees of freedom is as follows: for each 0d, 1d, 2d, or 3d subobject, the degrees of freedom are numbered such that we run over all subelements first, before turning for the next dof on this subobject or for the next subobject. For example, for an element of three components in one space dimension, the first two components being cubic lagrange elements and the third being a quadratic lagrange element, the ordering for the system s=(u,v,p) is:

That said, you should not rely on this numbering in your application as these internals might change in future. Rather use the functions system_to_component_index() and component_to_system_index().

For more information on the template parameter spacedim see the documentation of Triangulation.

Definition at line 207 of file fe_system.h.

Member Typedef Documentation

◆ map_value_type

using EnableObserverPointer::map_value_type = decltype(counter_map)::value_type
privateinherited

The data type used in counter_map.

Definition at line 238 of file enable_observer_pointer.h.

◆ map_iterator

using EnableObserverPointer::map_iterator = decltype(counter_map)::iterator
privateinherited

The iterator type used in counter_map.

Definition at line 243 of file enable_observer_pointer.h.

Member Enumeration Documentation

◆ Conformity

template<int dim>
enum FiniteElementData::Conformity
inherited

Enumerator for the different types of continuity a finite element may have. Continuity is measured by the Sobolev space containing the constructed finite element space and is also called this way.

Note that certain continuities may imply others. For instance, a function in H1 is in Hcurl and Hdiv as well.

If you are interested in continuity in the classical sense, then the following relations hold:

  1. H1 implies that the function is continuous over cell boundaries.

  2. H2 implies that the function is continuously differentiable over cell boundaries.

  3. L2 indicates that the element is discontinuous. Since discontinuous elements have no topological couplings between grid cells and code may actually depend on this property, L2 conformity is handled in a special way in the sense that it is not implied by any higher conformity.

In order to test if a finite element conforms to a certain space, use FiniteElementData<dim>::conforms().

Enumerator
unknown 

Indicates incompatible continuities of a system.

L2 

Discontinuous elements. See above!

Hcurl 

Conformity with the space Hcurl (continuous tangential component of a vector field)

Hdiv 

Conformity with the space Hdiv (continuous normal component of a vector field)

H1 

Conformity with the space H1 (continuous)

H2 

Conformity with the space H2 (continuously differentiable)

Definition at line 261 of file fe_data.h.

Constructor & Destructor Documentation

◆ FESystem() [1/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( )
delete

Delete default constructor so that FESystem(FEPairs &&... fe_pairs) is not accidentally picked if no FiniteElement is provided.

◆ FESystem() [2/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( const FiniteElement< dim, spacedim > &  fe,
const unsigned int  n_elements 
)

Constructor. Take a finite element and the number of elements you want to group together using this class.

The object fe is not actually used for anything other than creating a copy that will then be owned by the current object. In other words, it is completely fine to call this constructor with a temporary object for the finite element, as in this code snippet:

Here, FE_Q<dim>(2) constructs an unnamed, temporary object that is passed to the FESystem constructor to create a finite element that consists of two components, both of which are quadratic FE_Q elements. The temporary is destroyed again at the end of the code that corresponds to this line, but this does not matter because FESystem creates its own copy of the FE_Q object.

This constructor (or its variants below) is used in essentially all tutorial programs that deal with vector valued problems. See step-8, step-20, step-22 and others for use cases. Also see the topic on Handling vector valued problems.

Note
The material presented here is also discussed in video lecture 19, video lecture 20. (All video lectures are also available here.)
Parameters
[in]feThe finite element that will be used to represent the components of this composed element.
[in]n_elementsAn integer denoting how many copies of fe this element should consist of.

◆ FESystem() [3/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( const FiniteElement< dim, spacedim > &  fe1,
const unsigned int  n1,
const FiniteElement< dim, spacedim > &  fe2,
const unsigned int  n2 
)

Constructor for mixed discretizations with two base elements.

See the other constructor above for an explanation of the general idea of composing elements.

◆ FESystem() [4/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::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 
)

Constructor for mixed discretizations with three base elements.

See the other constructor above for an explanation of the general idea of composing elements.

◆ FESystem() [5/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::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 
)

Constructor for mixed discretizations with four base elements.

See the first of the other constructors above for an explanation of the general idea of composing elements.

◆ FESystem() [6/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::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 
)

Constructor for mixed discretizations with five base elements.

See the first of the other constructors above for an explanation of the general idea of composing elements.

◆ FESystem() [7/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( const std::vector< const FiniteElement< dim, spacedim > * > &  fes,
const std::vector< unsigned int > &  multiplicities 
)

Same as above but for any number of base elements. Pointers to the base elements and their multiplicities are passed as vectors to this constructor. The lengths of these vectors are assumed to be equal.

As above, the finite element objects pointed to by the first argument are not actually used other than to create copies internally. Consequently, you can delete these pointers immediately again after calling this constructor.

How to use this constructor

Using this constructor is a bit awkward at times because you need to pass two vectors in a place where it may not be straightforward to construct such a vector – for example, in the member initializer list of a class with an FESystem member variable. For example, if your main class looks like this:

template <int dim>
class MySimulator {
public:
MySimulator (const unsigned int polynomial_degree);
private:
};
template <int dim>
MySimulator<dim>::MySimulator (const unsigned int polynomial_degree)
:
fe (...) // what to pass here???
{}

Using the C++11 language standard (or later) you could do something like this to create an element with four base elements and multiplicities 1, 2, 3 and 4:

template <int dim>
MySimulator<dim>::MySimulator (const unsigned int polynomial_degree)
:
fe (std::vector<const FiniteElement<dim>*> { new FE_Q<dim>(1),
new FE_Q<dim>(2),
new FE_Q<dim>(3),
new FE_Q<dim>(4) },
std::vector<unsigned int> { 1, 2, 3, 4 })
{}
STL namespace.

This creates two vectors in place and initializes them using the initializer list enclosed in braces { ... }.

This code has a problem: it creates four memory leaks because the first vector above is created with pointers to elements that are allocated with new but never destroyed.

The solution to the second of these problems is to create two static member functions that can create vectors. Here is an example:

template <int dim>
class MySimulator {
public:
MySimulator (const unsigned int polynomial_degree);
private:
static std::vector<const FiniteElement<dim>*>
create_fe_list (const unsigned int polynomial_degree);
static std::vector<unsigned int>
create_fe_multiplicities ();
};
template <int dim>
std::vector<const FiniteElement<dim>*>
MySimulator<dim>::create_fe_list (const unsigned int polynomial_degree)
{
std::vector<const FiniteElement<dim>*> fe_list;
fe_list.push_back (new FE_Q<dim>(1));
fe_list.push_back (new FE_Q<dim>(2));
fe_list.push_back (new FE_Q<dim>(3));
fe_list.push_back (new FE_Q<dim>(4));
return fe_list;
}
template <int dim>
std::vector<unsigned int>
MySimulator<dim>::create_fe_multiplicities ()
{
std::vector<unsigned int> multiplicities;
multiplicities.push_back (1);
multiplicities.push_back (2);
multiplicities.push_back (3);
multiplicities.push_back (4);
return multiplicities;
}
template <int dim>
MySimulator<dim>::MySimulator (const unsigned int polynomial_degree)
:
fe (create_fe_list (polynomial_degree),
create_fe_multiplicities ())
{}

The way this works is that we have two static member functions that create the necessary vectors to pass to the constructor of the member variable fe. They need to be static because they are called during the constructor of MySimulator at a time when the *this object isn't fully constructed and, consequently, regular member functions cannot be called yet.

The code above does not solve the problem with the memory leak yet, though: the create_fe_list() function creates a vector of pointers, but nothing destroys these. This is the solution:

template <int dim>
class MySimulator
{
public:
MySimulator (const unsigned int polynomial_degree);
private:
struct VectorElementDestroyer
{
const std::vector<const FiniteElement<dim>*> data;
VectorElementDestroyer(
const std::vector<const FiniteElement<dim>*> &pointers);
// destructor to delete the pointers
~VectorElementDestroyer ();
const std::vector<const FiniteElement<dim>*> & get_data () const;
};
static std::vector<const FiniteElement<dim>*>
create_fe_list (const unsigned int polynomial_degree);
static std::vector<unsigned int>
create_fe_multiplicities ();
};
template <int dim>
MySimulator<dim>::VectorElementDestroyer::
VectorElementDestroyer(
const std::vector<const FiniteElement<dim>*> &pointers)
:
data(pointers)
{}
template <int dim>
MySimulator<dim>::VectorElementDestroyer::
~VectorElementDestroyer ()
{
for (unsigned int i=0; i<data.size(); ++i)
delete data[i];
}
template <int dim>
const std::vector<const FiniteElement<dim>*> &
MySimulator<dim>::VectorElementDestroyer::
get_data () const
{
return data;
}
template <int dim>
MySimulator<dim>::MySimulator (const unsigned int polynomial_degree)
:
fe (VectorElementDestroyer(create_fe_list (polynomial_degree)).get_data(),
create_fe_multiplicities ())
{}
std::vector< index_type > data
Definition mpi.cc:735

In other words, the vector we receive from the create_fe_list() is packed into a temporary object of type VectorElementDestroyer; we then get the vector from this temporary object immediately to pass it to the constructor of fe; and finally, the VectorElementDestroyer destructor is called at the end of the entire expression (after the constructor of fe has finished) and destroys the elements of the temporary vector. Voila: not short nor elegant, but it works!

◆ FESystem() [8/11]

template<int dim, int spacedim = dim>
template<class... FEPairs, typename = enable_if_all_t< (std::is_same_v<std::decay_t<FEPairs>, std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>> || std::is_base_of_v<FiniteElement<dim, spacedim>, std::decay_t<FEPairs>>)...>>
FESystem< dim, spacedim >::FESystem ( FEPairs &&...  fe_pairs)

Constructor taking an arbitrary number of parameters of type std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>. In combination with FiniteElement::operator^, this allows to construct FESystem objects as follows:

FiniteElementType1<dim,spacedim> fe_1;
FiniteElementType1<dim,spacedim> fe_2;
FESystem<dim,spacedim> fe_system ( fe_1^dim, fe_2 );

The fe_1 and fe_2 objects are not actually used for anything other than creating a copy that will then be owned by the current object. In other words, it is completely fine to call this constructor with a temporary object for the finite element, as in this code snippet:

Here, FE_Q<dim>(2) constructs an unnamed, temporary object that is passed to the FESystem constructor to create a finite element that consists of two components, both of which are quadratic FE_Q elements. The temporary is destroyed again at the end of the code that corresponds to this line, but this does not matter because FESystem creates its own copy of the FE_Q object.

As a shortcut, this constructor also allows calling

instead of the more explicit

FESystem<dim> fe (FE_Q<dim>(2)^dim, FE_Q<dim>(1)^1);

In other words, if no multiplicity for an element is explicitly specified via the exponentiation operation, then it is assumed to be one (as one would have expected).

Warning
This feature is not available for Intel compilers prior to version 19.0. Defining this constructor leads to internal compiler errors for Intel compilers prior to 18.0.

◆ FESystem() [9/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( const std::initializer_list< std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > > &  fe_systems)

Same as above allowing the following syntax:

FiniteElementType1<dim,spacedim> fe_1;
FiniteElementType1<dim,spacedim> fe_2;
FESystem<dim,spacedim> fe_system = { fe_1^dim, fe_2^1 };
Warning
This feature is not available for Intel compilers prior to version 19.0. The constructor is just not selected for overload resolution.

◆ FESystem() [10/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( const FESystem< dim, spacedim > &  )
delete

Copy constructor. This constructor is deleted, i.e., copying FESystem objects is not allowed.

◆ FESystem() [11/11]

template<int dim, int spacedim = dim>
FESystem< dim, spacedim >::FESystem ( FESystem< dim, spacedim > &&  other_fe_system)
inlinenoexcept

Move constructor.

Definition at line 573 of file fe_system.h.

◆ ~FESystem()

template<int dim, int spacedim = dim>
virtual FESystem< dim, spacedim >::~FESystem ( )
overridevirtualdefault

Destructor.

Member Function Documentation

◆ get_name()

template<int dim, int spacedim = dim>
virtual std::string FESystem< dim, spacedim >::get_name ( ) const
overridevirtual

Return a string that uniquely identifies a finite element. This element returns a string that is composed of the strings name1...nameN returned by the basis elements. From these, we create a sequence FESystem<dim>[name1^m1-name2^m2-...-nameN^mN], where mi are the multiplicities of the basis elements. If a multiplicity is equal to one, then the superscript is omitted.

Implements FiniteElement< dim, spacedim >.

◆ clone()

template<int dim, int spacedim = dim>
virtual std::unique_ptr< FiniteElement< dim, spacedim > > FESystem< dim, spacedim >::clone ( ) const
overridevirtual

A sort of virtual copy constructor, this function returns a copy of the finite element object. Derived classes need to override the function here in this base class and return an object of the same type as the derived class.

Some places in the library, for example the constructors of FESystem as well as the hp::FECollection class, need to make copies of finite elements without knowing their exact type. They do so through this function.

Implements FiniteElement< dim, spacedim >.

◆ requires_update_flags()

template<int dim, int spacedim = dim>
virtual UpdateFlags FESystem< dim, spacedim >::requires_update_flags ( const UpdateFlags  update_flags) const
overridevirtual

Given a set of update flags, compute which other quantities also need to be computed in order to satisfy the request by the given flags. Then return the combination of the original set of flags and those just computed.

As an example, if update_flags contains update_gradients a finite element class will typically require the computation of the inverse of the Jacobian matrix in order to rotate the gradient of shape functions on the reference cell to the real cell. It would then return not just update_gradients, but also update_covariant_transformation, the flag that makes the mapping class produce the inverse of the Jacobian matrix.

An extensive discussion of the interaction between this function and FEValues can be found in the How Mapping, FiniteElement, and FEValues work together documentation topic.

See also
The interplay of UpdateFlags, Mapping, and FiniteElement in FEValues

Implements FiniteElement< dim, spacedim >.

◆ get_sub_fe() [1/2]

template<int dim, int spacedim = dim>
virtual const FiniteElement< dim, spacedim > & FESystem< dim, spacedim >::get_sub_fe ( const unsigned int  first_component,
const unsigned int  n_selected_components 
) const
overridevirtual

Return a reference to a contained finite element that matches the components selected by the given ComponentMask mask.

For an arbitrarily nested FESystem, this function returns the inner-most FiniteElement that matches the given mask. The method fails if the mask does not exactly match one of the contained finite elements. It is most useful if the current object is an FESystem, as the return value can only be this in all other cases.

Note that the returned object can be an FESystem if the mask matches it but not any of the contained objects.

Let us illustrate the function with the an FESystem fe with 7 components:

FESystem<2> fe_velocity(FE_Q<2>(2), 2);
FE_Q<2> fe_pressure(1);
FE_DGP<2> fe_dg(0);
FE_BDM<2> fe_nonprim(1);
FESystem<2> fe(fe_velocity, 1, fe_pressure, 1, fe_dg, 2, fe_nonprim, 1);

The following table lists all possible component masks you can use:

ComponentMask Result Description
[true,true,true,true,true,true,true] FESystem<2>[FESystem<2>[FE_Q<2>(2)^2]-FE_Q<2>(1)-FE_DGP<2>(0)^2-FE_BDM<2>(1)] fe itself, the whole FESystem
[true,true,false,false,false,false,false] FESystem<2>[FE_Q<2>(2)^2] just the fe_velocity
[true,false,false,false,false,false,false] FE_Q<2>(2) The first component in fe_velocity
[false,true,false,false,false,false,false] FE_Q<2>(2) The second component in fe_velocity
[false,false,true,false,false,false,false] FE_Q<2>(1) fe_pressure
[false,false,false,true,false,false,false] FE_DGP<2>(0) first copy of fe_dg
[false,false,false,false,true,false,false] FE_DGP<2>(0) second copy of fe_dg
[false,false,false,false,false,true,true] FE_BDM<2>(1) both components of fe_nonprim

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_value()

template<int dim, int spacedim = dim>
virtual double FESystem< dim, spacedim >::shape_value ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Return the value of the ith shape function at the point p. p is a point on the reference element. Since this finite element is always vector-valued, we return the value of the only non-zero component of the vector value of this shape function. If the shape function has more than one non-zero component (which we refer to with the term non-primitive), then throw an exception of type ExcShapeFunctionNotPrimitive.

An ExcUnitShapeValuesDoNotExist is thrown if the shape values of the FiniteElement (corresponding to the ith shape function) depend on the shape of the cell in real space.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_value_component()

template<int dim, int spacedim = dim>
virtual double FESystem< dim, spacedim >::shape_value_component ( const unsigned int  i,
const Point< dim > &  p,
const unsigned int  component 
) const
overridevirtual

Return the value of the componentth vector component of the ith shape function at the point p. See the FiniteElement base class for more information about the semantics of this function.

Since this element is vector valued in general, it relays the computation of these values to the base elements.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_grad()

template<int dim, int spacedim = dim>
virtual Tensor< 1, dim > FESystem< dim, spacedim >::shape_grad ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Return the gradient of the ith shape function at the point p. p is a point on the reference element, and likewise the gradient is the gradient on the unit cell with respect to unit cell coordinates. Since this finite element is always vector-valued, we return the value of the only non-zero component of the vector value of this shape function. If the shape function has more than one non-zero component (which we refer to with the term non-primitive), then throw an exception of type ExcShapeFunctionNotPrimitive.

An ExcUnitShapeValuesDoNotExist is thrown if the shape values of the FiniteElement (corresponding to the ith shape function) depend on the shape of the cell in real space.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_grad_component()

template<int dim, int spacedim = dim>
virtual Tensor< 1, dim > FESystem< dim, spacedim >::shape_grad_component ( const unsigned int  i,
const Point< dim > &  p,
const unsigned int  component 
) const
overridevirtual

Return the gradient of the componentth vector component of the ith shape function at the point p. See the FiniteElement base class for more information about the semantics of this function.

Since this element is vector valued in general, it relays the computation of these values to the base elements.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_grad_grad()

template<int dim, int spacedim = dim>
virtual Tensor< 2, dim > FESystem< dim, spacedim >::shape_grad_grad ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Return the tensor of second derivatives of the ith shape function at point p on the unit cell. The derivatives are derivatives on the unit cell with respect to unit cell coordinates. Since this finite element is always vector-valued, we return the value of the only non-zero component of the vector value of this shape function. If the shape function has more than one non-zero component (which we refer to with the term non-primitive), then throw an exception of type ExcShapeFunctionNotPrimitive.

An ExcUnitShapeValuesDoNotExist is thrown if the shape values of the FiniteElement (corresponding to the ith shape function) depend on the shape of the cell in real space.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_grad_grad_component()

template<int dim, int spacedim = dim>
virtual Tensor< 2, dim > FESystem< dim, spacedim >::shape_grad_grad_component ( const unsigned int  i,
const Point< dim > &  p,
const unsigned int  component 
) const
overridevirtual

Return the second derivatives of the componentth vector component of the ith shape function at the point p. See the FiniteElement base class for more information about the semantics of this function.

Since this element is vector valued in general, it relays the computation of these values to the base elements.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_3rd_derivative()

template<int dim, int spacedim = dim>
virtual Tensor< 3, dim > FESystem< dim, spacedim >::shape_3rd_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Return the tensor of third derivatives of the ith shape function at point p on the unit cell. The derivatives are derivatives on the unit cell with respect to unit cell coordinates. Since this finite element is always vector-valued, we return the value of the only non-zero component of the vector value of this shape function. If the shape function has more than one non-zero component (which we refer to with the term non-primitive), then throw an exception of type ExcShapeFunctionNotPrimitive.

An ExcUnitShapeValuesDoNotExist is thrown if the shape values of the FiniteElement (corresponding to the ith shape function) depend on the shape of the cell in real space.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_3rd_derivative_component()

template<int dim, int spacedim = dim>
virtual Tensor< 3, dim > FESystem< dim, spacedim >::shape_3rd_derivative_component ( const unsigned int  i,
const Point< dim > &  p,
const unsigned int  component 
) const
overridevirtual

Return the third derivatives of the componentth vector component of the ith shape function at the point p. See the FiniteElement base class for more information about the semantics of this function.

Since this element is vector valued in general, it relays the computation of these values to the base elements.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_4th_derivative()

template<int dim, int spacedim = dim>
virtual Tensor< 4, dim > FESystem< dim, spacedim >::shape_4th_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Return the tensor of fourth derivatives of the ith shape function at point p on the unit cell. The derivatives are derivatives on the unit cell with respect to unit cell coordinates. Since this finite element is always vector-valued, we return the value of the only non-zero component of the vector value of this shape function. If the shape function has more than one non-zero component (which we refer to with the term non-primitive), then throw an exception of type ExcShapeFunctionNotPrimitive.

An ExcUnitShapeValuesDoNotExist is thrown if the shape values of the FiniteElement (corresponding to the ith shape function) depend on the shape of the cell in real space.

Reimplemented from FiniteElement< dim, spacedim >.

◆ shape_4th_derivative_component()

template<int dim, int spacedim = dim>
virtual Tensor< 4, dim > FESystem< dim, spacedim >::shape_4th_derivative_component ( const unsigned int  i,
const Point< dim > &  p,
const unsigned int  component 
) const
overridevirtual

Return the fourth derivatives of the componentth vector component of the ith shape function at the point p. See the FiniteElement base class for more information about the semantics of this function.

Since this element is vector valued in general, it relays the computation of these values to the base elements.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_interpolation_matrix()

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::get_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
FullMatrix< double > &  matrix 
) const
overridevirtual

Return the matrix interpolating from the given finite element to the present one. The size of the matrix is then dofs_per_cell times source.n_dofs_per_cell().

These matrices are available if source and destination element are both FESystem elements, have the same number of base elements with same element multiplicity, and if these base elements also implement their get_interpolation_matrix functions. Otherwise, an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented is thrown.

Reimplemented from FiniteElement< dim, spacedim >.

◆ base_element()

template<int dim, int spacedim = dim>
virtual const FiniteElement< dim, spacedim > & FESystem< dim, spacedim >::base_element ( const unsigned int  index) const
overridevirtual

Access to a composing element. The index needs to be smaller than the number of base elements. Note that the number of base elements may in turn be smaller than the number of components of the system element, if the multiplicities are greater than one.

Reimplemented from FiniteElement< dim, spacedim >.

◆ has_support_on_face()

template<int dim, int spacedim = dim>
virtual bool FESystem< dim, spacedim >::has_support_on_face ( const unsigned int  shape_index,
const unsigned int  face_index 
) const
overridevirtual

This function returns true, if the shape function shape_index has non-zero function values somewhere on the face face_index.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_restriction_matrix()

template<int dim, int spacedim = dim>
virtual const FullMatrix< double > & FESystem< dim, spacedim >::get_restriction_matrix ( const unsigned int  child,
const RefinementCase< dim > &  refinement_case = RefinementCase< dim >::isotropic_refinement 
) const
overridevirtual

Projection from a fine grid space onto a coarse grid space. Overrides the respective method in FiniteElement, implementing lazy evaluation (initialize when requested).

If this projection operator is associated with a matrix P, then the restriction of this matrix P_i to a single child cell is returned here.

The matrix P is the concatenation or the sum of the cell matrices P_i, depending on the value of FiniteElement::restriction_is_additive(). This distinguishes interpolation (concatenation) and projection with respect to scalar products (summation).

Row and column indices are related to coarse grid and fine grid spaces, respectively, consistent with the definition of the associated operator.

If projection matrices are not implemented in the derived finite element class, this function aborts with an exception of type FiniteElement::ExcProjectionVoid. You can check whether this would happen by first calling the restriction_is_implemented() or the isotropic_restriction_is_implemented() function.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_prolongation_matrix()

template<int dim, int spacedim = dim>
virtual const FullMatrix< double > & FESystem< dim, spacedim >::get_prolongation_matrix ( const unsigned int  child,
const RefinementCase< dim > &  refinement_case = RefinementCase< dim >::isotropic_refinement 
) const
overridevirtual

Embedding matrix between grids. Overrides the respective method in FiniteElement, implementing lazy evaluation (initialize when queried).

The identity operator from a coarse grid space into a fine grid space is associated with a matrix P. The restriction of this matrix P_i to a single child cell is returned here.

The matrix P is the concatenation, not the sum of the cell matrices P_i. That is, if the same non-zero entry j,k exists in two different child matrices P_i, the value should be the same in both matrices and it is copied into the matrix P only once.

Row and column indices are related to fine grid and coarse grid spaces, respectively, consistent with the definition of the associated operator.

These matrices are used by routines assembling the prolongation matrix for multi-level methods. Upon assembling the transfer matrix between cells using this matrix array, zero elements in the prolongation matrix are discarded and will not fill up the transfer matrix.

If prolongation matrices are not implemented in one of the base finite element classes, this function aborts with an exception of type FiniteElement::ExcEmbeddingVoid. You can check whether this would happen by first calling the prolongation_is_implemented() or the isotropic_prolongation_is_implemented() function.

Reimplemented from FiniteElement< dim, spacedim >.

◆ face_to_cell_index()

template<int dim, int spacedim = dim>
virtual unsigned int FESystem< dim, spacedim >::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
overridevirtual

Given an index in the natural ordering of indices on a face, return the index of the same degree of freedom on the cell.

To explain the concept, consider the case where we would like to know whether a degree of freedom on a face, for example as part of an FESystem element, is primitive. Unfortunately, the is_primitive() function in the FiniteElement class takes a cell index, so we would need to find the cell index of the shape function that corresponds to the present face index. This function does that.

Code implementing this would then look like this:

for (i=0; i<dofs_per_face; ++i)
if (fe.is_primitive(fe.face_to_cell_index(i, some_face_no)))
... do whatever
const unsigned int dofs_per_face
Definition fe_data.h:422

The function takes additional arguments that account for the fact that actual faces can be in their standard ordering with respect to the cell under consideration, or can be flipped, oriented, etc.

Parameters
face_dof_indexThe index of the degree of freedom on a face. This index must be between zero and dofs_per_face.
faceThe number of the face this degree of freedom lives on. This number must be between zero and GeometryInfo::faces_per_cell.
combined_orientationThe combined orientation flag containing the orientation, rotation, and flip of the face. See GlossFaceOrientation.
Returns
The index of this degree of freedom within the set of degrees of freedom on the entire cell. The returned value will be between zero and dofs_per_cell.

Reimplemented from FiniteElement< dim, spacedim >.

◆ unit_support_point()

template<int dim, int spacedim = dim>
virtual Point< dim > FESystem< dim, spacedim >::unit_support_point ( const unsigned int  index) const
overridevirtual

Implementation of the respective function in the base class.

Reimplemented from FiniteElement< dim, spacedim >.

◆ unit_face_support_point()

template<int dim, int spacedim = dim>
virtual Point< dim - 1 > FESystem< dim, spacedim >::unit_face_support_point ( const unsigned int  index,
const unsigned int  face_no = 0 
) const
overridevirtual

Implementation of the respective function in the base class.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_constant_modes()

template<int dim, int spacedim = dim>
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > FESystem< dim, spacedim >::get_constant_modes ( ) const
overridevirtual

Return a list of constant modes of the element. The returns table has as many rows as there are components in the element and dofs_per_cell columns. To each component of the finite element, the row in the returned table contains a basis representation of the constant function 1 on the element. Concatenates the constant modes of each base element.

Reimplemented from FiniteElement< dim, spacedim >.

◆ hp_constraints_are_implemented()

template<int dim, int spacedim = dim>
virtual bool FESystem< dim, spacedim >::hp_constraints_are_implemented ( ) const
overridevirtual

Return whether this element implements its hanging node constraints in the new way, which has to be used to make elements "hp-compatible".

This function returns true if and only if all its base elements return true for this function.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_face_interpolation_matrix()

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::get_face_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
FullMatrix< double > &  matrix,
const unsigned int  face_no = 0 
) const
overridevirtual

Return the matrix interpolating from a face of one element to the face of the neighboring element. The size of the matrix is then source.dofs_per_face times this->dofs_per_face.

Base elements of this element will have to implement this function. They may only provide interpolation matrices for certain source finite elements, for example those from the same family. If they don't implement interpolation from a given element, then they must throw an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented, which will get propagated out from this element.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_subface_interpolation_matrix()

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::get_subface_interpolation_matrix ( const FiniteElement< dim, spacedim > &  source,
const unsigned int  subface,
FullMatrix< double > &  matrix,
const unsigned int  face_no = 0 
) const
overridevirtual

Return the matrix interpolating from a face of one element to the subface of the neighboring element. The size of the matrix is then source.dofs_per_face times this->dofs_per_face.

Base elements of this element will have to implement this function. They may only provide interpolation matrices for certain source finite elements, for example those from the same family. If they don't implement interpolation from a given element, then they must throw an exception of type FiniteElement<dim,spacedim>::ExcInterpolationNotImplemented, which will get propagated out from this element.

Reimplemented from FiniteElement< dim, spacedim >.

◆ hp_vertex_dof_identities()

template<int dim, int spacedim = dim>
virtual std::vector< std::pair< unsigned int, unsigned int > > FESystem< dim, spacedim >::hp_vertex_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other) const
overridevirtual

If, on a vertex, several finite elements are active, the hp-code first assigns the degrees of freedom of each of these FEs different global indices. It then calls this function to find out which of them should get identical values, and consequently can receive the same global DoF index. This function therefore returns a list of identities between DoFs of the present finite element object with the DoFs of fe_other, which is a reference to a finite element object representing one of the other finite elements active on this particular vertex. The function computes which of the degrees of freedom of the two finite element objects are equivalent, both numbered between zero and the corresponding value of n_dofs_per_vertex() of the two finite elements. The first index of each pair denotes one of the vertex dofs of the present element, whereas the second is the corresponding index of the other finite element.

Reimplemented from FiniteElement< dim, spacedim >.

◆ hp_line_dof_identities()

template<int dim, int spacedim = dim>
virtual std::vector< std::pair< unsigned int, unsigned int > > FESystem< dim, spacedim >::hp_line_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other) const
overridevirtual

Same as hp_vertex_dof_indices(), except that the function treats degrees of freedom on lines.

Reimplemented from FiniteElement< dim, spacedim >.

◆ hp_quad_dof_identities()

template<int dim, int spacedim = dim>
virtual std::vector< std::pair< unsigned int, unsigned int > > FESystem< dim, spacedim >::hp_quad_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other,
const unsigned int  face_no = 0 
) const
overridevirtual

Same as hp_vertex_dof_indices(), except that the function treats degrees of freedom on quads.

Reimplemented from FiniteElement< dim, spacedim >.

◆ compare_for_domination()

template<int dim, int spacedim = dim>
virtual FiniteElementDomination::Domination FESystem< dim, spacedim >::compare_for_domination ( const FiniteElement< dim, spacedim > &  fe_other,
const unsigned int  codim = 0 
) const
finaloverridevirtual

Return whether this element dominates another one given as argument fe_other, whether it is the other way around, whether neither dominates, or if either could dominate. The codim parameter describes the codimension of the investigated subspace and specifies that it is subject to this comparison. For example, if codim==0 then this function compares which element dominates at the cell level. If codim==1, then the elements are compared at faces, i.e., the comparison happens between the function spaces of the two finite elements as restricted to a face. Larger values of codim work correspondingly.

For a definition of domination, see FiniteElementDomination::Domination and in particular the hp-paper.

Reimplemented from FiniteElement< dim, spacedim >.

◆ convert_generalized_support_point_values_to_dof_values()

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::convert_generalized_support_point_values_to_dof_values ( const std::vector< Vector< double > > &  support_point_values,
std::vector< double > &  dof_values 
) const
overridevirtual

Implementation of the FiniteElement::convert_generalized_support_point_values_to_dof_values() function.

This function simply calls FiniteElement::convert_generalized_support_point_values_to_dof_values of the base elements and re-assembles everything into the output argument. If a base element is non-interpolatory the corresponding dof values are filled with "signaling" NaNs instead.

The function fails if none of the base elements of the FESystem are interpolatory.

Reimplemented from FiniteElement< dim, spacedim >.

◆ memory_consumption()

template<int dim, int spacedim = dim>
virtual std::size_t FESystem< dim, spacedim >::memory_consumption ( ) const
overridevirtual

Determine an estimate for the memory consumption (in bytes) of this object.

This function is made virtual, since finite element objects are usually accessed through pointers to their base class, rather than the class itself.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_data()

template<int dim, int spacedim = dim>
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > FESystem< dim, spacedim >::get_data ( const UpdateFlags  update_flags,
const Mapping< dim, spacedim > &  mapping,
const Quadrature< dim > &  quadrature,
::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &  output_data 
) const
overrideprotectedvirtual

Create an internal data object and return a pointer to it of which the caller of this function then assumes ownership. This object will then be passed to the FiniteElement::fill_fe_values() every time the finite element shape functions and their derivatives are evaluated on a concrete cell. The object created here is therefore used by derived classes as a place for scratch objects that are used in evaluating shape functions, as well as to store information that can be pre-computed once and re-used on every cell (e.g., for evaluating the values and gradients of shape functions on the reference cell, for later re-use when transforming these values to a concrete cell).

This function is the first one called in the process of initializing a FEValues object for a given mapping and finite element object. The returned object will later be passed to FiniteElement::fill_fe_values() for a concrete cell, which will itself place its output into an object of type internal::FEValuesImplementation::FiniteElementRelatedData. Since there may be data that can already be computed in its final form on the reference cell, this function also receives a reference to the internal::FEValuesImplementation::FiniteElementRelatedData object as its last argument. This output argument is guaranteed to always be the same one when used with the InternalDataBase object returned by this function. In other words, the subdivision of scratch data and final data in the returned object and the output_data object is as follows: If data can be pre-computed on the reference cell in the exact form in which it will later be needed on a concrete cell, then this function should already emplace it in the output_data object. An example are the values of shape functions at quadrature points for the usual Lagrange elements which on a concrete cell are identical to the ones on the reference cell. On the other hand, if some data can be pre-computed to make computations on a concrete cell cheaper, then it should be put into the returned object for later re-use in a derive class's implementation of FiniteElement::fill_fe_values(). An example are the gradients of shape functions on the reference cell for Lagrange elements: to compute the gradients of the shape functions on a concrete cell, one has to multiply the gradients on the reference cell by the inverse of the Jacobian of the mapping; consequently, we cannot already compute the gradients on a concrete cell at the time the current function is called, but we can at least pre-compute the gradients on the reference cell, and store it in the object returned.

An extensive discussion of the interaction between this function and FEValues can be found in the How Mapping, FiniteElement, and FEValues work together documentation topic. See also the documentation of the InternalDataBase class.

Parameters
[in]update_flagsA set of UpdateFlags values that describe what kind of information the FEValues object requests the finite element to compute. This set of flags may also include information that the finite element can not compute, e.g., flags that pertain to data produced by the mapping. An implementation of this function needs to set up all data fields in the returned object that are necessary to produce the finite-element related data specified by these flags, and may already pre-compute part of this information as discussed above. Elements may want to store these update flags (or a subset of these flags) in InternalDataBase::update_each so they know at the time when FiniteElement::fill_fe_values() is called what they are supposed to compute
[in]mappingA reference to the mapping used for computing values and derivatives of shape functions.
[in]quadratureA reference to the object that describes where the shape functions should be evaluated.
[out]output_dataA reference to the object that FEValues will use in conjunction with the object returned here and where an implementation of FiniteElement::fill_fe_values() will place the requested information. This allows the current function to already pre-compute pieces of information that can be computed on the reference cell, as discussed above. FEValues guarantees that this output object and the object returned by the current function will always be used together.
Returns
A pointer to an object of a type derived from InternalDataBase and that derived classes can use to store scratch data that can be pre-computed, or for scratch arrays that then only need to be allocated once. The calling site assumes ownership of this object and will delete it when it is no longer necessary.

Implements FiniteElement< dim, spacedim >.

◆ get_face_data() [1/2]

template<int dim, int spacedim = dim>
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > FESystem< dim, spacedim >::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
overrideprotectedvirtual

Like get_data(), but return an object that will later be used for evaluating shape function information at quadrature points on faces of cells. The object will then be used in calls to implementations of FiniteElement::fill_fe_face_values(). See the documentation of get_data() for more information.

The default implementation of this function converts the face quadrature into a cell quadrature with appropriate quadrature point locations, and with that calls the get_data() function above that has to be implemented in derived classes.

Parameters
[in]update_flagsA set of UpdateFlags values that describe what kind of information the FEValues object requests the finite element to compute. This set of flags may also include information that the finite element can not compute, e.g., flags that pertain to data produced by the mapping. An implementation of this function needs to set up all data fields in the returned object that are necessary to produce the finite-element related data specified by these flags, and may already pre-compute part of this information as discussed above. Elements may want to store these update flags (or a subset of these flags) in InternalDataBase::update_each so they know at the time when FiniteElement::fill_fe_face_values() is called what they are supposed to compute
[in]mappingA reference to the mapping used for computing values and derivatives of shape functions.
[in]quadratureA reference to the object that describes where the shape functions should be evaluated.
[out]output_dataA reference to the object that FEValues will use in conjunction with the object returned here and where an implementation of FiniteElement::fill_fe_face_values() will place the requested information. This allows the current function to already pre-compute pieces of information that can be computed on the reference cell, as discussed above. FEValues guarantees that this output object and the object returned by the current function will always be used together.
Returns
A pointer to an object of a type derived from InternalDataBase and that derived classes can use to store scratch data that can be pre-computed, or for scratch arrays that then only need to be allocated once. The calling site assumes ownership of this object and will delete it when it is no longer necessary.

Reimplemented from FiniteElement< dim, spacedim >.

◆ get_subface_data()

template<int dim, int spacedim = dim>
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > FESystem< dim, spacedim >::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
overrideprotectedvirtual

Like get_data(), but return an object that will later be used for evaluating shape function information at quadrature points on children of faces of cells. The object will then be used in calls to implementations of FiniteElement::fill_fe_subface_values(). See the documentation of get_data() for more information.

The default implementation of this function converts the face quadrature into a cell quadrature with appropriate quadrature point locations, and with that calls the get_data() function above that has to be implemented in derived classes.

Parameters
[in]update_flagsA set of UpdateFlags values that describe what kind of information the FEValues object requests the finite element to compute. This set of flags may also include information that the finite element can not compute, e.g., flags that pertain to data produced by the mapping. An implementation of this function needs to set up all data fields in the returned object that are necessary to produce the finite-element related data specified by these flags, and may already pre-compute part of this information as discussed above. Elements may want to store these update flags (or a subset of these flags) in InternalDataBase::update_each so they know at the time when FiniteElement::fill_fe_subface_values() is called what they are supposed to compute
[in]mappingA reference to the mapping used for computing values and derivatives of shape functions.
[in]quadratureA reference to the object that describes where the shape functions should be evaluated.
[out]output_dataA reference to the object that FEValues will use in conjunction with the object returned here and where an implementation of FiniteElement::fill_fe_subface_values() will place the requested information. This allows the current function to already pre-compute pieces of information that can be computed on the reference cell, as discussed above. FEValues guarantees that this output object and the object returned by the current function will always be used together.
Returns
A pointer to an object of a type derived from InternalDataBase and that derived classes can use to store scratch data that can be pre-computed, or for scratch arrays that then only need to be allocated once. The calling site assumes ownership of this object and will delete it when it is no longer necessary.

Reimplemented from FiniteElement< dim, spacedim >.

◆ fill_fe_values() [1/2]

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::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
overrideprotectedvirtual

◆ fill_fe_face_values() [1/3]

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::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
overrideprotectedvirtual

◆ fill_fe_subface_values() [1/2]

template<int dim, int spacedim = dim>
virtual void FESystem< dim, spacedim >::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
overrideprotectedvirtual

◆ compute_fill()

template<int dim, int spacedim = dim>
template<class Q_or_QC >
void FESystem< dim, spacedim >::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
protected

Do the work for the three fill_fe*_values functions.

Calls (among other things) fill_fe_([sub]face)_values of the base elements. Calls fill_fe_values if face_no==invalid_face_no and sub_no==invalid_face_no; calls fill_fe_face_values if face_no==invalid_face_no and sub_no!=invalid_face_no; and calls fill_fe_subface_values if face_no!=invalid_face_no and sub_no!=invalid_face_no.

◆ initialize()

template<int dim, int spacedim = dim>
void FESystem< dim, spacedim >::initialize ( const std::vector< const FiniteElement< dim, spacedim > * > &  fes,
const std::vector< unsigned int > &  multiplicities 
)
private

This function is simply singled out of the constructors since there are several of them. It sets up the index table for the system as well as restriction and prolongation matrices.

◆ build_interface_constraints()

template<int dim, int spacedim = dim>
void FESystem< dim, spacedim >::build_interface_constraints ( )
private

Used by initialize.

◆ hp_object_dof_identities()

template<int dim, int spacedim = dim>
template<int structdim>
std::vector< std::pair< unsigned int, unsigned int > > FESystem< dim, spacedim >::hp_object_dof_identities ( const FiniteElement< dim, spacedim > &  fe_other,
const unsigned int  face_no = 0 
) const
private

A function that computes the hp_vertex_dof_identities(), hp_line_dof_identities(), or hp_quad_dof_identities(), depending on the value of the template parameter.

◆ operator^()

template<int dim, int spacedim = dim>
std::pair< std::unique_ptr< FiniteElement< dim, spacedim > >, unsigned int > FiniteElement< dim, spacedim >::operator^ ( const unsigned int  multiplicity) const
inherited

Creates information for creating a FESystem with this class as base element and with multiplicity multiplicity. In particular, the return type of this function can be used in the constructor for a FESystem object. This function calls clone() and hence creates a copy of the current object.

◆ prolongation_is_implemented()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::prolongation_is_implemented ( ) const
inherited

Return whether this element implements its prolongation matrices. The return value also indicates whether a call to the get_prolongation_matrix() function will generate an error or not.

Note, that this function returns true only if the prolongation matrices of the isotropic and all anisotropic refinement cases are implemented. If you are interested in the prolongation matrices for isotropic refinement only, use the isotropic_prolongation_is_implemented function instead.

This function is mostly here in order to allow us to write more efficient test programs which we run on all kinds of weird elements, and for which we simply need to exclude certain tests in case something is not implemented. It will in general probably not be a great help in applications, since there is not much one can do if one needs these features and they are not implemented. This function could be used to check whether a call to get_prolongation_matrix() will succeed; however, one then still needs to cope with the lack of information this just expresses.

◆ isotropic_prolongation_is_implemented()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::isotropic_prolongation_is_implemented ( ) const
inherited

Return whether this element implements its prolongation matrices for isotropic children. The return value also indicates whether a call to the get_prolongation_matrix function will generate an error or not.

This function is mostly here in order to allow us to write more efficient test programs which we run on all kinds of weird elements, and for which we simply need to exclude certain tests in case something is not implemented. It will in general probably not be a great help in applications, since there is not much one can do if one needs these features and they are not implemented. This function could be used to check whether a call to get_prolongation_matrix() will succeed; however, one then still needs to cope with the lack of information this just expresses.

◆ restriction_is_implemented()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::restriction_is_implemented ( ) const
inherited

Return whether this element implements its restriction matrices. The return value also indicates whether a call to the get_restriction_matrix() function will generate an error or not.

Note, that this function returns true only if the restriction matrices of the isotropic and all anisotropic refinement cases are implemented. If you are interested in the restriction matrices for isotropic refinement only, use the isotropic_restriction_is_implemented() function instead.

This function is mostly here in order to allow us to write more efficient test programs which we run on all kinds of weird elements, and for which we simply need to exclude certain tests in case something is not implemented. It will in general probably not be a great help in applications, since there is not much one can do if one needs these features and they are not implemented. This function could be used to check whether a call to get_restriction_matrix() will succeed; however, one then still needs to cope with the lack of information this just expresses.

◆ isotropic_restriction_is_implemented()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::isotropic_restriction_is_implemented ( ) const
inherited

Return whether this element implements its restriction matrices for isotropic children. The return value also indicates whether a call to the get_restriction_matrix() function will generate an error or not.

This function is mostly here in order to allow us to write more efficient test programs which we run on all kinds of weird elements, and for which we simply need to exclude certain tests in case something is not implemented. It will in general probably not be a great help in applications, since there is not much one can do if one needs these features and they are not implemented. This function could be used to check whether a call to get_restriction_matrix() will succeed; however, one then still needs to cope with the lack of information this just expresses.

◆ restriction_is_additive()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::restriction_is_additive ( const unsigned int  index) const
inherited

Access the restriction_is_additive_flags field. See the discussion about restriction matrices in the general class documentation for more information.

The index must be between zero and the number of shape functions of this element.

◆ constraints()

template<int dim, int spacedim = dim>
const FullMatrix< double > & FiniteElement< dim, spacedim >::constraints ( const ::internal::SubfaceCase< dim > &  subface_case = ::internal::SubfaceCase< dim >::case_isotropic) const
inherited

Return a read only reference to the matrix that describes the constraints at the interface between a refined and an unrefined cell.

Some finite elements do not (yet) implement hanging node constraints. If this is the case, then this function will generate an exception, since no useful return value can be generated. If you should have a way to live with this, then you might want to use the constraints_are_implemented() function to check up front whether this function will succeed or generate the exception.

◆ constraints_are_implemented()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::constraints_are_implemented ( const ::internal::SubfaceCase< dim > &  subface_case = ::internal::SubfaceCase< dim >::case_isotropic) const
inherited

Return whether this element implements its hanging node constraints. The return value also indicates whether a call to the constraints() function will generate an error or not.

This function is mostly here in order to allow us to write more efficient test programs which we run on all kinds of weird elements, and for which we simply need to exclude certain tests in case hanging node constraints are not implemented. It will in general probably not be a great help in applications, since there is not much one can do if one needs hanging node constraints and they are not implemented. This function could be used to check whether a call to constraints() will succeed; however, one then still needs to cope with the lack of information this just expresses.

◆ operator==() [1/2]

template<int dim, int spacedim = dim>
virtual bool FiniteElement< dim, spacedim >::operator== ( const FiniteElement< dim, spacedim > &  fe) const
virtualinherited

Comparison operator.

The implementation in the current class checks for equality of the following pieces of information between the current object and the one given as argument, in this order:

  • the dynamic type (i.e., the type of the most derived class) of the current object and of the given object,
  • the name returned by get_name(),
  • as all of the fields in FiniteElementData,
  • constraint matrices.

This covers most cases where elements can differ, but there are cases of derived elements that are different and for which the current function still returns true. For these cases, derived classes should overload this function.

Note
This operator specifically does not check the following member variables of the current class:
  • restriction matrices,
  • prolongation matrices of this object and the argument. This is because these member variables may be initialized only on demand by derived classes, rather than being available immediately. Consequently, comparing these members would not only be costly because these are generally big arrays, but also because their computation may be expensive. On the other hand, derived classes for which these arrays may differ for two objects even though the above list compares as equal, will probably want to implement their own operator==() anyway.

◆ operator==() [2/2]

template<int dim>
bool FiniteElementData< dim >::operator== ( const FiniteElementData< dim > &  f) const
inherited

Comparison operator.

Definition at line 195 of file fe_data.cc.

◆ operator!=()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::operator!= ( const FiniteElement< dim, spacedim > &  ) const
inherited

Non-equality comparison operator. Defined in terms of the equality comparison operator.

◆ system_to_component_index()

template<int dim, int spacedim = dim>
std::pair< unsigned int, unsigned int > FiniteElement< dim, spacedim >::system_to_component_index ( const unsigned int  index) const
inherited

Compute vector component and index of this shape function within the shape functions corresponding to this component from the index of a shape function within this finite element.

If the element is scalar, then the component is always zero, and the index within this component is equal to the overall index.

If the shape function referenced has more than one non-zero component, then it cannot be associated with one vector component, and an exception of type ExcShapeFunctionNotPrimitive will be raised.

Note that if the element is composed of other (base) elements, and a base element has more than one component but all its shape functions are primitive (i.e. are non-zero in only one component), then this mapping contains valid information. However, the index of a shape function of this element within one component (i.e. the second number of the respective entry of this array) does not indicate the index of the respective shape function within the base element (since that has more than one vector-component). For this information, refer to the system_to_base_table field and the system_to_base_index() function.

See the class description above for an example of how this function is typically used.

The use of this function is explained extensively in the step-8 and step-20 tutorial programs as well as in the Handling vector valued problems topic.

◆ component_to_system_index()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::component_to_system_index ( const unsigned int  component,
const unsigned int  index 
) const
inherited

Compute the shape function for the given vector component and index.

If the element is scalar, then the component must be zero, and the index within this component is equal to the overall index.

This is the opposite operation from the system_to_component_index() function.

◆ face_system_to_component_index()

template<int dim, int spacedim = dim>
std::pair< unsigned int, unsigned int > FiniteElement< dim, spacedim >::face_system_to_component_index ( const unsigned int  index,
const unsigned int  face_no = 0 
) const
inherited

Same as system_to_component_index(), but do it for shape functions and their indices on a face. The range of allowed indices is therefore 0..dofs_per_face.

You will rarely need this function in application programs, since almost all application codes only need to deal with cell indices, not face indices. The function is mainly there for use inside the library.

◆ adjust_quad_dof_index_for_face_orientation()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::adjust_quad_dof_index_for_face_orientation ( const unsigned int  index,
const unsigned int  face_no,
const unsigned char  combined_orientation 
) const
inherited

Given a local dof index on a quad, return the local index accounting for the face orientation combined_orientation. This is only necessary in 3d: consequently, if this function is called in 1d or 2d then an exception is thrown.

◆ adjust_line_dof_index_for_line_orientation()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::adjust_line_dof_index_for_line_orientation ( const unsigned int  index,
const unsigned char  combined_orientation 
) const
inherited

Given a local dof index on a line and the orientation combined_orientation of that line, return the local dof which accounts for combined_orientation.

Note
In both 1d and 2d all-quadrilateral meshes all lines have the standard orientation. However, since 2d meshes may contain both quadrilaterals and triangles, this assumption cannot be made in this class.

◆ get_nonzero_components()

template<int dim, int spacedim = dim>
const ComponentMask & FiniteElement< dim, spacedim >::get_nonzero_components ( const unsigned int  i) const
inherited

Return in which of the vector components of this finite element the ith shape function is non-zero. The length of the returned array is equal to the number of vector components of this element.

For most finite element spaces, the result of this function will be a vector with exactly one element being true, since for most spaces the individual vector components are independent. In that case, the component with the single zero is also the first element of what system_to_component_index() returns.

Only for those spaces that couple the components, for example to make a shape function divergence free, will there be more than one true entry. Elements for which this is true are called non-primitive (see GlossPrimitive).

◆ n_nonzero_components()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::n_nonzero_components ( const unsigned int  i) const
inherited

Return in how many vector components the ith shape function is non-zero. This value equals the number of entries equal to true in the result of the get_nonzero_components() function.

For most finite element spaces, the result will be equal to one. It is not equal to one only for those ansatz spaces for which vector-valued shape functions couple the individual components, for example in order to make them divergence-free.

◆ is_primitive() [1/2]

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::is_primitive ( ) const
inherited

Return whether the entire finite element is primitive, in the sense that all its shape functions are primitive. If the finite element is scalar, then this is always the case.

Since this is an extremely common operation, the result is cached and returned by this function.

◆ is_primitive() [2/2]

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::is_primitive ( const unsigned int  i) const
inherited

Return whether the ith shape function is primitive in the sense that the shape function is non-zero in only one vector component. Non-primitive shape functions would then, for example, be those of divergence free ansatz spaces, in which the individual vector components are coupled.

The result of the function is true if and only if the result of n_nonzero_components(i) is equal to one.

◆ get_local_dof_sparsity_pattern()

template<int dim, int spacedim = dim>
virtual const Table< 2, bool > & FiniteElement< dim, spacedim >::get_local_dof_sparsity_pattern ( ) const
virtualinherited

Return a table (or sparsity pattern) with information which of the local DoFs per cell couple with each other.

If the FiniteElement returns an empty (0 by 0) table, which is the default implementation for any class that does not override this function, all DoFs are assumed to couple.

Otherwise, this function returns a square table with n_dofs_per_cell rows and columns. The entry (i,j) then denotes if the DoF i and j are coupled. This should be true if the support of the shape functions have a non-empty intersection.

An example for an element that does make use of this feature is FE_Q_iso_Q1.

◆ n_base_elements()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::n_base_elements ( ) const
inherited

Number of base elements in a mixed discretization.

Note that even for vector valued finite elements, the number of components needs not coincide with the number of base elements, since they may be reused. For example, if you create a FESystem with three identical finite element classes by using the constructor that takes one finite element and a multiplicity, then the number of base elements is still one, although the number of components of the finite element is equal to the multiplicity.

◆ element_multiplicity()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::element_multiplicity ( const unsigned int  index) const
inherited

This index denotes how often the base element index is used in a composed element. If the element is atomic, then the result is always equal to one. See the documentation for the n_base_elements() function for more details.

◆ get_sub_fe() [2/2]

template<int dim, int spacedim = dim>
const FiniteElement< dim, spacedim > & FiniteElement< dim, spacedim >::get_sub_fe ( const ComponentMask mask) const
inherited

Return a reference to a contained finite element that matches the components selected by the given ComponentMask mask.

For an arbitrarily nested FESystem, this function returns the inner-most FiniteElement that matches the given mask. The method fails if the mask does not exactly match one of the contained finite elements. It is most useful if the current object is an FESystem, as the return value can only be this in all other cases.

Note that the returned object can be an FESystem if the mask matches it but not any of the contained objects.

Let us illustrate the function with the an FESystem fe with 7 components:

FESystem<2> fe_velocity(FE_Q<2>(2), 2);
FE_Q<2> fe_pressure(1);
FE_DGP<2> fe_dg(0);
FE_BDM<2> fe_nonprim(1);
FESystem<2> fe(fe_velocity, 1, fe_pressure, 1, fe_dg, 2, fe_nonprim, 1);

The following table lists all possible component masks you can use:

ComponentMask Result Description
[true,true,true,true,true,true,true] FESystem<2>[FESystem<2>[FE_Q<2>(2)^2]-FE_Q<2>(1)-FE_DGP<2>(0)^2-FE_BDM<2>(1)] fe itself, the whole FESystem
[true,true,false,false,false,false,false] FESystem<2>[FE_Q<2>(2)^2] just the fe_velocity
[true,false,false,false,false,false,false] FE_Q<2>(2) The first component in fe_velocity
[false,true,false,false,false,false,false] FE_Q<2>(2) The second component in fe_velocity
[false,false,true,false,false,false,false] FE_Q<2>(1) fe_pressure
[false,false,false,true,false,false,false] FE_DGP<2>(0) first copy of fe_dg
[false,false,false,false,true,false,false] FE_DGP<2>(0) second copy of fe_dg
[false,false,false,false,false,true,true] FE_BDM<2>(1) both components of fe_nonprim

◆ system_to_base_index()

template<int dim, int spacedim = dim>
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > FiniteElement< dim, spacedim >::system_to_base_index ( const unsigned int  index) const
inherited

Return for shape function index the base element it belongs to, the number of the copy of this base element (which is between zero and the multiplicity of this element), and the index of this shape function within this base element.

If the element is not composed of others, then base and instance are always zero, and the index is equal to the number of the shape function. If the element is composed of single instances of other elements (i.e. all with multiplicity one) all of which are scalar, then base values and dof indices within this element are equal to the system_to_component_table. It differs only in case the element is composed of other elements and at least one of them is vector-valued itself.

See the class documentation above for an example of how this function is typically used.

This function returns valid values also in the case of vector-valued (i.e. non-primitive) shape functions, in contrast to the system_to_component_index() function.

◆ face_system_to_base_index()

template<int dim, int spacedim = dim>
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > FiniteElement< dim, spacedim >::face_system_to_base_index ( const unsigned int  index,
const unsigned int  face_no = 0 
) const
inherited

Same as system_to_base_index(), but for degrees of freedom located on a face. The range of allowed indices is therefore 0..dofs_per_face.

You will rarely need this function in application programs, since almost all application codes only need to deal with cell indices, not face indices. The function is mainly there for use inside the library.

◆ first_block_of_base()

template<int dim, int spacedim = dim>
types::global_dof_index FiniteElement< dim, spacedim >::first_block_of_base ( const unsigned int  b) const
inherited

Given a base element number, return the first block of a BlockVector it would generate.

◆ component_to_base_index()

template<int dim, int spacedim = dim>
std::pair< unsigned int, unsigned int > FiniteElement< dim, spacedim >::component_to_base_index ( const unsigned int  component) const
inherited

For each vector component, return which base element implements this component and which vector component in this base element this is. This information is only of interest for vector-valued finite elements which are composed of several sub-elements. In that case, one may want to obtain information about the element implementing a certain vector component, which can be done using this function and the FESystem::base_element() function.

If this is a scalar finite element, then the return value is always equal to a pair of zeros.

◆ block_to_base_index()

template<int dim, int spacedim = dim>
std::pair< unsigned int, unsigned int > FiniteElement< dim, spacedim >::block_to_base_index ( const unsigned int  block) const
inherited

Return the base element for this block and the number of the copy of the base element.

◆ system_to_block_index()

template<int dim, int spacedim = dim>
std::pair< unsigned int, types::global_dof_index > FiniteElement< dim, spacedim >::system_to_block_index ( const unsigned int  component) const
inherited

The vector block and the index inside the block for this shape function.

◆ component_to_block_index()

template<int dim, int spacedim = dim>
unsigned int FiniteElement< dim, spacedim >::component_to_block_index ( const unsigned int  component) const
inherited

The vector block for this component.

◆ component_mask() [1/4]

template<int dim, int spacedim = dim>
ComponentMask FiniteElement< dim, spacedim >::component_mask ( const FEValuesExtractors::Scalar scalar) const
inherited

Return a component mask with as many elements as this object has vector components and of which exactly the one component is true that corresponds to the given argument. See the glossary for more information.

Parameters
scalarAn object that represents a single scalar vector component of this finite element.
Returns
A component mask that is false in all components except for the one that corresponds to the argument.

◆ component_mask() [2/4]

template<int dim, int spacedim = dim>
ComponentMask FiniteElement< dim, spacedim >::component_mask ( const FEValuesExtractors::Vector vector) const
inherited

Return a component mask with as many elements as this object has vector components and of which exactly the dim components are true that correspond to the given argument. See the glossary for more information.

Parameters
vectorAn object that represents dim vector components of this finite element.
Returns
A component mask that is false in all components except for the ones that corresponds to the argument.

◆ component_mask() [3/4]

template<int dim, int spacedim = dim>
ComponentMask FiniteElement< dim, spacedim >::component_mask ( const FEValuesExtractors::SymmetricTensor< 2 > &  sym_tensor) const
inherited

Return a component mask with as many elements as this object has vector components and of which exactly the dim*(dim+1)/2 components are true that correspond to the given argument. See the glossary for more information.

Parameters
sym_tensorAn object that represents dim*(dim+1)/2 components of this finite element that are jointly to be interpreted as forming a symmetric tensor.
Returns
A component mask that is false in all components except for the ones that corresponds to the argument.

◆ component_mask() [4/4]

template<int dim, int spacedim = dim>
ComponentMask FiniteElement< dim, spacedim >::component_mask ( const BlockMask block_mask) const
inherited

Given a block mask (see this glossary entry), produce a component mask (see this glossary entry) that represents the components that correspond to the blocks selected in the input argument. This is essentially a conversion operator from BlockMask to ComponentMask.

Parameters
block_maskThe mask that selects individual blocks of the finite element
Returns
A mask that selects those components corresponding to the selected blocks of the input argument.

◆ block_mask() [1/4]

template<int dim, int spacedim = dim>
BlockMask FiniteElement< dim, spacedim >::block_mask ( const FEValuesExtractors::Scalar scalar) const
inherited

Return a block mask with as many elements as this object has blocks and of which exactly the one component is true that corresponds to the given argument. See the glossary for more information.

Note
This function will only succeed if the scalar referenced by the argument encompasses a complete block. In other words, if, for example, you pass an extractor for the single \(x\) velocity and this object represents an FE_RaviartThomas object, then the single scalar object you selected is part of a larger block and consequently there is no block mask that would represent it. The function will then produce an exception.
Parameters
scalarAn object that represents a single scalar vector component of this finite element.
Returns
A component mask that is false in all components except for the one that corresponds to the argument.

◆ block_mask() [2/4]

template<int dim, int spacedim = dim>
BlockMask FiniteElement< dim, spacedim >::block_mask ( const FEValuesExtractors::Vector vector) const
inherited

Return a component mask with as many elements as this object has vector components and of which exactly the dim components are true that correspond to the given argument. See the glossary for more information.

Note
The same caveat applies as to the version of the function above: The extractor object passed as argument must be so that it corresponds to full blocks and does not split blocks of this element.
Parameters
vectorAn object that represents dim vector components of this finite element.
Returns
A component mask that is false in all components except for the ones that corresponds to the argument.

◆ block_mask() [3/4]

template<int dim, int spacedim = dim>
BlockMask FiniteElement< dim, spacedim >::block_mask ( const FEValuesExtractors::SymmetricTensor< 2 > &  sym_tensor) const
inherited

Return a component mask with as many elements as this object has vector components and of which exactly the dim*(dim+1)/2 components are true that correspond to the given argument. See the glossary for more information.

Note
The same caveat applies as to the version of the function above: The extractor object passed as argument must be so that it corresponds to full blocks and does not split blocks of this element.
Parameters
sym_tensorAn object that represents dim*(dim+1)/2 components of this finite element that are jointly to be interpreted as forming a symmetric tensor.
Returns
A component mask that is false in all components except for the ones that corresponds to the argument.

◆ block_mask() [4/4]

template<int dim, int spacedim = dim>
BlockMask FiniteElement< dim, spacedim >::block_mask ( const ComponentMask component_mask) const
inherited

Given a component mask (see this glossary entry), produce a block mask (see this glossary entry) that represents the blocks that correspond to the components selected in the input argument. This is essentially a conversion operator from ComponentMask to BlockMask.

Note
This function will only succeed if the components referenced by the argument encompasses complete blocks. In other words, if, for example, you pass an component mask for the single \(x\) velocity and this object represents an FE_RaviartThomas object, then the single component you selected is part of a larger block and consequently there is no block mask that would represent it. The function will then produce an exception.
Parameters
component_maskThe mask that selects individual components of the finite element
Returns
A mask that selects those blocks corresponding to the selected blocks of the input argument.

◆ get_unit_support_points()

template<int dim, int spacedim = dim>
const std::vector< Point< dim > > & FiniteElement< dim, spacedim >::get_unit_support_points ( ) const
inherited

Return the support points of the trial functions on the unit cell, if the derived finite element defines them. Finite elements that allow some kind of interpolation operation usually have support points. On the other hand, elements that define their degrees of freedom by, for example, moments on faces, or as derivatives, don't have support points. In that case, the returned field is empty.

If the finite element defines support points, then their number equals the number of degrees of freedom of the element. The order of points in the array matches that returned by the cell->get_dof_indices function.

See the class documentation for details on support points.

Note
Finite elements' implementation of this function returns these points in the same order as shape functions. The order of shape functions is typically documented in the class documentation of the various finite element classes. In particular, shape functions (and consequently the mapped quadrature points discussed in the class documentation of this class) will then traverse first those shape functions located on vertices, then on lines, then on quads, etc.
If this element implements support points, then it will return one such point per shape function. Since multiple shape functions may be defined at the same location, the support points returned here may be duplicated. An example would be an element of the kind FESystem(FE_Q(1),3) for which each support point would appear three times in the returned array.

◆ has_support_points()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::has_support_points ( ) const
inherited

Return whether a finite element has defined support points. If the result is true, then a call to the get_unit_support_points() yields an array with dofs_per_cell entries. Note that the function's name is poorly chosen: The function does not return whether an element has support points, but whether its implementation is able to provide a list of support points via get_unit_support_points().

The result may be false if a finite element defines itself not by interpolating shape functions, but by other means. A typical example are discontinuous \(P\)-type elements on quadrilaterals (rather than the common \(Q\)-type elements on quadrilaterals). Elements will generally only true if they construct their shape functions by the requirement that they be nonzero at a certain point and zero at all the points associated with the other shape functions. In other words, if the "node functionals" that form the dual space of the finite element space and are used to define the shape functions are point evaluations.

In composed elements (i.e. for the FESystem class), the result will be true if all the base elements have defined support points. FE_Nothing is a special case since it does not have support point (it has no shape functions, after all), and so returns an empty array from its get_unit_support_points() function. Nonetheless, because that array has the right size, it reports true in the current function.

◆ get_unit_face_support_points()

template<int dim, int spacedim = dim>
const std::vector< Point< dim - 1 > > & FiniteElement< dim, spacedim >::get_unit_face_support_points ( const unsigned int  face_no = 0) const
inherited

Return the support points of the trial functions on the unit face, if the derived finite element defines some. Finite elements that allow some kind of interpolation operation usually have support points. On the other hand, elements that define their degrees of freedom by, for example, moments on faces, or as derivatives, don't have support points. In that case, the returned field is empty

Note that elements that have support points need not necessarily have some on the faces, even if the interpolation points are located physically on a face. For example, the discontinuous elements have interpolation points on the vertices, and for higher degree elements also on the faces, but they are not defined to be on faces since in that case degrees of freedom from both sides of a face (or from all adjacent elements to a vertex) would be identified with each other, which is not what we would like to have). Logically, these degrees of freedom are therefore defined to belong to the cell, rather than the face or vertex. In that case, the returned element would therefore have length zero.

If the finite element defines support points, then their number equals the number of degrees of freedom on the face (dofs_per_face). The order of points in the array matches that returned by the cell->face(face)->get_dof_indices function.

See the class documentation for details on support points.

◆ has_face_support_points()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::has_face_support_points ( const unsigned int  face_no = 0) const
inherited

Return whether a finite element has defined support points on faces. If the result is true, then a call to the get_unit_face_support_points() yields an array with dofs_per_face entries. Note that the function's name is poorly chosen: The function does not return whether an element has support points, but whether its implementation is able to provide a list of support points via get_unit_face_support_points().

For more information, see the documentation for the has_support_points() function.

◆ get_generalized_support_points()

template<int dim, int spacedim = dim>
const std::vector< Point< dim > > & FiniteElement< dim, spacedim >::get_generalized_support_points ( ) const
inherited

Return a vector of generalized support points.

Note
The vector returned by this function is always a minimal set of unique support points. This is in contrast to the behavior of get_unit_support_points() that returns a repeated list of unit support points for an FESystem of numerous (Lagrangian) base elements. As a consequence, it is possible to have fewer generalized support points than degrees of freedom in the element. An example is the element FESystem<dim>(FE_Q<dim>(1), 2), which has two copies of the \(Q_1\) element. In 2d, each copy has 4 degrees of freedom, and each copy has its support points in the four vertices of the cell. While the get_support_points() function would return a vector of size 8 in which each of the vertices is listed twice, this function strips out the duplicates and returns a vector of length 4 in which each vertex is listed only once. This is possible because the purpose of this function is to return a list of points so that it is possible to interpolate an arbitrary function onto the finite element space, and this is possible by knowing the two components of the function in question at the four vertices of the cell – it is not necessary to ask for this information twice at each vertex.

See the glossary entry on generalized support points for more information.

◆ has_generalized_support_points()

template<int dim, int spacedim = dim>
bool FiniteElement< dim, spacedim >::has_generalized_support_points ( ) const
inherited

Return whether a finite element has defined generalized support points. If the result is true, then a call to the get_generalized_support_points() yields an array with minimal set of unique support points. Note that the function's name is poorly chosen: The function does not return whether an element has support points, but whether its implementation is able to provide a list of support points via get_unit_support_points().

See the glossary entry on generalized support points or the documentation for the has_support_points() function for more information.

◆ get_associated_geometry_primitive()

template<int dim, int spacedim = dim>
GeometryPrimitive FiniteElement< dim, spacedim >::get_associated_geometry_primitive ( const unsigned int  cell_dof_index) const
inherited

For a given degree of freedom, return whether it is logically associated with a vertex, line, quad or hex.

For instance, for continuous finite elements this coincides with the lowest dimensional object the support point of the degree of freedom lies on. To give an example, for \(Q_1\) elements in 3d, every degree of freedom is defined by a shape function that we get by interpolating using support points that lie on the vertices of the cell. The support of these points of course extends to all edges connected to this vertex, as well as the adjacent faces and the cell interior, but we say that logically the degree of freedom is associated with the vertex as this is the lowest-dimensional object it is associated with. Likewise, for \(Q_2\) elements in 3d, the degrees of freedom with support points at edge midpoints would yield a value of GeometryPrimitive::line from this function, whereas those on the centers of faces in 3d would return GeometryPrimitive::quad.

To make this more formal, the kind of object returned by this function represents the object so that the support of the shape function corresponding to the degree of freedom, (i.e., that part of the domain where the function "lives") is the union of all of the cells sharing this object. To return to the example above, for \(Q_2\) in 3d, the shape function with support point at an edge midpoint has support on all cells that share the edge and not only the cells that share the adjacent faces, and consequently the function will return GeometryPrimitive::line.

On the other hand, for discontinuous elements of type \(DGQ_2\), a degree of freedom associated with an interpolation polynomial that has its support point physically located at a line bounding a cell, but is nonzero only on one cell. Consequently, it is logically associated with the interior of that cell (i.e., with a GeometryPrimitive::quad in 2d and a GeometryPrimitive::hex in 3d).

Parameters
[in]cell_dof_indexThe index of a shape function or degree of freedom. This index must be in the range [0,dofs_per_cell).
Note
The integer value of the object returned by this function equals the dimensionality of the object it describes, and can consequently be used in generic programming paradigms. For example, if a degree of freedom is associated with a vertex, then this function returns GeometryPrimitive::vertex, which has a numeric value of zero (the dimensionality of a vertex).

◆ reinit_restriction_and_prolongation_matrices()

template<int dim, int spacedim = dim>
void FiniteElement< dim, spacedim >::reinit_restriction_and_prolongation_matrices ( const bool  isotropic_restriction_only = false,
const bool  isotropic_prolongation_only = false 
)
protectedinherited

Reinit the vectors of restriction and prolongation matrices to the right sizes: For every refinement case, except for RefinementCase::no_refinement, and for every child of that refinement case the space of one restriction and prolongation matrix is allocated, see the documentation of the restriction and prolongation vectors for more detail on the actual vector sizes.

Parameters
isotropic_restriction_onlyonly the restriction matrices required for isotropic refinement are reinited to the right size.
isotropic_prolongation_onlyonly the prolongation matrices required for isotropic refinement are reinited to the right size.

◆ interface_constraints_size()

template<int dim, int spacedim = dim>
TableIndices< 2 > FiniteElement< dim, spacedim >::interface_constraints_size ( ) const
protectedinherited

Return the size of interface constraint matrices. Since this is needed in every derived finite element class when initializing their size, it is placed into this function, to avoid having to recompute the dimension-dependent size of these matrices each time.

Note that some elements do not implement the interface constraints for certain polynomial degrees. In this case, this function still returns the size these matrices should have when implemented, but the actual matrices are empty.

◆ compute_n_nonzero_components()

template<int dim, int spacedim = dim>
static std::vector< unsigned int > FiniteElement< dim, spacedim >::compute_n_nonzero_components ( const std::vector< ComponentMask > &  nonzero_components)
staticprotectedinherited

Given the pattern of nonzero components for each shape function, compute for each entry how many components are non-zero for each shape function. This function is used in the constructor of this class.

◆ get_face_data() [2/2]

template<int dim, int spacedim = dim>
virtual std::unique_ptr< InternalDataBase > FiniteElement< dim, spacedim >::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
protectedvirtualinherited
Deprecated:
Use the version taking a hp::QCollection argument.

◆ fill_fe_values() [2/2]

template<int dim, int spacedim = dim>
virtual void FiniteElement< dim, spacedim >::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
protectedpure virtualinherited

Compute information about the shape functions on the cell denoted by the first argument. Derived classes will have to implement this function based on the kind of element they represent. It is called by FEValues::reinit().

Conceptually, this function evaluates shape functions and their derivatives at the quadrature points represented by the mapped locations of those described by the quadrature argument to this function. In many cases, computing derivatives of shape functions (and in some cases also computing values of shape functions) requires making use of the mapping from the reference to the real cell; this information can either be taken from the mapping_data object that has been filled for the current cell before this function is called, or by calling the member functions of a Mapping object with the mapping_internal object that also corresponds to the current cell.

The information computed by this function is used to fill the various member variables of the output argument of this function. Which of the member variables of that structure should be filled is determined by the update flags stored in the FiniteElement::InternalDataBase::update_each field of the object passed to this function. These flags are typically set by FiniteElement::get_data(), FiniteElement::get_face_date() and FiniteElement::get_subface_data() (or, more specifically, implementations of these functions in derived classes).

An extensive discussion of the interaction between this function and FEValues can be found in the How Mapping, FiniteElement, and FEValues work together documentation topic.

Parameters
[in]cellThe cell of the triangulation for which this function is to compute a mapping from the reference cell to.
[in]cell_similarityWhether or not the cell given as first argument is simply a translation, rotation, etc of the cell for which this function was called the most recent time. This information is computed simply by matching the vertices (as stored by the Triangulation) between the previous and the current cell. The value passed here may be modified by implementations of this function and should then be returned (see the discussion of the return value of this function).
[in]quadratureA reference to the quadrature formula in use for the current evaluation. This quadrature object is the same as the one used when creating the internal_data object. The current object is then responsible for evaluating shape functions at the mapped locations of the quadrature points represented by this object.
[in]mappingA reference to the mapping object used to map from the reference cell to the current cell. This object was used to compute the information in the mapping_data object before the current function was called. It is also the mapping object that created the mapping_internal object via Mapping::get_data(). You will need the reference to this mapping object most often to call Mapping::transform() to transform gradients and higher derivatives from the reference to the current cell.
[in]mapping_internalAn object specific to the mapping object. What the mapping chooses to store in there is of no relevance to the current function, but you may have to pass a reference to this object to certain functions of the Mapping class (e.g., Mapping::transform()) if you need to call them from the current function.
[in]mapping_dataThe output object into which the Mapping::fill_fe_values() function wrote the mapping information corresponding to the current cell. This includes, for example, Jacobians of the mapping that may be of relevance to the current function, as well as other information that FEValues::reinit() requested from the mapping.
[in]fe_internalA reference to an object previously created by get_data() and that may be used to store information the mapping can compute once on the reference cell. See the documentation of the FiniteElement::InternalDataBase class for an extensive description of the purpose of these objects.
[out]output_dataA reference to an object whose member variables should be computed. Not all of the members of this argument need to be filled; which ones need to be filled is determined by the update flags stored inside the fe_internal object.
Note
FEValues ensures that this function is always called with the same pair of fe_internal and output_data objects. In other words, if an implementation of this function knows that it has written a piece of data into the output argument in a previous call, then there is no need to copy it there again in a later call if the implementation knows that this is the same value.

◆ fill_fe_face_values() [2/3]

template<int dim, int spacedim = dim>
virtual void FiniteElement< dim, spacedim >::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 InternalDataBase fe_internal,
::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &  output_data 
) const
protectedvirtualinherited

This function is the equivalent to FiniteElement::fill_fe_values(), but for faces of cells. See there for an extensive discussion of its purpose. It is called by FEFaceValues::reinit().

Parameters
[in]cellThe cell of the triangulation for which this function is to compute a mapping from the reference cell to.
[in]face_noThe number of the face we are currently considering, indexed among the faces of the cell specified by the previous argument.
[in]quadratureA reference to the quadrature formula in use for the current evaluation. This quadrature object is the same as the one used when creating the internal_data object. The current object is then responsible for evaluating shape functions at the mapped locations of the quadrature points represented by this object.
[in]mappingA reference to the mapping object used to map from the reference cell to the current cell. This object was used to compute the information in the mapping_data object before the current function was called. It is also the mapping object that created the mapping_internal object via Mapping::get_data(). You will need the reference to this mapping object most often to call Mapping::transform() to transform gradients and higher derivatives from the reference to the current cell.
[in]mapping_internalAn object specific to the mapping object. What the mapping chooses to store in there is of no relevance to the current function, but you may have to pass a reference to this object to certain functions of the Mapping class (e.g., Mapping::transform()) if you need to call them from the current function.
[in]mapping_dataThe output object into which the Mapping::fill_fe_values() function wrote the mapping information corresponding to the current cell. This includes, for example, Jacobians of the mapping that may be of relevance to the current function, as well as other information that FEValues::reinit() requested from the mapping.
[in]fe_internalA reference to an object previously created by get_data() and that may be used to store information the mapping can compute once on the reference cell. See the documentation of the FiniteElement::InternalDataBase class for an extensive description of the purpose of these objects.
[out]output_dataA reference to an object whose member variables should be computed. Not all of the members of this argument need to be filled; which ones need to be filled is determined by the update flags stored inside the fe_internal object.

◆ fill_fe_face_values() [3/3]

template<int dim, int spacedim = dim>
virtual void FiniteElement< dim, spacedim >::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
protectedvirtualinherited
Deprecated:
Use the version taking a hp::QCollection argument.

◆ fill_fe_subface_values() [2/2]

template<int dim, int spacedim = dim>
virtual void FiniteElement< dim, spacedim >::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
protectedpure virtualinherited

This function is the equivalent to FiniteElement::fill_fe_values(), but for the children of faces of cells. See there for an extensive discussion of its purpose. It is called by FESubfaceValues::reinit().

Parameters
[in]cellThe cell of the triangulation for which this function is to compute a mapping from the reference cell to.
[in]face_noThe number of the face we are currently considering, indexed among the faces of the cell specified by the previous argument.
[in]sub_noThe number of the subface, i.e., the number of the child of a face, that we are currently considering, indexed among the children of the face specified by the previous argument.
[in]quadratureA reference to the quadrature formula in use for the current evaluation. This quadrature object is the same as the one used when creating the internal_data object. The current object is then responsible for evaluating shape functions at the mapped locations of the quadrature points represented by this object.
[in]mappingA reference to the mapping object used to map from the reference cell to the current cell. This object was used to compute the information in the mapping_data object before the current function was called. It is also the mapping object that created the mapping_internal object via Mapping::get_data(). You will need the reference to this mapping object most often to call Mapping::transform() to transform gradients and higher derivatives from the reference to the current cell.
[in]mapping_internalAn object specific to the mapping object. What the mapping chooses to store in there is of no relevance to the current function, but you may have to pass a reference to this object to certain functions of the Mapping class (e.g., Mapping::transform()) if you need to call them from the current function.
[in]mapping_dataThe output object into which the Mapping::fill_fe_values() function wrote the mapping information corresponding to the current cell. This includes, for example, Jacobians of the mapping that may be of relevance to the current function, as well as other information that FEValues::reinit() requested from the mapping.
[in]fe_internalA reference to an object previously created by get_data() and that may be used to store information the mapping can compute once on the reference cell. See the documentation of the FiniteElement::InternalDataBase class for an extensive description of the purpose of these objects.
[out]output_dataA reference to an object whose member variables should be computed. Not all of the members of this argument need to be filled; which ones need to be filled is determined by the update flags stored inside the fe_internal object.

◆ subscribe()

void EnableObserverPointer::subscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Subscribes a user of the object by storing the pointer validity. The subscriber may be identified by text supplied as identifier.

Definition at line 131 of file enable_observer_pointer.cc.

◆ unsubscribe()

void EnableObserverPointer::unsubscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Unsubscribes a user from the object.

Note
The identifier and the validity pointer must be the same as the one supplied to subscribe().

Definition at line 151 of file enable_observer_pointer.cc.

◆ n_subscriptions()

unsigned int EnableObserverPointer::n_subscriptions ( ) const
inlineinherited

Return the present number of subscriptions to this object. This allows to use this class for reference counted lifetime determination where the last one to unsubscribe also deletes the object.

Definition at line 322 of file enable_observer_pointer.h.

◆ list_subscribers() [1/2]

template<typename StreamType >
void EnableObserverPointer::list_subscribers ( StreamType &  stream) const
inlineinherited

List the subscribers to the input stream.

Definition at line 339 of file enable_observer_pointer.h.

◆ list_subscribers() [2/2]

void EnableObserverPointer::list_subscribers ( ) const
inherited

List the subscribers to deallog.

Definition at line 199 of file enable_observer_pointer.cc.

◆ serialize()

template<class Archive >
void EnableObserverPointer::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineinherited

Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.

This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.

Definition at line 331 of file enable_observer_pointer.h.

◆ check_no_subscribers()

void EnableObserverPointer::check_no_subscribers ( ) const
privatenoexceptinherited

Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.

Note
Since this function is just a consistency check it does nothing in release mode.
If this function is called when there is an uncaught exception then, rather than aborting, this function prints an error message to the standard error stream and returns.

Definition at line 53 of file enable_observer_pointer.cc.

◆ reference_cell()

template<int dim>
ReferenceCell FiniteElementData< dim >::reference_cell ( ) const
inherited

Return the kind of reference cell this element is defined on: For example, whether the element's reference cell is a square or triangle, or similar choices in higher dimensions.

◆ n_unique_2d_subobjects()

template<int dim>
unsigned int FiniteElementData< dim >::n_unique_2d_subobjects ( ) const
inherited

Number of unique 2d subobjects. If all two-dimensional subobjects are of the same kind, the value is one; else it equals the number of two-dimensional subobjects. For example, for hex reference cells with the usual finite elements, each face has the same geometric shape (a square) and each face has the same number and kind of shape functions associated with it; as a consequence, the returned value is one. On the other hand, for a wedge element, the two-dimensional subobjects can be both quadrilaterals and triangles, and so the returned value equals the number of faces of these objects (i.e., five).

◆ n_unique_faces()

template<int dim>
unsigned int FiniteElementData< dim >::n_unique_faces ( ) const
inherited

Number of unique faces. If all faces have the same type (i.e., have the same shape and also have the same kind and number of DoFs associated with them), the value is one; else it equals the number of faces.

◆ n_dofs_per_vertex()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_vertex ( ) const
inherited

Number of dofs per vertex.

◆ n_dofs_per_line()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_line ( ) const
inherited

Number of dofs per line. Not including dofs on lower dimensional objects.

◆ n_dofs_per_quad()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_quad ( unsigned int  face_no = 0) const
inherited

Number of dofs per quad. Not including dofs on lower dimensional objects.

◆ max_dofs_per_quad()

template<int dim>
unsigned int FiniteElementData< dim >::max_dofs_per_quad ( ) const
inherited

Maximum number of dofs per quad. Not including dofs on lower dimensional objects.

◆ n_dofs_per_hex()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_hex ( ) const
inherited

Number of dofs per hex. Not including dofs on lower dimensional objects.

◆ n_dofs_per_face()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_face ( unsigned int  face_no = 0,
unsigned int  child = 0 
) const
inherited

Number of dofs per face, accumulating degrees of freedom of all lower dimensional objects.

◆ max_dofs_per_face()

template<int dim>
unsigned int FiniteElementData< dim >::max_dofs_per_face ( ) const
inherited

Maximum number of dofs per face, accumulating degrees of freedom of all lower dimensional objects.

◆ n_dofs_per_cell()

template<int dim>
unsigned int FiniteElementData< dim >::n_dofs_per_cell ( ) const
inherited

Number of dofs per cell, accumulating degrees of freedom of all lower dimensional objects.

◆ n_dofs_per_object()

template<int dim>
template<int structdim>
unsigned int FiniteElementData< dim >::n_dofs_per_object ( const unsigned int  i = 0) const
inherited

Return the number of degrees per structdim-dimensional object. For structdim==0, the function therefore returns dofs_per_vertex, for structdim==1 dofs_per_line, etc. This function is mostly used to allow some template trickery for functions that should work on all sorts of objects without wanting to use the different names (vertex, line, ...) associated with these objects.

◆ n_components()

template<int dim>
unsigned int FiniteElementData< dim >::n_components ( ) const
inherited

Number of components. See the glossary for more information.

◆ n_blocks()

template<int dim>
unsigned int FiniteElementData< dim >::n_blocks ( ) const
inherited

Number of blocks. See the glossary for more information.

◆ block_indices()

template<int dim>
const BlockIndices & FiniteElementData< dim >::block_indices ( ) const
inherited

Detailed information on block sizes.

◆ tensor_degree()

template<int dim>
unsigned int FiniteElementData< dim >::tensor_degree ( ) const
inherited

Maximal polynomial degree of a shape function in a single coordinate direction.

This function can be used to determine the optimal quadrature rule.

◆ conforms()

template<int dim>
bool FiniteElementData< dim >::conforms ( const Conformity  ) const
inherited

Test whether a finite element space conforms to a certain Sobolev space.

Note
This function will return a true value even if the finite element space has higher regularity than asked for.

◆ get_first_line_index()

template<int dim>
unsigned int FiniteElementData< dim >::get_first_line_index ( ) const
inherited

Return first index of dof on a line.

◆ get_first_quad_index()

template<int dim>
unsigned int FiniteElementData< dim >::get_first_quad_index ( const unsigned int  quad_no = 0) const
inherited

Return first index of dof on a quad.

◆ get_first_hex_index()

template<int dim>
unsigned int FiniteElementData< dim >::get_first_hex_index ( ) const
inherited

Return first index of dof on a hexahedron.

◆ get_first_face_line_index()

template<int dim>
unsigned int FiniteElementData< dim >::get_first_face_line_index ( const unsigned int  face_no = 0) const
inherited

Return first index of dof on a line for face data.

◆ get_first_face_quad_index()

template<int dim>
unsigned int FiniteElementData< dim >::get_first_face_quad_index ( const unsigned int  face_no = 0) const
inherited

Return first index of dof on a quad for face data.

Friends And Related Symbol Documentation

◆ FE_Enriched< dim, spacedim >

template<int dim, int spacedim = dim>
friend class FE_Enriched< dim, spacedim >
friend

Definition at line 1331 of file fe_system.h.

Member Data Documentation

◆ invalid_face_number

template<int dim, int spacedim = dim>
const unsigned int FESystem< dim, spacedim >::invalid_face_number = numbers::invalid_unsigned_int
staticprivate

Value to indicate that a given face or subface number is invalid.

Definition at line 1185 of file fe_system.h.

◆ primitive_offset_tables

template<int dim, int spacedim = dim>
std::vector<Table<2, unsigned int> > FESystem< dim, spacedim >::primitive_offset_tables
private

Lookup tables for indexing primitive elements.

These tables store, for each primitive base element, the array indices into which we will write values. One can think of these indices as a combination of the system index and the number of nonzero components per shape function. This data is needed to copy values from base element value reinitialization to the present element's value reinitialization.

Definition at line 1196 of file fe_system.h.

◆ nonprimitive_offset_tables

template<int dim, int spacedim = dim>
std::vector<std::vector<BaseOffsets> > FESystem< dim, spacedim >::nonprimitive_offset_tables
private

Lookup tables for indexing nonprimitive elements.

Definition at line 1201 of file fe_system.h.

◆ base_elements

template<int dim, int spacedim = dim>
std::vector<std::pair<std::unique_ptr<const FiniteElement<dim, spacedim> >, unsigned int> > FESystem< dim, spacedim >::base_elements
private

Pointers to underlying finite element objects.

This object contains a pointer to each contributing element of a mixed discretization and its multiplicity. It is created by the constructor and constant afterwards.

Definition at line 1212 of file fe_system.h.

◆ generalized_support_points_index_table

template<int dim, int spacedim = dim>
std::vector<std::vector<std::size_t> > FESystem< dim, spacedim >::generalized_support_points_index_table
private

An index table that maps generalized support points of a base element to the vector of generalized support points of the FE System. It holds true that

base_elements[i].generalized_support_points[j];
std::vector< std::pair< std::unique_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
Definition fe_system.h:1212
std::vector< std::vector< std::size_t > > generalized_support_points_index_table
Definition fe_system.h:1226
std::vector< Point< dim > > generalized_support_points
Definition fe.h:2501

for each base element (indexed by i) and each g. s. point of the base element (index by j).

Definition at line 1226 of file fe_system.h.

◆ restriction_matrix_mutex

template<int dim, int spacedim = dim>
std::mutex FESystem< dim, spacedim >::restriction_matrix_mutex
mutableprivate

Mutex variables used for protecting the initialization of restriction and embedding matrices.

Definition at line 1330 of file fe_system.h.

◆ prolongation_matrix_mutex

template<int dim, int spacedim = dim>
std::mutex FESystem< dim, spacedim >::prolongation_matrix_mutex
mutableprivate

Definition at line 1331 of file fe_system.h.

◆ space_dimension

template<int dim, int spacedim = dim>
constexpr unsigned int FiniteElement< dim, spacedim >::space_dimension = spacedim
staticconstexprinherited

The dimension of the image space, corresponding to Triangulation.

Definition at line 661 of file fe.h.

◆ restriction

template<int dim, int spacedim = dim>
std::vector<std::vector<FullMatrix<double> > > FiniteElement< dim, spacedim >::restriction
protectedinherited

Vector of projection matrices. See get_restriction_matrix() above. The constructor initializes these matrices to zero dimensions, which can be changed by derived classes implementing them.

Note, that restriction[refinement_case-1][child] includes the restriction matrix of child child for the RefinementCase refinement_case. Here, we use refinement_case-1 instead of refinement_case as for RefinementCase::no_refinement(=0) there are no restriction matrices available.

Definition at line 2450 of file fe.h.

◆ prolongation

template<int dim, int spacedim = dim>
std::vector<std::vector<FullMatrix<double> > > FiniteElement< dim, spacedim >::prolongation
protectedinherited

Vector of embedding matrices. See get_prolongation_matrix() above. The constructor initializes these matrices to zero dimensions, which can be changed by derived classes implementing them.

Note, that prolongation[refinement_case-1][child] includes the prolongation matrix of child child for the RefinementCase refinement_case. Here, we use refinement_case-1 instead of refinement_case as for RefinementCase::no_refinement(=0) there are no prolongation matrices available.

Definition at line 2464 of file fe.h.

◆ interface_constraints

template<int dim, int spacedim = dim>
FullMatrix<double> FiniteElement< dim, spacedim >::interface_constraints
protectedinherited

Specify the constraints which the dofs on the two sides of a cell interface underlie if the line connects two cells of which one is refined once.

For further details see the general description of the derived class.

This field is obviously useless in one dimension and has there a zero size.

Definition at line 2476 of file fe.h.

◆ unit_support_points

template<int dim, int spacedim = dim>
std::vector<Point<dim> > FiniteElement< dim, spacedim >::unit_support_points
protectedinherited

List of support points on the unit cell, in case the finite element has any. The constructor leaves this field empty, derived classes may write in some contents.

Finite elements that allow some kind of interpolation operation usually have support points. On the other hand, elements that define their degrees of freedom by, for example, moments on faces, or as derivatives, don't have support points. In that case, this field remains empty.

Definition at line 2488 of file fe.h.

◆ unit_face_support_points

template<int dim, int spacedim = dim>
std::vector<std::vector<Point<dim - 1> > > FiniteElement< dim, spacedim >::unit_face_support_points
protectedinherited

Same for the faces. See the description of the get_unit_face_support_points() function for a discussion of what contributes a face support point.

Definition at line 2495 of file fe.h.

◆ generalized_support_points

template<int dim, int spacedim = dim>
std::vector<Point<dim> > FiniteElement< dim, spacedim >::generalized_support_points
protectedinherited

Support points used for interpolation functions of non-Lagrangian elements.

Definition at line 2501 of file fe.h.

◆ generalized_face_support_points

template<int dim, int spacedim = dim>
std::vector<std::vector<Point<dim - 1> > > FiniteElement< dim, spacedim >::generalized_face_support_points
protectedinherited

Face support points used for interpolation functions of non-Lagrangian elements.

Definition at line 2507 of file fe.h.

◆ adjust_quad_dof_index_for_face_orientation_table

template<int dim, int spacedim = dim>
std::vector<Table<2, int> > FiniteElement< dim, spacedim >::adjust_quad_dof_index_for_face_orientation_table
protectedinherited

For faces with non-standard face_orientation in 3d, the dofs on faces (quads) have to be permuted in order to be combined with the correct shape functions. Given a local dof index on a quad, return the shift in the local index, if the face has non-standard face_orientation, i.e. old_index + shift = new_index. In 2d and 1d there is no need for permutation so the vector is empty. In 3d it has the size of dofs_per_quad * 8 , where 8 is the number of orientations, a face can be in (all combinations of the three bool flags face_orientation, face_flip and face_rotation).

The constructor of this class fills this table with zeros, i.e., no permutation at all. Derived finite element classes have to fill this Table with the correct values.

Definition at line 2524 of file fe.h.

◆ adjust_line_dof_index_for_line_orientation_table

template<int dim, int spacedim = dim>
std::vector<int> FiniteElement< dim, spacedim >::adjust_line_dof_index_for_line_orientation_table
protectedinherited

For lines with non-standard orientation in 2d or 3d, the dofs on lines have to be permuted in order to be combined with the correct shape functions. Given a local dof index on a line, return the shift in the local index, if the line has non-standard line_orientation, i.e. old_index + shift = new_index.

The constructor of this class fills this table with zeros, i.e., no permutation at all. Derived finite element classes have to fill this vector with the correct values.

Definition at line 2537 of file fe.h.

◆ system_to_component_table

template<int dim, int spacedim = dim>
std::vector<std::pair<unsigned int, unsigned int> > FiniteElement< dim, spacedim >::system_to_component_table
protectedinherited

Store what system_to_component_index() will return.

Definition at line 2542 of file fe.h.

◆ face_system_to_component_table

template<int dim, int spacedim = dim>
std::vector<std::vector<std::pair<unsigned int, unsigned int> > > FiniteElement< dim, spacedim >::face_system_to_component_table
protectedinherited

Map between linear dofs and component dofs on face. This is filled with default values in the constructor, but derived classes will have to overwrite the information if necessary.

By component, we mean the vector component, not the base element. The information thus makes only sense if a shape function is non-zero in only one component.

Definition at line 2554 of file fe.h.

◆ system_to_base_table

template<int dim, int spacedim = dim>
std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> > FiniteElement< dim, spacedim >::system_to_base_table
protectedinherited

For each shape function, store to which base element and which instance of this base element (in case its multiplicity is greater than one) it belongs, and its index within this base element. If the element is not composed of others, then base and instance are always zero, and the index is equal to the number of the shape function. If the element is composed of single instances of other elements (i.e. all with multiplicity one) all of which are scalar, then base values and dof indices within this element are equal to the system_to_component_table. It differs only in case the element is composed of other elements and at least one of them is vector-valued itself.

This array has valid values also in the case of vector-valued (i.e. non-primitive) shape functions, in contrast to the system_to_component_table.

Definition at line 2573 of file fe.h.

◆ face_system_to_base_table

template<int dim, int spacedim = dim>
std::vector< std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> > > FiniteElement< dim, spacedim >::face_system_to_base_table
protectedinherited

Likewise for the indices on faces.

Definition at line 2580 of file fe.h.

◆ base_to_block_indices

template<int dim, int spacedim = dim>
BlockIndices FiniteElement< dim, spacedim >::base_to_block_indices
protectedinherited

For each base element, store the number of blocks generated by the base and the first block in a block vector it will generate.

Definition at line 2586 of file fe.h.

◆ component_to_base_table

template<int dim, int spacedim = dim>
std::vector<std::pair<std::pair<unsigned int, unsigned int>, unsigned int> > FiniteElement< dim, spacedim >::component_to_base_table
protectedinherited

The base element establishing a component.

For each component number c, the entries have the following meaning:

table[c].first.first
Number of the base element for c. This is the index you can pass to base_element().
table[c].first.second
Component within the base element for c. This value is between 0 and the n_components() of this base element.
table[c].second
Index of the multiple of the base element that contains c. This value is between 0 and the element_multiplicity() of this base element.

This variable is set to the correct size by the constructor of this class, but needs to be initialized by derived classes, unless its size is one and the only entry is a zero, which is the case for scalar elements. In that case, the initialization by the base class is sufficient.

Note
This table is filled by FETools::Compositing::build_cell_tables().

Definition at line 2609 of file fe.h.

◆ restriction_is_additive_flags

template<int dim, int spacedim = dim>
const std::vector<bool> FiniteElement< dim, spacedim >::restriction_is_additive_flags
protectedinherited

A flag determining whether restriction matrices are to be concatenated or summed up. See the discussion about restriction matrices in the general class documentation for more information.

Definition at line 2616 of file fe.h.

◆ nonzero_components

template<int dim, int spacedim = dim>
const std::vector<ComponentMask> FiniteElement< dim, spacedim >::nonzero_components
protectedinherited

For each shape function, give a vector of bools (with size equal to the number of vector components which this finite element has) indicating in which component each of these shape functions is non-zero.

For primitive elements, there is only one non-zero component.

Definition at line 2625 of file fe.h.

◆ n_nonzero_components_table

template<int dim, int spacedim = dim>
const std::vector<unsigned int> FiniteElement< dim, spacedim >::n_nonzero_components_table
protectedinherited

This array holds how many values in the respective entry of the nonzero_components element are non-zero. The array is thus a short-cut to allow faster access to this information than if we had to count the non-zero entries upon each request for this information. The field is initialized in the constructor of this class.

Definition at line 2634 of file fe.h.

◆ cached_primitivity

template<int dim, int spacedim = dim>
const bool FiniteElement< dim, spacedim >::cached_primitivity
protectedinherited

Store whether all shape functions are primitive. Since finding this out is a very common operation, we cache the result, i.e. compute the value in the constructor for simpler access.

Definition at line 2641 of file fe.h.

◆ local_dof_sparsity_pattern

template<int dim, int spacedim = dim>
Table<2, bool> FiniteElement< dim, spacedim >::local_dof_sparsity_pattern
protectedinherited

This table is returned by get_local_dof_sparsity_pattern(). Its meaning is described there in detail. This variable has to be filled by any class derived from FiniteElement that does not want to keep the default empty table (meaning all DoFs couple within the cell).

Definition at line 2649 of file fe.h.

◆ counter

std::atomic<unsigned int> EnableObserverPointer::counter
mutableprivateinherited

Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).

The creator (and owner) of an object is counted in the map below if HE manages to supply identification.

We use the mutable keyword in order to allow subscription to constant objects also.

This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic class template.

Definition at line 227 of file enable_observer_pointer.h.

◆ counter_map

std::map<std::string, unsigned int> EnableObserverPointer::counter_map
mutableprivateinherited

In this map, we count subscriptions for each different identification string supplied to subscribe().

Definition at line 233 of file enable_observer_pointer.h.

◆ validity_pointers

std::vector<std::atomic<bool> *> EnableObserverPointer::validity_pointers
mutableprivateinherited

In this vector, we store pointers to the validity bool in the ObserverPointer objects that subscribe to this class.

Definition at line 249 of file enable_observer_pointer.h.

◆ object_info

const std::type_info* EnableObserverPointer::object_info
mutableprivateinherited

Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.

Definition at line 257 of file enable_observer_pointer.h.

◆ mutex

std::mutex EnableObserverPointer::mutex
staticprivateinherited

A mutex used to ensure data consistency when accessing the mutable members of this class. This lock is used in the subscribe() and unsubscribe() functions, as well as in list_subscribers().

Definition at line 280 of file enable_observer_pointer.h.

◆ dimension

template<int dim>
constexpr unsigned int FiniteElementData< dim >::dimension = dim
staticconstexprinherited

The dimension of the finite element, which is the template parameter dim

Definition at line 301 of file fe_data.h.

◆ reference_cell_kind

template<int dim>
const ReferenceCell FiniteElementData< dim >::reference_cell_kind
privateinherited

Reference cell type.

Definition at line 307 of file fe_data.h.

◆ number_of_unique_2d_subobjects

template<int dim>
const unsigned int FiniteElementData< dim >::number_of_unique_2d_subobjects
privateinherited

Number of unique two-dimensional sub-objects. If all two-dimensional sub-objects have the same type, the value is one; else it equals the number of quads.

Definition at line 314 of file fe_data.h.

◆ number_unique_faces

template<int dim>
const unsigned int FiniteElementData< dim >::number_unique_faces
privateinherited

Number of unique faces. If all faces have the same type, the value is one; else it equals the number of faces.

Definition at line 320 of file fe_data.h.

◆ dofs_per_vertex

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_vertex
inherited

Number of degrees of freedom on a vertex.

Definition at line 326 of file fe_data.h.

◆ dofs_per_line

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_line
inherited

Number of degrees of freedom in a line; not including the degrees of freedom on the vertices of the line.

Definition at line 332 of file fe_data.h.

◆ n_dofs_on_quad

template<int dim>
const std::vector<unsigned int> FiniteElementData< dim >::n_dofs_on_quad
privateinherited

Number of degrees of freedom on quads. If all quads have the same number of degrees freedoms the values equal dofs_per_quad.

Definition at line 339 of file fe_data.h.

◆ dofs_per_quad

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_quad
inherited

Number of degrees of freedom in a quadrilateral; not including the degrees of freedom on the lines and vertices of the quadrilateral.

Definition at line 346 of file fe_data.h.

◆ dofs_per_quad_max

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_quad_max
privateinherited

Maximum number of degrees of freedom on any quad.

Definition at line 352 of file fe_data.h.

◆ dofs_per_hex

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_hex
inherited

Number of degrees of freedom in a hexahedron; not including the degrees of freedom on the quadrilaterals, lines and vertices of the hexahedron.

Definition at line 359 of file fe_data.h.

◆ first_line_index

template<int dim>
const unsigned int FiniteElementData< dim >::first_line_index
inherited

First index of dof on a line.

Definition at line 364 of file fe_data.h.

◆ first_index_of_quads

template<int dim>
const std::vector<unsigned int> FiniteElementData< dim >::first_index_of_quads
privateinherited

First index of a quad. If all quads have the same number of degrees of freedom, only the first index of the first quad is stored since the indices of the others can be simply recomputed.

Definition at line 372 of file fe_data.h.

◆ first_quad_index

template<int dim>
const unsigned int FiniteElementData< dim >::first_quad_index
inherited

First index of dof on a quad.

Definition at line 378 of file fe_data.h.

◆ first_hex_index

template<int dim>
const unsigned int FiniteElementData< dim >::first_hex_index
inherited

First index of dof on a hexahedron.

Definition at line 383 of file fe_data.h.

◆ first_line_index_of_faces

template<int dim>
const std::vector<unsigned int> FiniteElementData< dim >::first_line_index_of_faces
privateinherited

Index of the first line of all faces.

Definition at line 389 of file fe_data.h.

◆ first_face_line_index

template<int dim>
const unsigned int FiniteElementData< dim >::first_face_line_index
inherited

First index of dof on a line for face data.

Definition at line 395 of file fe_data.h.

◆ first_quad_index_of_faces

template<int dim>
const std::vector<unsigned int> FiniteElementData< dim >::first_quad_index_of_faces
privateinherited

Index of the first quad of all faces.

Definition at line 401 of file fe_data.h.

◆ first_face_quad_index

template<int dim>
const unsigned int FiniteElementData< dim >::first_face_quad_index
inherited

First index of dof on a quad for face data.

Definition at line 407 of file fe_data.h.

◆ n_dofs_on_face

template<int dim>
const std::vector<unsigned int> FiniteElementData< dim >::n_dofs_on_face
privateinherited

Number of degrees of freedom on faces. If all faces have the same number of degrees freedoms the values equal dofs_per_quad.

Definition at line 414 of file fe_data.h.

◆ dofs_per_face

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_face
inherited

Number of degrees of freedom on a face. This is the accumulated number of degrees of freedom on all the objects of dimension up to dim-1 constituting a face.

Definition at line 422 of file fe_data.h.

◆ dofs_per_face_max

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_face_max
privateinherited

Maximum number of degrees of freedom on any face.

Definition at line 428 of file fe_data.h.

◆ dofs_per_cell

template<int dim>
const unsigned int FiniteElementData< dim >::dofs_per_cell
inherited

Total number of degrees of freedom on a cell. This is the accumulated number of degrees of freedom on all the objects of dimension up to dim constituting a cell.

Definition at line 436 of file fe_data.h.

◆ components

template<int dim>
const unsigned int FiniteElementData< dim >::components
inherited

Number of vector components of this finite element, and dimension of the image space. For vector-valued finite elements (i.e. when this number is greater than one), the number of vector components is in many cases equal to the number of base elements glued together with the help of the FESystem class. However, for elements like the Nedelec element, the number is greater than one even though we only have one base element.

Definition at line 446 of file fe_data.h.

◆ degree

template<int dim>
const unsigned int FiniteElementData< dim >::degree
inherited

Maximal polynomial degree of a shape function in a single coordinate direction.

Definition at line 452 of file fe_data.h.

◆ conforming_space

template<int dim>
const Conformity FiniteElementData< dim >::conforming_space
inherited

Indicate the space this element conforms to.

Definition at line 457 of file fe_data.h.

◆ block_indices_data

template<int dim>
const BlockIndices FiniteElementData< dim >::block_indices_data
inherited

Storage for an object describing the sizes of each block of a compound element. For an element which is not an FESystem, this contains only a single block with length dofs_per_cell.

Definition at line 464 of file fe_data.h.


The documentation for this class was generated from the following file: