GEOS
Namespaces | Functions
LAIHelperFunctions.hpp File Reference
#include "common/DataTypes.hpp"
#include "linearAlgebra/interfaces/InterfaceTypes.hpp"
#include "linearAlgebra/DofManager.hpp"
#include "mesh/MeshBody.hpp"
#include "mesh/NodeManager.hpp"
#include "mesh/ElementRegionManager.hpp"

Go to the source code of this file.

Namespaces

 geos
 

Functions

template<typename MATRIX >
void geos::LAIHelperFunctions::makeIdentity (localIndex const n, MPI_Comm const &comm, MATRIX &mat)
 Create an identity matrix. More...
 
template<typename MATRIX >
void geos::LAIHelperFunctions::createPermutationMatrix (NodeManager const &nodeManager, int const nDofPerNode, string const &dofKey, MATRIX &permutationMatrix)
 Create a permutation matrix for a given nodal variable. More...
 
template<typename MATRIX >
void geos::LAIHelperFunctions::createPermutationMatrix (ElementRegionManager const &elemManager, int const nDofPerCell, string const &dofKey, MATRIX &permutationMatrix)
 Create a permutation matrix for a given cell-centered variable. More...
 
template<typename VECTOR , typename MATRIX >
VECTOR geos::LAIHelperFunctions::permuteVector (VECTOR const &vector, MATRIX const &permutationMatrix)
 Permute a vector. More...
 
template<typename MATRIX >
MATRIX geos::LAIHelperFunctions::permuteMatrix (MATRIX const &matrix, MATRIX const &permutationMatrix)
 Permute rows and columns of a square matrix. More...
 
template<typename MATRIX >
MATRIX geos::LAIHelperFunctions::permuteMatrix (MATRIX const &matrix, MATRIX const &permutationMatrixLeft, MATRIX const &permutationMatrixRight)
 
template<typename VECTOR >
array1d< VECTOR > geos::LAIHelperFunctions::computeRigidBodyModes (arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &nodePosition, arrayView1d< globalIndex const > const &dofIndex, globalIndex const dofOffset, localIndex const numLocalDof)
 Computes rigid body modes. More...
 

Function Documentation

◆ computeRigidBodyModes()

template<typename VECTOR >
array1d< VECTOR > geos::LAIHelperFunctions::computeRigidBodyModes ( arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &  nodePosition,
arrayView1d< globalIndex const > const &  dofIndex,
globalIndex const  dofOffset,
localIndex const  numLocalDof 
)

Computes rigid body modes.

Template Parameters
VECTORoutput vector type
Parameters
nodePositionarray of node coordinates
dofIndexarray of nodal degree-of-freedom indices
dofOffsetglobal dof offset for displacement field
numLocalDofthe number of locally owned displacement dofs
Returns
the output array of linear algebra vectors containing RBMs

Definition at line 217 of file LAIHelperFunctions.hpp.

◆ createPermutationMatrix() [1/2]

template<typename MATRIX >
void geos::LAIHelperFunctions::createPermutationMatrix ( ElementRegionManager const &  elemManager,
int const  nDofPerCell,
string const &  dofKey,
MATRIX &  permutationMatrix 
)

Create a permutation matrix for a given cell-centered variable.

Template Parameters
MATRIXthe parallel matrix type
Parameters
[in]elemManagerthe element region manager
[in]nDofPerCellnumber of degrees-of-freedom per node
[in]dofKeyDofManager key used to access dof index array
[out]permutationMatrixthe target matrix

Definition at line 109 of file LAIHelperFunctions.hpp.

◆ createPermutationMatrix() [2/2]

template<typename MATRIX >
void geos::LAIHelperFunctions::createPermutationMatrix ( NodeManager const &  nodeManager,
int const  nDofPerNode,
string const &  dofKey,
MATRIX &  permutationMatrix 
)

Create a permutation matrix for a given nodal variable.

Template Parameters
MATRIXthe parallel matrix type
Parameters
[in]nodeManagerthe node manager
[in]nDofPerNodenumber of degrees-of-freedom per node
[in]dofKeyDofManager key used to access dof index array
[out]permutationMatrixthe target matrix

Definition at line 65 of file LAIHelperFunctions.hpp.

◆ makeIdentity()

template<typename MATRIX >
void geos::LAIHelperFunctions::makeIdentity ( localIndex const  n,
MPI_Comm const &  comm,
MATRIX &  mat 
)

Create an identity matrix.

Template Parameters
MATRIXtype of matrix
Parameters
nlocal size of the square identity matrix
commMPI communicator
matthe output matrix

Definition at line 43 of file LAIHelperFunctions.hpp.

◆ permuteMatrix() [1/2]

template<typename MATRIX >
MATRIX geos::LAIHelperFunctions::permuteMatrix ( MATRIX const &  matrix,
MATRIX const &  permutationMatrix 
)

Permute rows and columns of a square matrix.

Parameters
[in]matrixthe source matrix
[in]permutationMatrixpermutation matrix
Returns
the permuted matrix

Definition at line 181 of file LAIHelperFunctions.hpp.

◆ permuteMatrix() [2/2]

template<typename MATRIX >
MATRIX geos::LAIHelperFunctions::permuteMatrix ( MATRIX const &  matrix,
MATRIX const &  permutationMatrixLeft,
MATRIX const &  permutationMatrixRight 
)

Permute rows and columns of a rectangular matrix

Parameters
[in]matrixthe source matrix
[in]permutationMatrixLeftleft permutation matrix
[in]permutationMatrixRightright permutation matrix
Returns
the permuted matrix

Definition at line 197 of file LAIHelperFunctions.hpp.

◆ permuteVector()

template<typename VECTOR , typename MATRIX >
VECTOR geos::LAIHelperFunctions::permuteVector ( VECTOR const &  vector,
MATRIX const &  permutationMatrix 
)

Permute a vector.

Template Parameters
VECTORthe parallel vector type
MATRIXthe parallel matrix type
Parameters
[in]vectorthe source vector
[in]permutationMatrixthe permutation matrix
Returns
the permuted vector

Definition at line 165 of file LAIHelperFunctions.hpp.