|
IFEM
90A354
|
This is a sub-class of SAM with added functionality for spline models. More...
#include <SAMpatch.h>


Public Member Functions | |
| SAMpatch () | |
| Empty default constructor. | |
| virtual | ~SAMpatch () |
| Empty destructor. | |
| bool | init (const std::vector< ASMbase * > &patches, int numNod, const std::vector< char > &dTypes) |
| Allocates the dynamic arrays and populates them with data. More... | |
| bool | updateConstraintEqs (const Vector *prevSol=nullptr) |
| Updates the multi-point constraint array TTCC. More... | |
| std::vector< ASMbase * >::const_iterator | begin () const |
| Returns the start iterator of the patch container. | |
| std::vector< ASMbase * >::const_iterator | end () const |
| Returns the end iterator of the patch container. | |
| size_t | getNoPatches () const |
| Returns the number of patches in model. | |
| virtual bool | merge (const SAM *other, const std::map< int, int > *old2new) |
| Merges the assembly data from another SIM with this. | |
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... | |
Protected Member Functions | |
| bool | initNodeDofs (const std::vector< char > &dTypes) |
| Initializes the nodal arrays MINEX, MADOF and MSC. | |
| bool | initElementConn () |
| Initializes the element topology arrays MPMNPC and MMNPC. | |
| bool | initConstraintEqs () |
| Initializes the multi-point constraint arrays MPMCEQ, MMCEQ and TTCC. | |
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. | |
Private Attributes | |
| std::vector< ASMbase * > | model |
| The spline patches of the model. | |
Additional Inherited Members | |
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. | |
| Real * | ttcc |
| 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. | |
This is a sub-class of SAM with added functionality for spline models.
It contains some additional methods for initializing the SAM data for an FE model based on a set of ASMbase patches.
| bool SAMpatch::init | ( | const std::vector< ASMbase * > & | patches, |
| int | numNod, | ||
| const std::vector< char > & | dTypes | ||
| ) |
Allocates the dynamic arrays and populates them with data.
| [in] | patches | All spline patches in the model |
| [in] | numNod | Total number of unique nodes in the model |
| [in] | dTypes | Nodal DOF type flags |
References IFEM::cout, SAM::dof_type, initConstraintEqs(), initElementConn(), initNodeDofs(), SAM::initSystemEquations(), SAM::madof, model, SAM::nceq, SAM::ndof, SAM::nel, SAM::neq, SAM::nnod, and SAM::nodeType.
| bool SAMpatch::updateConstraintEqs | ( | const Vector * | prevSol = nullptr | ) |
Updates the multi-point constraint array TTCC.
| [in] | prevSol | Previous primary solution vector in DOF-order |
References MPC::DOF::coeff, MPC::DOF::dof, MPC::getMaster(), MPC::getNoMaster(), MPC::getSlave(), SAM::madof, SAM::mmceq, model, SAM::mpmceq, SAM::msc, SAM::nceq, MPC::DOF::nextc, MPC::DOF::node, Real, utl::vector< T >::size(), and SAM::ttcc.
Referenced by SIMbase::updateDirichlet().