LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Dof handler allowing variable local dof layouts. More...
#include <lf/assemble/dofhandler.h>
Public Member Functions | |
DynamicFEDofHandler (DynamicFEDofHandler &&)=default | |
A DynamicFEDofHandler can be move constructed. | |
DynamicFEDofHandler (const DynamicFEDofHandler &)=delete | |
It doesn't make much sense to copy construct a DynamicFEDofHandler. | |
DynamicFEDofHandler & | operator= (DynamicFEDofHandler &&)=default |
A DynamicFEDofHandler can be moved into. | |
DynamicFEDofHandler & | operator= (const DynamicFEDofHandler &)=delete |
Copy assignment is forbidden. | |
~DynamicFEDofHandler () override=default | |
Virtual destructor. | |
template<typename LOCALDOFINFO > | |
DynamicFEDofHandler (std::shared_ptr< const lf::mesh::Mesh > mesh_p, LOCALDOFINFO &&locdof) | |
Set-up of dof handler. | |
size_type | NumDofs () const override |
total number of dof's handled by the object | |
size_type | NumInteriorDofs (const lf::mesh::Entity &entity) const override |
provides number of shape functions associated with an entity | |
size_type | NumLocalDofs (const lf::mesh::Entity &entity) const override |
tells the number of degrees of freedom subordinate/_belonging_ to to an entity | |
std::span< const gdof_idx_t > | GlobalDofIndices (const lf::mesh::Entity &entity) const override |
access to indices of global dof's belonging to an entity | |
std::span< const gdof_idx_t > | InteriorGlobalDofIndices (const lf::mesh::Entity &entity) const override |
global indices of shape functions associated with an entity_ | |
const lf::mesh::Entity & | Entity (gdof_idx_t dofnum) const override |
retrieve unique entity at which a basis function is located | |
std::shared_ptr< const lf::mesh::Mesh > | Mesh () const override |
Acess to underlying mesh object. | |
![]() | |
virtual | ~DofHandler ()=default |
virtual Destructor | |
Private Attributes | |
std::shared_ptr< const lf::mesh::Mesh > | mesh_p_ |
size_type | num_dof_ {0} |
std::vector< const lf::mesh::Entity * > | dof_entities_ |
std::array< std::vector< size_type >, 3 > | num_int_dofs_ |
std::array< std::vector< size_type >, 3 > | offsets_ |
std::array< std::vector< gdof_idx_t >, 3 > | dofs_ |
Additional Inherited Members | |
![]() | |
DofHandler ()=default | |
Default constructor, can only be called from derived class. | |
DofHandler (const DofHandler &)=default | |
DofHandler (DofHandler &&)=default | |
DofHandler & | operator= (const DofHandler &)=default |
DofHandler & | operator= (DofHandler &&)=default |
![]() | |
void | PrintInfo (std::ostream &stream, const DofHandler &dof_handler, unsigned int ctrl=0) |
Output information about the given dof handler to the given stream object. | |
Dof handler allowing variable local dof layouts.
This dof handler can accommodate cases where entities of the mesh have different numbers of local shape functions attached to them, see Paragraph 2.7.4.16. This is relevant, for instance, for hp-FEM.
Definition at line 514 of file dofhandler.h.
|
default |
A DynamicFEDofHandler can be move constructed.
|
delete |
It doesn't make much sense to copy construct a DynamicFEDofHandler.
|
overridedefault |
Virtual destructor.
|
inline |
Set-up of dof handler.
LOCALDOFINFO | type for object telling number of interior local shape functions |
mesh_p | pointer to underlying mesh |
locdof | functor object telling number of interior dofs for every entity of the mesh. |
This constructor performs the initialization of all internal index arrays.
This type must provide method
size_type operator (const lf::mesh::Entity &);
that returns the number of local shape functions associated with an entity. Note that this gives the number of so-called interior local shape functions belonging to an entity and not the number of local shape functions whose supports will include the entity. Also refer to the documentation of DynamicFEDofHandler::NumLocalDofs() and DynamicFEDofHandler::NumInteriorDofs().
Definition at line 566 of file dofhandler.h.
References lf::assemble::AssembleMatrixLocally(), dof_entities_, dofs_, mesh_p_, lf::mesh::negative, num_dof_, num_int_dofs_, offsets_, and lf::mesh::positive.
|
inlineoverridevirtual |
retrieve unique entity at which a basis function is located
dofnum | global index of the basis function/degree of freedom |
This function returns the unique geometric entity to which a particular basis function = degree of freedom is associated.
This function is hardly ever needed in finite element codes and is supplied for debugging purposes.
Implements lf::assemble::DofHandler.
Definition at line 750 of file dofhandler.h.
References lf::assemble::AssembleMatrixLocally(), dof_entities_, and num_dof_.
|
overridevirtual |
access to indices of global dof's belonging to an entity
entity | reference to the entity for which the dof's are to be fetched. This entity must belong to the underlying mesh. |
The basis functions of every finite element space must be associated with a unique geometric entity. Conversely, every entity can possess a finite number of basis functions = degrees of freedom. This member function returns the global indices of all basis functions associated with the entity and its sub-entitites (the covering local shape functions).
The size of the returned range must agree with the value returned by NumLocalDofs() when supplied with the same arguments.
Consult Lecture Document Paragraph 2.7.4.13 for more information.
Implements lf::assemble::DofHandler.
Definition at line 344 of file dofhandler.cc.
References lf::assemble::AssembleMatrixLocally(), dofs_, mesh_p_, offsets_, and lf::base::RefEl::RefEl().
|
overridevirtual |
global indices of shape functions associated with an entity_
entity | entity for which shape functin indices are queried |
Each global shape function is associated with a unique mesh entity. This method provides all the global indices of the shape function associated to the entity specified by the function arguments, see Lecture Document Paragraph 2.7.4.13 for additional explanations.
Implements lf::assemble::DofHandler.
Definition at line 363 of file dofhandler.cc.
References lf::assemble::AssembleMatrixLocally(), dofs_, mesh_p_, num_int_dofs_, offsets_, and lf::base::RefEl::RefEl().
|
inlineoverridevirtual |
Acess to underlying mesh object.
Every DofHandler object has to be associated with a unique mesh. All entities passed to the DofHandler object must belong to that mesh.
Implements lf::assemble::DofHandler.
Definition at line 759 of file dofhandler.h.
References mesh_p_.
|
inlineoverridevirtual |
total number of dof's handled by the object
Implements lf::assemble::DofHandler.
Definition at line 718 of file dofhandler.h.
References num_dof_.
|
overridevirtual |
provides number of shape functions associated with an entity
entity | entity of underlying mesh whose number of shape functions is queried |
The return value of this method must be equal to the length of the range built by InteriorGlobalDofIndices().
Implements lf::assemble::DofHandler.
Definition at line 395 of file dofhandler.cc.
References lf::assemble::AssembleMatrixLocally(), mesh_p_, num_int_dofs_, and lf::base::RefEl::RefEl().
|
overridevirtual |
tells the number of degrees of freedom subordinate/_belonging_ to to an entity
entity | reference to an entity of the underlying mesh |
This method informs about the length of the vector returned by GlobalDofIndices().
Implements lf::assemble::DofHandler.
Definition at line 387 of file dofhandler.cc.
References lf::assemble::AssembleMatrixLocally(), mesh_p_, offsets_, and lf::base::RefEl::RefEl().
|
delete |
Copy assignment is forbidden.
|
default |
A DynamicFEDofHandler can be moved into.
|
private |
Vector of entities to which global basis functions are associated
Definition at line 769 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), and Entity().
|
private |
Vectors of global indices of dofs belonging to entities of different co-dimension
Definition at line 787 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), GlobalDofIndices(), and InteriorGlobalDofIndices().
|
private |
The mesh on which the degrees of freedom are defined
Definition at line 765 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), GlobalDofIndices(), InteriorGlobalDofIndices(), Mesh(), NumInteriorDofs(), and NumLocalDofs().
|
private |
The total number of degrees of freedom
Definition at line 767 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), Entity(), and NumDofs().
|
private |
Internal indexing helper arrays
The indices of global shape functions are stored in a long array dofs_[codim]
for each co-dimension codim
. The entries in the offsets_[codim]
array point to the beginning of the dof indices for a particular entity identified via its index in the mesh.
offsets_[codim]
vectors must exceed the number of corresponding entities by 1. Vector of number of interior dofs for entities Definition at line 782 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), InteriorGlobalDofIndices(), and NumInteriorDofs().
|
private |
Offsets of dof index arrays in dofs_
vectors
Definition at line 784 of file dofhandler.h.
Referenced by DynamicFEDofHandler(), GlobalDofIndices(), InteriorGlobalDofIndices(), and NumLocalDofs().