IFEM  90A354
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
SAM Class Reference

This class contains data and functions for the assembly of FE matrices. More...

#include <SAM.h>

Inheritance diagram for SAM:
Inheritance graph
[legend]
Collaboration diagram for SAM:
Collaboration graph
[legend]

Public Member Functions

 SAM ()
 The constructor initializes an empty object.
 
virtual ~SAM ()
 The destructor frees the dynamically allocated arrays.
 
void print (std::ostream &os) const
 Prints out the key data to the given stream.
 
template<class T >
void printVector (T &os, const RealArray &vec, const char *heading=nullptr) const
 Prints out a nodal DOF vector to the given stream.
 
int getNoElms () const
 Returns the number of elements in the model.
 
int getNoNodes (char dofType='A') const
 Returns the number of FE nodes in the model. More...
 
int getNoDOFs () const
 Returns the total number of DOFs in the model.
 
int getNoSpecifiedDOFs () const
 Returns the number of specified DOFs in the model.
 
int getNoConstraints () const
 Returns the total number of constraint equations in the model.
 
int getNoEquations () const
 Returns the number of equations (free DOFs) in the model.
 
IntSet getEquations (char dType, int dof=0) const
 Returns the equations numbers for a given DOF type. More...
 
const int * getMADOF () const
 Returns the Matrix of Accumulated DOFs.
 
const int * getMEQN () const
 Returns the Matrix of EQuation Numbers.
 
void getDofCouplings (IntVec &irow, IntVec &jcol) const
 Computes the sparse structure (DOF couplings) in the system matrix. More...
 
void getDofCouplings (std::vector< IntSet > &dofc) const
 Finds the set of free DOFs coupled to each free DOF.
 
bool assembleSystem (SystemMatrix &sysK, SystemVector &sysRHS, const Matrix &eK, int iel=0, RealArray *reactionForces=nullptr) const
 Adds an element stiffness matrix into the system stiffness matrix. More...
 
bool assembleSystem (SystemMatrix &sysM, const Matrix &eM, int iel=0) const
 Adds an element matrix into the corresponding system matrix. More...
 
bool assembleSystem (SystemVector &sysRHS, const Matrix &eK, int iel=0, RealArray *reactionForces=nullptr) const
 Adds element stiffness contributions to the system load vector. More...
 
bool assembleSystem (SystemVector &sysRHS, const RealArray &eS, int iel=0, RealArray *reactionForces=nullptr) const
 Adds an element load vector into the system load vector. More...
 
bool assembleSystem (SystemVector &sysRHS, const Real *nS, int inod=0, RealArray *reactionForces=nullptr) const
 Adds a node load vector into the system load vector. More...
 
bool assembleSystem (SystemVector &sysRHS, Real S, const std::pair< int, int > &dof) const
 Adds a node load vector into the system load vector. More...
 
void addToRHS (SystemVector &sysRHS, const RealArray &S) const
 Adds a global load vector into the system load vector. More...
 
bool getElmNodes (IntVec &mnpc, int iel) const
 Finds the matrix of nodal point correspondance for an element. More...
 
bool getElmEqns (IntVec &meen, int iel, size_t nedof=0) const
 Finds the matrix of equation numbers for an element. More...
 
void getUniqueEqns (IntSet &meen, int iel) const
 Finds the set of unique equation numbers for an element. More...
 
bool getNodeEqns (IntVec &mnen, int inod) const
 Finds the matrix of equation numbers for a node. More...
 
char getNodeType (int inod) const
 Returns the DOF classification of a given node. More...
 
std::pair< int, int > getNodeDOFs (int inod) const
 Returns the first and last DOFs for a node. More...
 
std::pair< int, int > getNodeAndLocalDof (int idof, bool eqno=false) const
 Returns the internal node number and local index for a global DOF. More...
 
int getEquation (int inod, int ldof) const
 Finds the equation number corresponding to a local nodal DOF. More...
 
Real getDofVal (const RealArray &dofVec, int inod, int ldof) const
 Returns specified solution component from a global solution vector. More...
 
virtual bool expandSolution (const SystemVector &solVec, Vector &dofVec, Real scaleSD=Real(1)) const
 Expands a solution vector from equation-ordering to DOF-ordering. More...
 
bool expandVector (const Vector &solVec, Vector &dofVec) const
 Expands a solution vector from equation-ordering to DOF-ordering. More...
 
