Reference documentation for deal.II version GIT 9d46a3bd8c 2023-10-03 12:10:02+00:00
FiniteElementData< dim > Class Template Reference

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

Inheritance diagram for FiniteElementData< dim >:
[legend]

## Public Types

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

## Public Member Functions

FiniteElementData (const std::vector< unsigned int > &dofs_per_object, const unsigned int n_components, const unsigned int degree, const Conformity conformity=unknown, const BlockIndices &block_indices=BlockIndices())

FiniteElementData (const std::vector< unsigned int > &dofs_per_object, const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity=unknown, const BlockIndices &block_indices=BlockIndices())

FiniteElementData (const internal::GenericDoFsPerObject &data, const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity=unknown, const BlockIndices &block_indices=BlockIndices())

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 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

bool operator== (const FiniteElementData &) const

unsigned int get_first_line_index () 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

## Public Attributes

const unsigned int dofs_per_vertex

const unsigned int dofs_per_line

const unsigned int dofs_per_hex

const unsigned int first_line_index

const unsigned int first_hex_index

const unsigned int first_face_line_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 dimension = dim

## Private Attributes

const ReferenceCell reference_cell_kind

const unsigned int number_of_unique_2d_subobjects

const unsigned int number_unique_faces

const std::vector< unsigned int > n_dofs_on_quad

const std::vector< unsigned int > first_index_of_quads

const std::vector< unsigned int > first_line_index_of_faces

const std::vector< unsigned int > first_quad_index_of_faces

const std::vector< unsigned int > n_dofs_on_face

const unsigned int dofs_per_face_max

## Detailed Description

### template<int dim> class FiniteElementData< dim >

A class that declares a number of scalar constant variables that describe basic properties of a finite element implementation. This includes, for example, the number of degrees of freedom per vertex, line, or cell; the number of vector components; etc.

The kind of information stored here is computed during initialization of a finite element object and is passed down to this class via its constructor. The data stored by this class is part of the public interface of the FiniteElement class (which derives from the current class). See there for more information.

Definition at line 229 of file fe_data.h.

## ◆ Conformity

template<int dim>

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 262 of file fe_data.h.

## ◆ FiniteElementData() [1/3]

template<int dim>
 FiniteElementData< dim >::FiniteElementData ( const std::vector< unsigned int > & dofs_per_object, const unsigned int n_components, const unsigned int degree, const Conformity conformity = unknown, const BlockIndices & block_indices = BlockIndices() )

Constructor, computing all necessary values from the distribution of dofs to geometrical objects.

Parameters
 [in] dofs_per_object A vector that describes the number of degrees of freedom on geometrical objects for each dimension. This vector must have size dim+1, and entry 0 describes the number of degrees of freedom per vertex, entry 1 the number of degrees of freedom per line, etc. As an example, for the common $$Q_1$$ Lagrange element in 2d, this vector would have elements (1,0,0). On the other hand, for a $$Q_3$$ element in 3d, it would have entries (1,2,4,8). [in] n_components Number of vector components of the element. [in] degree The maximal polynomial degree of any of the shape functions of this element in any variable on the reference element. For example, for the $$Q_1$$ element (in any space dimension), this would be one; this is so despite the fact that the element has a shape function of the form $$\hat x\hat y$$ (in 2d) and $$\hat x\hat y\hat z$$ (in 3d), which, although quadratic and cubic polynomials, are still only linear in each reference variable separately. The information provided by this variable is typically used in determining what an appropriate quadrature formula is. [in] conformity A variable describing which Sobolev space this element conforms to. For example, the $$Q_p$$ Lagrange elements (implemented by the FE_Q class) are $$H^1$$ conforming, whereas the Raviart-Thomas element (implemented by the FE_RaviartThomas class) is $$H_\text{div}$$ conforming; finally, completely discontinuous elements (implemented by the FE_DGQ class) are only $$L_2$$ conforming. [in] block_indices An argument that describes how the base elements of a finite element are grouped. The default value constructs a single block that consists of all dofs_per_cell degrees of freedom. This is appropriate for all "atomic" elements (including non-primitive ones) and these can therefore omit this argument. On the other hand, composed elements such as FESystem will want to pass a different value here.

Definition at line 115 of file fe_data.cc.

## ◆ FiniteElementData() [2/3]

template<int dim>
 FiniteElementData< dim >::FiniteElementData ( const std::vector< unsigned int > & dofs_per_object, const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity = unknown, const BlockIndices & block_indices = BlockIndices() )

The same as above but with the difference that also the type of the underlying geometric entity can be specified.

Definition at line 134 of file fe_data.cc.

## ◆ FiniteElementData() [3/3]

template<int dim>
 FiniteElementData< dim >::FiniteElementData ( const internal::GenericDoFsPerObject & data, const ReferenceCell reference_cell, const unsigned int n_components, const unsigned int degree, const Conformity conformity = unknown, const BlockIndices & block_indices = BlockIndices() )

