LifeV
DOF Class Reference

#include <DOF.hpp>

+ Collaboration diagram for DOF:

Private Types

typedef ArraySimple< UIntContainer_Type
 
typedef ID(* facetToPointPtr_Type) (ID const &localFace, ID const &point)
 

Private Attributes

const DOFLocalPatternM_elementDofPattern
 The pattern of the local degrees of freedom. More...
 
UInt M_totalDof
 
UInt M_numElement
 
UInt M_nbLocalPeaks
 
UInt M_nbLocalRidges
 
UInt M_nbLocalFacets
 
Container_Type M_localToGlobal
 
std::vector< std::vector< ID > > M_localToGlobalByBdFacet
 
facetToPointPtr_Type M_facetToPoint
 
UInt M_dofPositionByEntity [5]
 

Constructor & Destructor

 DOF (const DOFLocalPattern &fePattern)
 
 DOF (const DOF &dof2)
 Copy constructor. More...
 
template<typename MeshType >
 DOF (MeshType &mesh, const DOFLocalPattern &fePattern)
 Constructor accepting a mesh as parameter. More...
 

Methods

template<typename MeshType >
void update (MeshType &)
 Build the localToGlobal table. More...
 
template<typename MeshType >
std::vector< IntglobalElements (MeshType &mesh)
 Build the globalElements list. More...
 
template<typename MeshType >
MapEpetraData createMapData (MeshType &mesh)
 
ID localToGlobalMapByBdFacet (const ID &facetId, const ID &localDof) const
 
std::vector< IDlocalToGlobalMapOnBdFacet (const ID &facetId) const
 
void showMe (std::ostream &out=std::cout, bool verbose=false) const
 Ouput. More...
 
void showMeByBdFacet (std::ostream &out=std::cout, bool verbose=false) const
 

Set Methods

void setTotalDof (const UInt &totalDof)
 

Get Methods

const UIntnumTotalDof () const
 The total number of Dof. More...
 
const UIntnumLocalDof () const
 The number of local DOF (nodes) in the finite element. More...
 
const IDlocalToGlobalMap (const ID ElId, const ID localNode) const
 Return the specified entries of the localToGlobal table. More...
 
const UIntnumElements () const
 Number of elements in mesh. More...
 
const UIntnumLocalVertices () const
 Number of local vertices (in a elment) More...
 
const UIntnumLocalEdges () const
 Number of local edges (in a elment) More...
 
const UIntnumLocalFaces () const
 Number of local faces (in a elment) More...
 
const DOFLocalPatternlocalDofPattern () const
 Getter for the localDofPattern. More...
 

Detailed Description

Local-to-global table

This class provides the localtoglobal table that relates the local DOF of a finite element to its global numbering. It needs a DOFLocalPattern in order to obtain all the necessary information about the local pattern. In fact it stores a copy of it so to make the local pattern available, if needed.

It is useless until is has not been set up on a specific RegionMesh. This is accomplished either by passing the mesh to the constructor, or calling the method DOF::update().

Note
The methods bulds the table for ALL degrees of freedom, i.e. it does not handle any essential boundary condition.

Now the class include also a local-to-global table with DOF grouped by (internal) face that was implemented in the old versions into the dofByFace.hpp and dofByFace.cpp files created by D. A. Di Pietro in 2004

Note
The dof numbering refers to the global numbering, not the numbering local to a partition of a partitioned mesh
Todo:
This class must be bettered. The logic by which the dof table is built may fail for certain type of elements.

Definition at line 85 of file DOF.hpp.

Member Typedef Documentation

◆ Container_Type

typedef ArraySimple<UInt> Container_Type
private

Definition at line 237 of file DOF.hpp.

◆ facetToPointPtr_Type

typedef ID( * facetToPointPtr_Type) (ID const &localFace, ID const &point)
private

Definition at line 239 of file DOF.hpp.

Constructor & Destructor Documentation

◆ DOF() [1/3]

DOF ( const DOFLocalPattern fePattern)

The minimal constructor

Parameters
fePatternis the DOFLocalPattern on which the ref FE is built
Offsetthe smallest DOF numbering. It might be used if we want the degrees of freedom numbering start from a specific value.

Definition at line 50 of file DOF.cpp.

+ Here is the caller graph for this function:

◆ DOF() [2/3]

DOF ( const DOF dof2)

Copy constructor.

Definition at line 60 of file DOF.cpp.

+ Here is the caller graph for this function:

◆ DOF() [3/3]

DOF ( MeshType mesh,
const DOFLocalPattern fePattern 
)

Constructor accepting a mesh as parameter.

Constructor that builds the localToglobal table.

