DOLFINx 0.9.0.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ElementDofLayout Class Reference

#include <ElementDofLayout.h>

Public Member Functions

 ElementDofLayout (int block_size, const std::vector< std::vector< std::vector< int > > > &entity_dofs, const std::vector< std::vector< std::vector< int > > > &entity_closure_dofs, const std::vector< int > &parent_map, const std::vector< ElementDofLayout > &sub_layouts)
 
ElementDofLayout copy () const
 Copy the DOF layout, discarding any parent information.
 
 ElementDofLayout (const ElementDofLayout &dofmap)=default
 Copy constructor.
 
 ElementDofLayout (ElementDofLayout &&dofmap)=default
 Move constructor.
 
 ~ElementDofLayout ()=default
 Destructor.
 
ElementDofLayoutoperator= (const ElementDofLayout &dofmap)=default
 Copy assignment.
 
ElementDofLayoutoperator= (ElementDofLayout &&dofmap)=default
 Move assignment.
 
bool operator== (const ElementDofLayout &layout) const
 
int num_dofs () const
 
int num_entity_dofs (int dim) const
 
int num_entity_closure_dofs (int dim) const
 
const std::vector< int > & entity_dofs (int dim, int entity_index) const
 
const std::vector< int > & entity_closure_dofs (int dim, int entity_index) const
 
const std::vector< std::vector< std::vector< int > > > & entity_dofs_all () const
 Direct access to all entity dofs (dof = _entity_dofs[dim][entity][i])
 
const std::vector< std::vector< std::vector< int > > > & entity_closure_dofs_all () const
 
int num_sub_dofmaps () const
 Get number of sub-dofmaps.
 
const ElementDofLayoutsub_layout (std::span< const int > component) const
 Get sub-dofmap given by list of components, one for each level.
 
std::vector< int > sub_view (std::span< const int > component) const
 
int block_size () const
 Block size.
 
bool is_view () const
 

Detailed Description

The class represents the degree-of-freedom (dofs) for an element. Dofs are associated with a mesh entity. This class also handles sub-space dofs, which are views into the parent dofs.

Constructor & Destructor Documentation

◆ ElementDofLayout()

ElementDofLayout ( int block_size,
const std::vector< std::vector< std::vector< int > > > & entity_dofs,
const std::vector< std::vector< std::vector< int > > > & entity_closure_dofs,
const std::vector< int > & parent_map,
const std::vector< ElementDofLayout > & sub_layouts )

Constructor

Parameters
[in]block_sizeThe number of dofs co-located at each point.
[in]entity_dofsThe dofs on each entity, in the format: entity_dofs[entity_dim][entity_number] = [dof0, dof1, ...]
[in]entity_closure_dofsThe dofs on the closure of each entity, in the format: entity_closure_dofs[entity_dim][entity_number] = [dof0, dof1, ...]
[in]parent_mapTODO
[in]sub_layouts(std::vector<ElementDofLayout>)TODO

Member Function Documentation

◆ entity_closure_dofs()

const std::vector< int > & entity_closure_dofs ( int dim,
int entity_index ) const

Local-local closure dofs on entity of cell

Parameters
[in]dimThe entity dimension
[in]entity_indexThe local entity index on the cell
Returns
Cell-local degree-of-freedom indices

◆ entity_closure_dofs_all()

const std::vector< std::vector< std::vector< int > > > & entity_closure_dofs_all ( ) const

Direct access to all entity closure dofs (dof = _entity_dofs[dim][entity][i])

◆ entity_dofs()

const std::vector< int > & entity_dofs ( int dim,
int entity_index ) const

Local-local mapping of dofs on entity of cell

Parameters
[in]dimThe entity dimension
[in]entity_indexThe local entity index on the cell
Returns
Cell-local degree-of-freedom indices

◆ is_view()

bool is_view ( ) const

True iff dof map is a view into another map

Returns
bool True if the dof map is a sub-dof map (a view into another map).

◆ num_dofs()

int num_dofs ( ) const

Return the dimension of the local finite element function space on a cell (number of dofs on element)

Returns
Dimension of the local finite element function space.

◆ num_entity_closure_dofs()

int num_entity_closure_dofs ( int dim) const

Return the number of closure dofs for a given entity dimension

Parameters
[in]dimEntity dimension
Returns
Number of dofs associated with closure of given entity dimension

◆ num_entity_dofs()

int num_entity_dofs ( int dim) const

Return the number of dofs for a given entity dimension

Parameters
[in]dimEntity dimension
Returns
Number of dofs associated with given entity dimension

◆ operator==()

bool operator== ( const ElementDofLayout & layout) const

Equality operator

Returns
Returns true if the layout data is the same. Sub- and parent dofmap data is not compared.
Note
The block sizes of the layouts are not compared

◆ sub_view()

std::vector< int > sub_view ( std::span< const int > component) const

Get view for a sub-layout, defined by the component list (as for sub_layour()), into this dofmap. I.e., the dofs in this dofmap that are the sub-dofs.


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