bool getSolVec (RealArray &solVec, const RealArray &dofVec) const
 Extracts equation-ordered solution vector from DOF-ordered vector. More...
 
bool applyDirichlet (Vector &dofVec) const
 Applies the non-homogenous Dirichlet BCs to the given vector. More...
 
virtual Real dot (const Vector &x, const Vector &y, char dofType='D') const
 Computes the dot-product of two vectors of length NDOF. More...
 
Real norm2 (const Vector &x, char dofType='D') const
 Computes the l2-norm of a vector of length NDOF. More...
 
virtual Real normL2 (const Vector &x, char dofType='D') const
 Computes the L2-norm of a vector of length NDOF. More...
 
virtual Real normInf (const Vector &x, size_t &comp, char dofType='D') const
 Computes the L_infinity-norm of a vector of length NDOF. More...
 
virtual Real normReact (const RealArray &u, const RealArray &rf) const
 Computes the energy norm contributions from nodal reaction forces. More...
 
Real getReaction (int dir, const RealArray &rf, const IntVec *nodes=nullptr) const
 Returns the total reaction force in the given coordinate direction. More...
 
bool haveReaction (int dir, const IntVec *nodes=nullptr) const
 Checks for total reaction force in the given coordinate direction. More...
 
bool getNodalReactions (int inod, const RealArray &rf, RealArray &nrf) const
 Returns a vector of reaction forces for a given node. More...
 
virtual bool merge (const SAM *, const std::map< int, int > *)
 Merges the assembly data from another SIM object with this.
 

Protected Member Functions

bool initSystemEquations ()
 Initializes the DOF-to-equation connectivity array MEQN.
 
void assembleRHS (Real *RHS, Real value, int ieq) const
 Adds a scalar value into a system right hand-side vector. More...
 
void assembleReactions (RealArray &rf, const RealArray &eS, int iel) const
 Assembles reaction forces for the fixed and prescribed DOFs. More...
 
bool expandVector (const Real *solVec, Vector &dofVec, Real scaleSD) const
 Expands a solution vector from equation-ordering to DOF-ordering. More...
 
void printStatusCodes (std::ostream &os) const
 Prints out the DOF status codes to the given stream.
 
void printCEQ (std::ostream &os, int iceq) const
 Prints out a constraint equation to the given stream.
 
void printMEQN (std::ostream &os) const
 Prints out the equation number mapping to the given stream.
 

Protected Attributes

int & nnod
 Number of nodes.
 
int & nel
 Number of elements.
 
int & ndof
 Number of DOFs.
 
int & nspdof
 Number of specified DOFs.
 
int & nceq
 Number of constraint equations.
 
int & neq
 Number of system equations.
 
int & nmmnpc
 Number of elements in MMNPC.
 
int & nmmceq
 Number of elements in MMCEQ.
 
int * mpmnpc
 Matrix of pointers to MNPCs in MMNPC.
 
int * mmnpc
 Matrix of matrices of nodal point correspondances.
 
int * madof
 Matrix of accumulated DOFs.
 
int * msc
 Matrix of status codes.
 
int * mpmceq
 Matrix of pointers to MCEQs in MMCEQ.
 
int * mmceq
 Matrix of matrices of constraint equation definitions.
 
Realttcc
 Table of tables of constraint equation coefficients.
 
int * minex
 Matrix of internal to external node numbers.
 
int * meqn
 Matrix of equation numbers.
 
std::vector< char > nodeType
 Nodal DOF classification.
 
std::vector< char > dof_type
 Individual DOF classification.
 

Private Attributes

int mpar [50]
 Matrix of parameters.
 

Friends

class DenseMatrix
 
class SPRMatrix
 
class SparseMatrix
 
class DiagMatrix
 
class PETScMatrix
 

Detailed Description

This class contains data and functions for the assembly of FE matrices.

The names and meanings of (most of) the data members of this class are adopted from Kolbein Bell's pionering work on the field. See his reports on the SAM library for a thorough elaboration.

The class does not contain methods for initializing the data members. That has to be done by deriving sub-classes specific to the solution methods.

Member Function Documentation

◆ addToRHS()

void SAM::addToRHS ( SystemVector sysRHS,
const RealArray S 
) const

Adds a global load vector into the system load vector.

Parameters
sysRHSThe right-hand-side system load vector
[in]SThe global load vector

References assembleRHS(), SystemVector::getPtr(), meqn, and ndof.

◆ applyDirichlet()

bool SAM::applyDirichlet ( Vector dofVec) const