The same as above but instead of passing a vector containing the degrees of freedoms per object a struct of type GenericDoFsPerObject. This allows that 2d objects might have different number of degrees of freedoms, which is particular useful for cells with triangles and quadrilaterals as faces.

Definition at line 152 of file fe_data.cc.

## ◆ reference_cell()

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

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

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

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

Number of dofs per vertex.

## ◆ n_dofs_per_line()

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

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

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

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

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

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

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

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

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

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

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

## ◆ n_blocks()

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

## ◆ block_indices()

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

Detailed information on block sizes.

## ◆ tensor_degree()

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

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

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.

## ◆ operator==()

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

Comparison operator.

Definition at line 196 of file fe_data.cc.

## ◆ get_first_line_index()

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

Return first index of dof on a line.

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

Return first index of dof on a quad.

## ◆ get_first_hex_index()

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

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

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

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

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

## ◆ dimension

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

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

Definition at line 302 of file fe_data.h.

## ◆ reference_cell_kind

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

Reference cell type.

Definition at line 308 of file fe_data.h.

## ◆ number_of_unique_2d_subobjects

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

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 315 of file fe_data.h.

## ◆ number_unique_faces

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

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 321 of file fe_data.h.

## ◆ dofs_per_vertex

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

Number of degrees of freedom on a vertex.

Definition at line 327 of file fe_data.h.

## ◆ dofs_per_line

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

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

Definition at line 333 of file fe_data.h.

template<int dim>
private

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 340 of file fe_data.h.

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

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 347 of file fe_data.h.

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

Maximum number of degrees of freedom on any quad.

Definition at line 353 of file fe_data.h.

## ◆ dofs_per_hex

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

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 360 of file fe_data.h.

## ◆ first_line_index

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

First index of dof on a line.

Definition at line 365 of file fe_data.h.

template<int dim>
private

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 373 of file fe_data.h.

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

First index of dof on a quad.

Definition at line 379 of file fe_data.h.

## ◆ first_hex_index

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

First index of dof on a hexahedron.

Definition at line 384 of file fe_data.h.

## ◆ first_line_index_of_faces

template<int dim>
 const std::vector FiniteElementData< dim >::first_line_index_of_faces
private

Index of the first line of all faces.

Definition at line 390 of file fe_data.h.

## ◆ first_face_line_index

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

First index of dof on a line for face data.

Definition at line 396 of file fe_data.h.

template<int dim>
private

Index of the first quad of all faces.

Definition at line 402 of file fe_data.h.

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

First index of dof on a quad for face data.

Definition at line 408 of file fe_data.h.

## ◆ n_dofs_on_face

template<int dim>
 const std::vector FiniteElementData< dim >::n_dofs_on_face
private

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 415 of file fe_data.h.

## ◆ dofs_per_face

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

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 423 of file fe_data.h.

## ◆ dofs_per_face_max

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

Maximum number of degrees of freedom on any face.

Definition at line 429 of file fe_data.h.

## ◆ dofs_per_cell

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

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 437 of file fe_data.h.

## ◆ components

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

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 447 of file fe_data.h.

## ◆ degree

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

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

Definition at line 453 of file fe_data.h.

## ◆ conforming_space

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

Indicate the space this element conforms to.

Definition at line 458 of file fe_data.h.

## ◆ block_indices_data

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

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 465 of file fe_data.h.

The documentation for this class was generated from the following files:
{"ft_lang_label":"__label__en","ft_lang_prob":0.65137947,"math_prob":0.9312574,"size":14549,"snap":"2023-40-2023-50","text_gpt3_token_len":3566,"char_repetition_ratio":0.25610176,"word_repetition_ratio":0.18520382,"special_character_ratio":0.23101243,"punctuation_ratio":0.1360179,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98041534,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-03T14:52:04Z\",\"WARC-Record-ID\":\"<urn:uuid:a45d115c-d5c3-4266-b84f-4f08d263b2cd>\",\"Content-Length\":\"91809\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4f0a9cac-9efb-4494-a5bd-c486b7ac412e>\",\"WARC-Concurrent-To\":\"<urn:uuid:477e08d1-7d03-49a3-9c22-680c1771a965>\",\"WARC-IP-Address\":\"5.161.78.199\",\"WARC-Target-URI\":\"https://dealii.org/developer/doxygen/deal.II/classFiniteElementData.html\",\"WARC-Payload-Digest\":\"sha1:NNKYO4JTAFNGGLOJGOINZ5FCWR5H5GFK\",\"WARC-Block-Digest\":\"sha1:WAD4XPJFQ5SYGL6Q67OCIHV2DXGQ3KNH\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233511106.1_warc_CC-MAIN-20231003124522-20231003154522-00464.warc.gz\"}"}