Parameters
mesha RegionMesh
_feis the DOFLocalPattern on which the ref FE is built
Offsetthe smallest DOF numbering. It might be used if we want the degrees of freedom numbering start from a specific value.

Definition at line 275 of file DOF.hpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ update()

void update ( MeshType mesh)

Build the localToGlobal table.

Parameters
meshA RegionMesh Updates the LocaltoGlobal array

Definition at line 297 of file DOF.hpp.

◆ globalElements()

std::vector< Int > globalElements ( MeshType mesh)

Build the globalElements list.

Parameters
meshA RegionMesh

Definition at line 506 of file DOF.hpp.

◆ createMapData()

MapEpetraData createMapData ( MeshType mesh)

Definition at line 591 of file DOF.hpp.

◆ localToGlobalMapByBdFacet()

ID localToGlobalMapByBdFacet ( const ID facetId,
const ID localDof 
) const

Returns the global numbering of a DOF, given an boundary facet and the local numbering

Parameters
faceIdthe boundary facet ID
localDOFthe local DOF numbering
Returns
The global numbering of the DOF

Definition at line 81 of file DOF.cpp.

+ Here is the caller graph for this function:

◆ localToGlobalMapOnBdFacet()

std::vector<ID> localToGlobalMapOnBdFacet ( const ID facetId) const
inline

Definition at line 150 of file DOF.hpp.

◆ showMe()

void showMe ( std::ostream &  out = std::cout,
bool  verbose = false 
) const

Ouput.

Definition at line 88 of file DOF.cpp.

◆ showMeByBdFacet()

void showMeByBdFacet ( std::ostream &  out = std::cout,
bool  verbose = false 
) const

Definition at line 128 of file DOF.cpp.

◆ setTotalDof()

void setTotalDof ( const UInt totalDof)
inline

Definition at line 165 of file DOF.hpp.

◆ numTotalDof()

const UInt& numTotalDof ( ) const
inline

The total number of Dof.

Definition at line 177 of file DOF.hpp.

+ Here is the caller graph for this function:

◆ numLocalDof()

const UInt& numLocalDof ( ) const
inline

The number of local DOF (nodes) in the finite element.

Definition at line 183 of file DOF.hpp.

+ Here is the caller graph for this function:

◆ localToGlobalMap()

const ID& localToGlobalMap ( const ID  ElId,
const ID  localNode 
) const
inline

Return the specified entries of the localToGlobal table.

Returns the global numbering of a DOF, given an element and the local numbering

Parameters
ELIdthe element ID
localNodethe local DOF numbering
Returns
The numbering of the DOF

Definition at line 195 of file DOF.hpp.

+ Here is the caller graph for this function:

◆ numElements()

const UInt& numElements ( ) const
inline

Number of elements in mesh.

Definition at line 201 of file DOF.hpp.

◆ numLocalVertices()

const UInt& numLocalVertices ( ) const
inline

Number of local vertices (in a elment)

Definition at line 207 of file DOF.hpp.

◆ numLocalEdges()

const UInt& numLocalEdges ( ) const
inline

Number of local edges (in a elment)

Definition at line 213 of file DOF.hpp.

◆ numLocalFaces()

const UInt& numLocalFaces ( ) const
inline

Number of local faces (in a elment)

Definition at line 219 of file DOF.hpp.

◆ localDofPattern()

const DOFLocalPattern& localDofPattern ( ) const
inline

Getter for the localDofPattern.

Definition at line 225 of file DOF.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_elementDofPattern

const DOFLocalPattern& M_elementDofPattern
private

The pattern of the local degrees of freedom.

Definition at line 242 of file DOF.hpp.

◆ M_totalDof

UInt M_totalDof
private

Definition at line 245 of file DOF.hpp.

◆ M_numElement

UInt M_numElement
private

Definition at line 248 of file DOF.hpp.

◆ M_nbLocalPeaks

UInt M_nbLocalPeaks
private

Definition at line 251 of file DOF.hpp.

◆ M_nbLocalRidges

UInt M_nbLocalRidges
private

Definition at line 252 of file DOF.hpp.

◆ M_nbLocalFacets

UInt M_nbLocalFacets
private

Definition at line 253 of file DOF.hpp.

◆ M_localToGlobal

Container_Type M_localToGlobal
private

Definition at line 256 of file DOF.hpp.

◆ M_localToGlobalByBdFacet

std::vector<std::vector<ID> > M_localToGlobalByBdFacet
private

Definition at line 259 of file DOF.hpp.

◆ M_facetToPoint

facetToPointPtr_Type M_facetToPoint
private

Definition at line 262 of file DOF.hpp.

◆ M_dofPositionByEntity

UInt M_dofPositionByEntity[5]
private

Definition at line 265 of file DOF.hpp.


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