Applies the non-homogenous Dirichlet BCs to the given vector.

Parameters
dofVecDegrees of freedom vector, length = NDOF

This method is typically used with explicit time integration.

References meqn, mpmceq, ndof, Real, and ttcc.

Referenced by SIMbase::applyDirichlet().

◆ assembleReactions()

void SAM::assembleReactions ( RealArray rf,
const RealArray eS,
int  iel 
) const
protected

Assembles reaction forces for the fixed and prescribed DOFs.

Parameters
rfReaction force container for the entire model
[in]eSThe element load vector
[in]ielIdentifier for the element that eS belongs to

References madof, mmnpc, mpmnpc, and msc.

Referenced by assembleSystem().

◆ assembleRHS()

void SAM::assembleRHS ( Real RHS,
Real  value,
int  ieq 
) const
protected

Adds a scalar value into a system right hand-side vector.

Parameters
RHSThe right-hand-side system load vector
[in]valueThe scalar value to add in
[in]ieqGlobal equation number for the scalar value

If ieq is zero, this is a fixed DOF and the value is ignored. If ieq is less than zero, this is a constrained DOF and the value is added to the master DOFs of the governing constraint equation of this DOF.

References meqn, mmceq, mpmceq, and ttcc.

Referenced by addToRHS(), and assembleSystem().

◆ assembleSystem() [1/6]

bool SAM::assembleSystem ( SystemMatrix sysK,
SystemVector sysRHS,
const Matrix eK,
int  iel = 0,
RealArray reactionForces = nullptr 
) const

Adds an element stiffness matrix into the system stiffness matrix.

Parameters
sysKThe left-hand-side system stiffness matrix
sysRHSThe right-hand-side system load vector
[in]eKThe element stiffness matrix
[in]ielIdentifier for the element that eK belongs to
reactionForcesPointer to vector of nodal reaction forces
Returns
true on successful assembly, otherwise false

When multi-point constraints are present, contributions from these are also added into the right-hand-side system load vector.

References SystemMatrix::assemble(), assembleReactions(), utl::vector< T >::empty(), utl::matrixBase< T >::empty(), getElmEqns(), mpmceq, Real, utl::vector< T >::resize(), utl::matrix< T >::rows(), and ttcc.

Referenced by AlgEqSystem::assemble(), and ReactionsOnly::assemble().

◆ assembleSystem() [2/6]

bool SAM::assembleSystem ( SystemMatrix sysM,
const Matrix eM,
int  iel = 0 
) const

Adds an element matrix into the corresponding system matrix.

Parameters
sysMThe left-hand-side system matrix
[in]eMThe element matrix
[in]ielIdentifier for the element that eM belongs to
Returns
true on successful assembly, otherwise false

References SystemMatrix::assemble(), and utl::matrixBase< T >::empty().

◆ assembleSystem() [3/6]

bool SAM::assembleSystem ( SystemVector sysRHS,
const Matrix eK,
int  iel = 0,
RealArray reactionForces = nullptr 
) const

Adds element stiffness contributions to the system load vector.

Parameters
sysRHSThe right-hand-side system load vector
[in]eKThe element stiffness matrix
[in]ielIdentifier for the element that eK belongs to
reactionForcesPointer to vector of nodal reaction forces
Returns
true on successful assembly, otherwise false

When multi-point constraints are present, contributions from these are added into the right-hand-side system load vector.

References assembleReactions(), assembleRHS(), utl::vector< T >::empty(), utl::matrixBase< T >::empty(), getElmEqns(), SystemVector::getPtr(), mpmceq, Real, utl::vector< T >::resize(), utl::matrix< T >::rows(), and ttcc.

◆ assembleSystem() [4/6]

bool SAM::assembleSystem ( SystemVector sysRHS,
const Real nS,
int  inod = 0,
RealArray reactionForces = nullptr 
) const

Adds a node load vector into the system load vector.

Parameters
sysRHSThe right-hand-side system load vector
[in]nSThe nodal load vector
[in]inodIdentifier for the node that nS belongs to
reactionForcesPointer to vector of nodal reaction forces
Returns
true on successful assembly, otherwise false

References assembleRHS(), getNodeEqns(), SystemVector::getPtr(), madof, and msc.

◆ assembleSystem() [5/6]

bool SAM::assembleSystem ( SystemVector sysRHS,
const RealArray eS,
int  iel = 0,
RealArray reactionForces = nullptr 
) const

