MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::DofTransformation Class Reference

#include <doftrans.hpp>

Collaboration diagram for mfem::DofTransformation:
[legend]

Public Member Functions

 DofTransformation (int vdim=1, int ordering=0)
 Default constructor which requires that SetDofTransformation be called before use.
 
 DofTransformation (const StatelessDofTransformation &dof_trans, int vdim=1, int ordering=0)
 Constructor with a known StatelessDofTransformation.
 
void SetFaceOrientations (const Array< int > &Fo)
 Configure the transformation using face orientations for the current element.
 
const Array< int > & GetFaceOrientations () const
 Return the face orientations for the current element.
 
void SetDofTransformation (const StatelessDofTransformation &dof_trans)
 Set or change the nested StatelessDofTransformation object.
 
void SetDofTransformation (const StatelessDofTransformation *dof_trans)
 
const StatelessDofTransformationGetDofTransformation () const
 Return the nested StatelessDofTransformation object.
 
void SetVDim (int vdim=1, int ordering=0)
 Set or change the vdim and ordering parameter.
 
int GetVDim () const
 Return the current vdim value.
 
int Size () const
 
int Height () const
 
int NumRows () const
 
int Width () const
 
int NumCols () const
 
bool IsIdentity () const
 
void TransformPrimal (real_t *v) const
 
void TransformPrimal (Vector &v) const
 
void TransformPrimalCols (DenseMatrix &V) const
 Transform groups of DoFs stored as dense matrices.
 
void InvTransformPrimal (real_t *v) const
 
void InvTransformPrimal (Vector &v) const
 
void TransformDual (real_t *v) const
 
void TransformDual (Vector &v) const
 
void InvTransformDual (real_t *v) const
 
void InvTransformDual (Vector &v) const
 
void TransformDual (DenseMatrix &V) const
 
void TransformDualRows (DenseMatrix &V) const
 Transform rows of a dense matrix containing dual DoFs.
 
void TransformDualCols (DenseMatrix &V) const
 Transform columns of a dense matrix containing dual DoFs.
 

Protected Attributes

Array< int > Fo_
 
const StatelessDofTransformationdof_trans_
 
int vdim_
 
int ordering_
 

Detailed Description

The DofTransformation class is an extension of the StatelessDofTransformation which stores the face orientations used to select the necessary transformations which allows it to offer a collection of convenience methods.

DofTransformation objects are provided by the FiniteElementSpace which has access to the mesh and can therefore provide the face orientations. This is convenient when working with GridFunction, LinearForm, or BilinearForm objects or their parallel counterparts.

StatelessDofTransformation objects are provided by FiniteElement or FiniteElementCollection objects which do not have access to face orientation information. This can be useful in non-standard contexts such as transferring finite element degrees of freedom between different meshes. For examples of its use see the TransferMap used by the SubMesh class.

Definition at line 141 of file doftrans.hpp.

Constructor & Destructor Documentation

◆ DofTransformation() [1/2]

mfem::DofTransformation::DofTransformation ( int vdim = 1,
int ordering = 0 )
inline

Default constructor which requires that SetDofTransformation be called before use.

Definition at line 152 of file doftrans.hpp.

◆ DofTransformation() [2/2]

mfem::DofTransformation::DofTransformation ( const StatelessDofTransformation & dof_trans,
int vdim = 1,
int ordering = 0 )
inline

Constructor with a known StatelessDofTransformation.

Definition at line 159 of file doftrans.hpp.

Member Function Documentation

◆ GetDofTransformation()

const StatelessDofTransformation * mfem::DofTransformation::GetDofTransformation ( ) const
inline

Return the nested StatelessDofTransformation object.

Definition at line 186 of file doftrans.hpp.

◆ GetFaceOrientations()

const Array< int > & mfem::DofTransformation::GetFaceOrientations ( ) const
inline

Return the face orientations for the current element.

Definition at line 173 of file doftrans.hpp.

◆ GetVDim()

int mfem::DofTransformation::GetVDim ( ) const
inline

Return the current vdim value.

Definition at line 197 of file doftrans.hpp.

◆ Height()

int mfem::DofTransformation::Height ( ) const
inline

Definition at line 200 of file doftrans.hpp.

◆ InvTransformDual() [1/2]

void mfem::DofTransformation::InvTransformDual ( real_t * v) const

Inverse Transform dual DoFs

Definition at line 113 of file doftrans.cpp.

◆ InvTransformDual() [2/2]

void mfem::DofTransformation::InvTransformDual ( Vector & v) const
inline

Definition at line 240 of file doftrans.hpp.

◆ InvTransformPrimal() [1/2]

