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

Class collecting the element matrices associated with a FEM problem. More...

#include <ElmMats.h>

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

Public Member Functions

 ElmMats (bool lhs=true)
 Default constructor.
 
virtual ~ElmMats ()
 Empty destructor.
 
void resize (size_t nA, size_t nB, size_t nC=0)
 Defines the number of element matrices and vectors. More...
 
void redim (size_t ndim)
 Sets the dimension of the element matrices and vectors. More...
 
virtual bool empty () const
 Checks if the element matrices are empty.
 
virtual void setStepSize (double, int)
 Updates the time step size.
 
virtual const MatrixgetNewtonMatrix () const
 Returns the element-level Newton matrix.
 
virtual const VectorgetRHSVector () const
 Returns the element-level right-hand-side vector.
 
void printMat (std::ostream &os, size_t idx=0, const char *prefix=nullptr) const
 Prints element matrix idx to output stream os.
 
void printVec (std::ostream &os, size_t idx=0, const char *prefix=nullptr) const
 Prints element vector idx to output stream os.
 
void printScl (std::ostream &os, size_t idx=0, const char *prefix=nullptr) const
 Prints element scalar idx to output stream os.
 
- Public Member Functions inherited from LocalIntegral
virtual ~LocalIntegral ()
 Empty destructor.
 
virtual void destruct ()
 Virtual destruction method to clean up after numerical integration.
 
virtual const LocalIntegralref () const
 Returns the LocalIntegral object to assemble into the global one.
 
void getSolution (size_t nsd, size_t nen, Matrix *u=nullptr, Matrix *v=nullptr, Matrix *a=nullptr, bool forceCurrent=false) const
 Extracts element solution vectors as nsd by nen matrices. More...
 

Public Attributes

std::vector< MatrixA
 The element coefficient matrices.
 
std::vector< Vectorb
 The element right-hand-side vectors.
 
std::vector< double > c
 The scalar quantities.
 
std::vector< const char * > Aname
 Matrix names (for debug print)
 
std::vector< const char * > Bname
 Vector names (for debug print)
 
std::vector< const char * > Cname
 Scalar names (for debug print)
 
bool rhsOnly
 If true, only the right-hand-sides are assembled.
 
bool withLHS
 If true, left-hand-side element matrices are present.
 
- Public Attributes inherited from LocalIntegral
Vectors vec
 Element-level primary solution vectors.
 

Additional Inherited Members

- Protected Member Functions inherited from LocalIntegral
 LocalIntegral ()
 The default constructor is protected to allow sub-classes only.
 

Detailed Description

Class collecting the element matrices associated with a FEM problem.

The class is derived from LocalIntegral such that it may be passed as argument to the Integrand::evalInt and Integrand::evalBou methods.

The class has two virtual methods returning the Newton matrix and the associated right-hand-side vector, which can be reimplemented by sub-classes to implement different time-integration schemes, mixed formulations, etc. The default versions use the first element matrix as the Newton matrix, and the first element vector as the associated right-hand-side vector.

Member Function Documentation

◆ redim()

void ElmMats::redim ( size_t  ndim)

Sets the dimension of the element matrices and vectors.

Parameters
[in]ndimNumber of rows and columns in the matrices/vectors

References A, and b.

Referenced by SIMmodal::assembleModalSystem(), IntegrandBase::getLocalIntegral(), and L2Mats::L2Mats().

◆ resize()

void ElmMats::resize ( size_t  nA,
size_t  nB,
size_t  nC = 0 
)

Defines the number of element matrices and vectors.

Parameters
[in]nANumber of element matrices
[in]nBNumber of element vectors
[in]nCNumber of scalar quantities

References A, b, and c.

Referenced by SIMmodal::assembleModalSystem(), IntegrandBase::getLocalIntegral(), L2Mats::L2Mats(), and ASMsupel::read().


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