Adds an element load vector into the system load vector.

Parameters
sysRHSThe right-hand-side system load vector
[in]eSThe element load vector
[in]ielIdentifier for the element that eS belongs to
reactionForcesPointer to vector of nodal reaction forces
Returns
true on successful assembly, otherwise false

References assembleReactions(), assembleRHS(), getElmEqns(), SystemVector::getPtr(), madof, meqn, mmceq, mmnpc, mpar, mpmceq, mpmnpc, and ttcc.

◆ assembleSystem() [6/6]

bool SAM::assembleSystem ( SystemVector sysRHS,
Real  S,
const std::pair< int, int > &  dof 
) const

Adds a node load vector into the system load vector.

Parameters
sysRHSThe right-hand-side system load vector
[in]SThe nodal load vector
[in]dofNode and local dof number for the load value S
Returns
true on successful assembly, otherwise false

References assembleRHS(), SystemVector::getPtr(), madof, meqn, and nnod.

◆ dot()

Real SAM::dot ( const Vector x,
const Vector y,
char  dofType = 'D' 
) const
virtual

Computes the dot-product of two vectors of length NDOF.

Parameters
[in]xThe first vector of the dot-product
[in]yThe second vector of the dot-product
[in]dofTypeOnly consider DOFs of this type

Reimplemented in SAMpatchPETSc.

References dof_type, utl::vector< T >::dot(), madof, nnod, nodeType, Real, and utl::vector< T >::size().

Referenced by SAMpatchPETSc::dot(), SIMbase::iterationNorms(), and norm2().

◆ expandSolution()

bool SAM::expandSolution ( const SystemVector solVec,
Vector dofVec,
Real  scaleSD = Real(1) 
) const
virtual

Expands a solution vector from equation-ordering to DOF-ordering.

Parameters
[in]solVecSolution vector, length = NEQ
[out]dofVecDegrees of freedom vector, length = NDOF
[in]scaleSDScaling factor for specified (slave) DOFs
Returns
false if the length of solVec is invalid, otherwise true

The size of the solution vector that comes out of the linear equation solver equals the number of free DOFs in the system (=NEQ). That is, all fixed or constrained (slave) DOFs are not present. Before we can compute derived element quantities we therefore need to extract the resulting solution values also for the constrained DOFs.

Reimplemented in SAMpatchPETSc.

References SystemVector::dim(), expandVector(), SystemVector::getRef(), and neq.

Referenced by SAMpatchPETSc::expandSolution(), SIMbase::extractLoadVec(), AlgEqSystem::finalize(), ReactionsOnly::finalize(), and SIMbase::solveEqSystem().

◆ expandVector() [1/2]

bool SAM::expandVector ( const Real solVec,
Vector dofVec,
Real  scaleSD 
) const
protected

Expands a solution vector from equation-ordering to DOF-ordering.

Parameters
[in]solVecPointer to solution vector, length = NEQ
[out]dofVecDegrees of freedom vector, length = NDOF
[in]scaleSDScaling factor for specified (slave) DOFs

References meqn, mmceq, mpmceq, ndof, neq, utl::vector< T >::ptr(), Real, utl::vector< T >::resize(), and ttcc.

◆ expandVector() [2/2]

bool SAM::expandVector ( const Vector solVec,
Vector dofVec 
) const

Expands a solution vector from equation-ordering to DOF-ordering.

Parameters
[in]solVecSolution vector, length = NEQ
[out]dofVecDegrees of freedom vector, length = NDOF
Returns
false if the length of solVec is invalid, otherwise true

This version is typically used to expand eigenvectors.

References neq, utl::vector< T >::ptr(), Real, and utl::vector< T >::size().

Referenced by expandSolution(), AlgEqSystem::recoverInternals(), and SIMbase::systemModes().

◆ getDofCouplings()

void SAM::getDofCouplings ( IntVec irow,
IntVec jcol 
) const

Computes the sparse structure (DOF couplings) in the system matrix.

Parameters
[out]irowstart index for each row in jcol
[out]jcolcolumn indices for non-zero entries

References neq.

Referenced by ISTLMatrix::initAssembly(), and SparseMatrix::preAssemble().

◆ getDofVal()

Real SAM::getDofVal ( const RealArray dofVec,
int  inod,
int  ldof 
) const

Returns specified solution component from a global solution vector.