void mfem::DofTransformation::InvTransformPrimal ( real_t * v) const

Inverse transform local DoFs. Used to transform DoFs from a global vector back to their element-local form. For example, this must be used to transform the vector obtained using GridFunction::GetSubVector before it can be used to compute a local interpolation.

Definition at line 49 of file doftrans.cpp.

◆ InvTransformPrimal() [2/2]

void mfem::DofTransformation::InvTransformPrimal ( Vector & v) const
inline

Definition at line 229 of file doftrans.hpp.

◆ IsIdentity()

bool mfem::DofTransformation::IsIdentity ( ) const
inline

Definition at line 204 of file doftrans.hpp.

◆ NumCols()

int mfem::DofTransformation::NumCols ( ) const
inline

Definition at line 203 of file doftrans.hpp.

◆ NumRows()

int mfem::DofTransformation::NumRows ( ) const
inline

Definition at line 201 of file doftrans.hpp.

◆ SetDofTransformation() [1/2]

void mfem::DofTransformation::SetDofTransformation ( const StatelessDofTransformation & dof_trans)
inline

Set or change the nested StatelessDofTransformation object.

Definition at line 176 of file doftrans.hpp.

◆ SetDofTransformation() [2/2]

void mfem::DofTransformation::SetDofTransformation ( const StatelessDofTransformation * dof_trans)
inline

Definition at line 180 of file doftrans.hpp.

◆ SetFaceOrientations()

void mfem::DofTransformation::SetFaceOrientations ( const Array< int > & Fo)
inline

Configure the transformation using face orientations for the current element.

The face_orientation array can be obtained from Mesh::GetElementFaces.

Definition at line 169 of file doftrans.hpp.

◆ SetVDim()

void mfem::DofTransformation::SetVDim ( int vdim = 1,
int ordering = 0 )
inline

Set or change the vdim and ordering parameter.

Definition at line 190 of file doftrans.hpp.

◆ Size()

int mfem::DofTransformation::Size ( ) const
inline

Definition at line 199 of file doftrans.hpp.

◆ TransformDual() [1/3]

void mfem::DofTransformation::TransformDual ( DenseMatrix & V) const
inline

Transform a matrix of dual DoFs entries as computed by a BilinearFormIntegrator before summing into a BilinearForm object.

Definition at line 245 of file doftrans.hpp.

◆ TransformDual() [2/3]

void mfem::DofTransformation::TransformDual ( real_t * v) const

Transform dual DoFs as computed by a LinearFormIntegrator before summing into a LinearForm object.

Definition at line 81 of file doftrans.cpp.

◆ TransformDual() [3/3]

void mfem::DofTransformation::TransformDual ( Vector & v) const
inline

Definition at line 235 of file doftrans.hpp.

◆ TransformDualCols()

void mfem::DofTransformation::TransformDualCols ( DenseMatrix & V) const
inline

Transform columns of a dense matrix containing dual DoFs.

Definition at line 264 of file doftrans.hpp.

◆ TransformDualRows()

void mfem::DofTransformation::TransformDualRows ( DenseMatrix & V) const
inline

Transform rows of a dense matrix containing dual DoFs.

Definition at line 252 of file doftrans.hpp.

◆ TransformPrimal() [1/2]

void mfem::DofTransformation::TransformPrimal ( real_t * v) const

Transform local DoFs to align with the global DoFs. For example, this transformation can be used to map the local vector computed by FiniteElement::Project() to the transformed vector stored within a GridFunction object.

Definition at line 17 of file doftrans.cpp.

◆ TransformPrimal() [2/2]

void mfem::DofTransformation::TransformPrimal ( Vector & v) const
inline

Definition at line 211 of file doftrans.hpp.

◆ TransformPrimalCols()

void mfem::DofTransformation::TransformPrimalCols ( DenseMatrix & V) const
inline

Transform groups of DoFs stored as dense matrices.

Definition at line 215 of file doftrans.hpp.

◆ Width()

int mfem::DofTransformation::Width ( ) const
inline

Definition at line 202 of file doftrans.hpp.

Member Data Documentation

◆ dof_trans_

const StatelessDofTransformation* mfem::DofTransformation::dof_trans_
protected

Definition at line 145 of file doftrans.hpp.

◆ Fo_

Array<int> mfem::DofTransformation::Fo_
protected

Definition at line 144 of file doftrans.hpp.

◆ ordering_

int mfem::DofTransformation::ordering_
protected

Definition at line 147 of file doftrans.hpp.

◆ vdim_

int mfem::DofTransformation::vdim_
protected

Definition at line 146 of file doftrans.hpp.


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