IFEM  90A354
Public Member Functions | List of all members
SAMmodal Class Reference

A simple SAM class for diagonal systems. More...

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

Public Member Functions

 SAMmodal (int n)
 The constructor initializes the arrays for a diagonal system.
 
virtual ~SAMmodal ()
 Empty destructor.
 
- Public Member Functions inherited from SAM
 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.
 

Additional Inherited Members

- Protected Member Functions inherited from SAM
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 inherited from SAM
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.
 

Detailed Description

A simple SAM class for diagonal systems.


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