Parameters
[in]dofVecSolution vector in DOF order
[in]inodIdentifier for the node to get solution component for
[in]ldofLocal index of the DOF within node inod
Returns
The DOF value, or zero if inod or ldof is out of range

References madof, ndof, nnod, and Real.

◆ getElmEqns()

bool SAM::getElmEqns ( IntVec meen,
int  iel,
size_t  nedof = 0 
) const

Finds the matrix of equation numbers for an element.

Parameters
[out]meenMatrix of element equation numbers
[in]ielIdentifier for the element to get the equation numbers for
[in]nedofNumber of degrees of freedom in the element (used for internal consistency checking, unless zero)

References madof, meqn, mmnpc, mpmceq, mpmnpc, and nel.

Referenced by DenseMatrix::assemble(), DiagMatrix::assemble(), SparseMatrix::assemble(), PETScMatrix::assemble(), assembleSystem(), getDofCouplings(), DomainDecomposition::getSubdomains(), getUniqueEqns(), and ASMs2D::validateThreadGroups().

◆ getElmNodes()

bool SAM::getElmNodes ( IntVec mnpc,
int  iel 
) const

Finds the matrix of nodal point correspondance for an element.

Parameters
[out]mnpcMatrix of nodal point correspondance
[in]ielIdentifier for the element to get the node numbers for

References mmnpc, mpmnpc, and nel.

Referenced by GlbForceVec::assemble(), SIMbase::getElmNodes(), and DomainDecomposition::getSubdomains().

◆ getEquation()

int SAM::getEquation ( int  inod,
int  ldof 
) const

Finds the equation number corresponding to a local nodal DOF.

Parameters
[in]inodIdentifier for the node to get the equation number for
[in]ldofLocal index of the DOF within node inod
Returns
Equation number, or zero if the DOF is fixed or constrained

References madof, meqn, and nnod.

Referenced by DomainDecomposition::calcGlobalEqNumbers(), getEquations(), DomainDecomposition::setup(), and SIMbase::updateForNewElements().

◆ getEquations()

IntSet SAM::getEquations ( char  dType,
int  dof = 0 
) const

Returns the equations numbers for a given DOF type.

Parameters
[in]dTypeThe DOF type to consider
[in]dofThe local DOF in each node to consider (0 = all)

References dof_type, getEquation(), madof, meqn, nnod, and nodeType.

Referenced by DomainDecomposition::setup().

◆ getNodalReactions()

bool SAM::getNodalReactions ( int  inod,
const RealArray rf,
RealArray nrf 
) const

Returns a vector of reaction forces for a given node.

Parameters
[in]inodIdentifier for the node to get the reaction forces for
[in]rfReaction force container for the entire model
[out]nrfNodal reaction forces
Returns
true if the specified node has reaction forces

References madof, msc, and nnod.

Referenced by SIMoutput::dumpResults(), and SIMoutput::printNRforces().

◆ getNodeAndLocalDof()

std::pair< int, int > SAM::getNodeAndLocalDof ( int  idof,
bool  eqno = false 
) const

Returns the internal node number and local index for a global DOF.

Parameters
[in]idofGlobal DOF-number in the range [1,NDOF]
[in]eqnoIf true, idof is the 1-based global equation number
Returns
first = internal node number in the range [1,NNOD]
second = local DOF number in the range [1,NNDOF]

References madof, meqn, minex, ndof, and nnod.

Referenced by SIMbase::getWorstDofs(), printCEQ(), SPRMatrix::solve(), and ASMs2D::validateThreadGroups().

◆ getNodeDOFs()

std::pair< int, int > SAM::getNodeDOFs ( int  inod) const

Returns the first and last DOFs for a node.

Parameters
[in]inodIdentifier for the node to get the DOF numbers for

References madof, and nnod.

Referenced by GlbForceVec::assemble(), DomainDecomposition::calcGlobalNodeNumbers(), SIMoutput::dumpSolution(), SIMbase::extractLoadVec(), and SIMgeneric::getInterfaceForces().

◆ getNodeEqns()

bool SAM::getNodeEqns ( IntVec mnen,
int  inod 
) const

Finds the matrix of equation numbers for a node.

Parameters
[out]mnenMatrix of node equation numbers
[in]inodIdentifier for the node to get the equation numbers for

References madof, meqn, and nnod.

Referenced by SparseMatrix::assembleCol(), assembleSystem(), SIMbase::dumpEqSys(), DomainDecomposition::getSubdomains(), AlgEqSystem::recoverInternals(), and AlgEqSystem::staticCondensation().

