LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
A general (interface) class for DOF handling, see Lecture Document Paragraph 2.7.4.13. More...
#include <lf/assemble/dofhandler.h>
Public Member Functions | |
virtual | ~DofHandler ()=default |
virtual Destructor | |
virtual size_type | NumDofs () const =0 |
total number of dof's handled by the object | |
virtual size_type | NumLocalDofs (const lf::mesh::Entity &entity) const =0 |
tells the number of degrees of freedom subordinate/_belonging_ to to an entity | |
virtual size_type | NumInteriorDofs (const lf::mesh::Entity &entity) const =0 |
provides number of shape functions associated with an entity | |
virtual std::span< const gdof_idx_t > | GlobalDofIndices (const lf::mesh::Entity &entity) const =0 |
access to indices of global dof's belonging to an entity | |
virtual std::span< const gdof_idx_t > | InteriorGlobalDofIndices (const lf::mesh::Entity &entity) const =0 |
global indices of shape functions associated with an entity_ | |
virtual const lf::mesh::Entity & | Entity (gdof_idx_t dofnum) const =0 |
retrieve unique entity at which a basis function is located | |
virtual std::shared_ptr< const lf::mesh::Mesh > | Mesh () const =0 |
Acess to underlying mesh object. | |
Protected Member Functions | |
DofHandler ()=default | |
Default constructor, can only be called from derived class. | |
Protected constructors | |
Copying and assignment do not make sense for DofHandler objects, but derived classes may be copied/assigned | |
DofHandler (const DofHandler &)=default | |
DofHandler (DofHandler &&)=default | |
DofHandler & | operator= (const DofHandler &)=default |
DofHandler & | operator= (DofHandler &&)=default |
Related Symbols | |
(Note that these are not member symbols.) | |
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. | |
A general (interface) class for DOF handling, see Lecture Document Paragraph 2.7.4.13.
Objects of this class provide the local-to-global map for indices of local/global shape functions.
Note that every global shape (dof) function belongs to a unique mesh entity. Ordering them means assigning a unique (vector component) index starting from zero until NumDofs-1
.
Dofs belonging to entities of a larger co-dimension are arranged before dofs associated with entities of a smaller co-dimension:
This means First dofs on nodes, then dofs on edges, then dofs on cells
The method getGlobalDofs() is available for entities of any co-dimension. For instance, this allows assembly of contributions from low-dimensional manifolds like boundaries or interfaces.
The local numbering conventions are also defined in Lecture Document Paragraph 2.7.4.11 and illustrated in Lecture Document Example 2.7.4.12.
(Lecture Document Code 2.7.4.15)
Though not important for most finite element computations, the current implementations of the local-to-global d.o.f. mapping interface comply with the following rules:
Also refer to Lecture Document Remark 2.7.4.17.
Definition at line 112 of file dofhandler.h.
|
protecteddefault |
Default constructor, can only be called from derived class.
|
protecteddefault |
|
protecteddefault |
|
virtualdefault |
virtual Destructor
|
pure virtual |
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.
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
|
pure virtual |
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.
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
Referenced by lf::assemble::AssembleMatrixLocally(), and lf::fe::InitEssentialConditionFromFunction().
|
pure virtual |
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.
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
|
pure virtual |
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.
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
Referenced by lf::assemble::AssembleMatrixLocally().
total number of dof's handled by the object
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
Referenced by lf::assemble::AssembleMatrixLocally(), lf::fe::InitEssentialConditionFromFunction(), lf::uscalfe::PrintInfo(), and lf::fe::prolongate().
|
pure virtual |
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().
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
|
pure virtual |
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().
Implemented in lf::assemble::UniformFEDofHandler, and lf::assemble::DynamicFEDofHandler.
Referenced by lf::assemble::AssembleMatrixLocally(), and lf::fe::InitEssentialConditionFromFunction().
|
protecteddefault |
|
protecteddefault |
|
related |
Output information about the given dof handler to the given stream object.
stream | The stream to which we should print |
dof_handler | The dof handler that should be printed |
ctrl | controls the level of detail of the printed output (see below) |
The following output levels are supported