◆ getNodeType()

char SAM::getNodeType ( int  inod) const
inline

Returns the DOF classification of a given node.

Parameters
[in]inodIdentifier for the node to get the classification for

References nodeType.

Referenced by SIMbase::getNodeType(), and DomainDecomposition::getSubdomains().

◆ getNoNodes()

int SAM::getNoNodes ( char  dofType = 'A') const

Returns the number of FE nodes in the model.

Parameters
[in]dofTypeOnly consider nodes of this type (default All)

References nnod, and nodeType.

Referenced by DomainDecomposition::calcGlobalNodeNumbers(), SIMbase::dumpEqSys(), SIMbase::extractLoadVec(), SIMoutput::extractNodeVec(), SIMbase::extractPatchSolution(), SIMbase::getNoNodes(), GlbForceVec::initNodeMap(), SIMbase::merge(), and SIMoutput::printNRforces().

◆ getReaction()

Real SAM::getReaction ( int  dir,
const RealArray rf,
const IntVec nodes = nullptr 
) const

Returns the total reaction force in the given coordinate direction.

Parameters
[in]dir1-based coordinate direction index
[in]rfReaction force container for the entire model
[in]nodesThe set of nodes to consider (null means all nodes)

References madof, msc, nnod, nspdof, and Real.

Referenced by SIMbase::getCurrentReactions().

◆ getSolVec()

bool SAM::getSolVec ( RealArray solVec,
const RealArray dofVec 
) const

Extracts equation-ordered solution vector from DOF-ordered vector.

Parameters
[out]solVecSolution vector in equation order
[in]dofVecSolution vector in DOF order

This method is basically doing the opposite transformation as expandVector().

References meqn, ndof, neq, and Real.

Referenced by SIMbase::dumpSolVec().

◆ getUniqueEqns()

void SAM::getUniqueEqns ( IntSet meen,
int  iel 
) const

Finds the set of unique equation numbers for an element.

Parameters
[out]meenMatrix of unique element equation numbers
[in]ielIdentifier for the element to get equation numbers for

References getElmEqns(), meqn, mmceq, and mpmceq.

◆ haveReaction()

bool SAM::haveReaction ( int  dir,
const IntVec nodes = nullptr 
) const

Checks for total reaction force in the given coordinate direction.

Parameters
[in]dir1-based coordinate direction index
[in]nodesThe set of nodes to consider (null means all nodes)

References madof, msc, nnod, and nspdof.

Referenced by SIMbase::haveReactions().

◆ norm2()

Real SAM::norm2 ( const Vector x,
char  dofType = 'D' 
) const
inline

Computes the l2-norm of a vector of length NDOF.

Parameters
[in]xThe vector to compute the norm of
[in]dofTypeOnly consider DOFs of this type

References dot().

Referenced by SIMbase::iterationNorms().

◆ normInf()

Real SAM::normInf ( const Vector x,
size_t &  comp,
char  dofType = 'D' 
) const
virtual

Computes the L_infinity-norm of a vector of length NDOF.

Parameters
[in]xThe vector to compute the norm of
compLocal nodal DOF on input, index of the largest value on output
[in]dofTypeOnly consider DOFs of this type

Reimplemented in SAMpatchPETSc.

References dof_type, utl::vector< T >::empty(), madof, nnod, nodeType, utl::vector< T >::normInf(), and Real.

Referenced by SAMpatchPETSc::normInf(), and SIMbase::solutionNorms().

◆ normL2()

Real SAM::normL2 ( const Vector x,
char  dofType = 'D' 
) const
virtual

Computes the L2-norm of a vector of length NDOF.

Parameters
[in]xThe vector to compute the norm of
[in]dofTypeOnly consider DOFs of this type

Reimplemented in SAMpatchPETSc.

References dof_type, utl::vector< T >::empty(), madof, nnod, nodeType, utl::vector< T >::norm2(), Real, and utl::vector< T >::size().

Referenced by SAMpatchPETSc::normL2(), and SIMbase::solutionNorms().

◆ normReact()

Real SAM::normReact ( const RealArray u,
const RealArray rf 
) const
virtual

Computes the energy norm contributions from nodal reaction forces.

Parameters
[in]uThe (incremental) nodal displacement vector
[in]rfReaction force container for the entire model

References meqn, mpmceq, msc, ndof, and Real.

Referenced by SIMbase::externalEnergy(), and SIMbase::getCurrentReactions().


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