|
IFEM 90A354
|
Base class for representing a system vector on different formats. More...
#include <SystemMatrix.h>

Public Member Functions | |
| virtual | ~SystemVector () |
| Empty destructor. | |
| virtual LinAlg::MatrixType | getType () const =0 |
| Returns the vector type. | |
| virtual SystemVector * | copy () const =0 |
| Creates a copy of the system vector and returns a pointer to it. | |
| virtual size_t | dim () const =0 |
| Returns the dimension/size of the system vector. | |
| virtual void | redim (size_t n)=0 |
| Sets the dimension of the system vector. | |
| virtual void | resize (size_t n, bool=false) |
| Resizes the vector to length n. | |
| bool | empty () const |
| Checks if the vector is empty. | |
| virtual Real * | getPtr ()=0 |
| Access through pointer. | |
| virtual const Real * | getRef () const =0 |
| Reference through pointer. | |
| virtual const Vector & | vec () const =0 |
| Reference to underlying utl::vector, if any. | |
| virtual void | init (Real value=Real(0))=0 |
| Initializes the vector assuming it is properly dimensioned. | |
| SystemVector & | copy (const SystemVector &x) |
| Copies entries from input vector x into *this. | |
| virtual void | assemble (const Vectors &vecs, const IntVec &meqn, int neq)=0 |
| Adds element vectors into the system vector. | |
| virtual bool | endAssembly () |
| Finalizes the system vector assembly. | |
| virtual void | mult (Real alpha)=0 |
| Multiplication with a scalar. | |
| virtual void | add (const SystemVector &vec, Real scale=Real(1))=0 |
| Addition of another system vector to this one. | |
| virtual Real | L1norm () const =0 |
| L1-norm of the vector. | |
| virtual Real | L2norm () const =0 |
| L2-norm of the vector. | |
| virtual Real | Linfnorm () const =0 |
| Linfinity-norm of the vector. | |
| virtual void | dump (std::ostream &, LinAlg::StorageFormat, const char *=nullptr) const |
| Dumps the system vector on a specified format. | |
Static Public Member Functions | |
| static SystemVector * | create (const ProcessAdm *adm, LinAlg::MatrixType vtype) |
| Static method creating a vector of the given type. | |
Protected Member Functions | |
| SystemVector () | |
| The default constructor is protected to allow sub-classes only. | |
| virtual std::ostream & | write (std::ostream &os) const |
| Writes the system vector to the given output stream. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const SystemVector &X) |
| Global stream operator printing the vector contents. | |
Base class for representing a system vector on different formats.
|
pure virtual |
Addition of another system vector to this one.
Implemented in PETScVectors, and StdVector.
Referenced by SIMbase::addToRHSvector().
|
pure virtual |
Adds element vectors into the system vector.
| [in] | vecs | The element vectors |
| [in] | meqn | Matrix of element equation numbers (0 based) |
| [in] | neq | Number of equations for (each) load vector |
This assembles for multiple RHS
Implemented in StdVector, and PETScVectors.
Referenced by ASMs1D::assembleL2matrices(), ASMs2DLag::assembleL2matrices(), ASMs3DLag::assembleL2matrices(), ASMu2D::assembleL2matrices(), and ASMu3D::assembleL2matrices().
|
pure virtual |
Creates a copy of the system vector and returns a pointer to it.
Implemented in StdVector, PETScVector, and PETScVectors.
Referenced by SIMbase::getRHSvector(), and SystemMatrix::solve().
|
pure virtual |
Returns the dimension/size of the system vector.
Implemented in StdVector, ISTLVector, and PETScVectors.
Referenced by copy(), HHTSIM::deSerialize(), NewmarkNLSIM::deSerialize(), empty(), SAM::expandSolution(), DiagMatrix::multiply(), SparseMatrix::multiply(), SPRMatrix::multiply(), HHTSIM::serialize(), NewmarkNLSIM::serialize(), SystemMatrix::solve(), SPRMatrix::solve(), and DenseMatrix::solve().
|
inlinevirtual |
Dumps the system vector on a specified format.
Reimplemented in StdVector.
Referenced by SIMbase::dumpEqSys().
|
inlinevirtual |
Finalizes the system vector assembly.
Reimplemented in ISTLVector, and PETScVector.
Referenced by ReactionsOnly::finalize(), and ASMbase::globalL2projection().
|
pure virtual |
Access through pointer.
Implemented in StdVector, and PETScVectors.
Referenced by SAM::addToRHS(), DenseMatrix::assemble(), SPRMatrix::assemble(), SAM::assembleSystem(), SAM::assembleSystem(), SAM::assembleSystem(), SAM::assembleSystem(), copy(), HHTSIM::deSerialize(), NewmarkNLSIM::deSerialize(), DiagMatrix::multiply(), SPRMatrix::multiply(), HHTSIM::serialize(), NewmarkNLSIM::serialize(), DiagMatrix::solve(), SPRMatrix::solve(), and DenseMatrix::solve().
|
pure virtual |
Reference through pointer.
Implemented in StdVector, and PETScVectors.
Referenced by copy(), SAM::expandSolution(), DiagMatrix::multiply(), SPRMatrix::multiply(), and SystemMatrix::solve().
|
pure virtual |
Returns the vector type.
Implemented in StdVector, ISTLVector, PETScVector, and PETScVectors.
Referenced by SPRMatrix::assemble(), SPRMatrix::multiply(), and SPRMatrix::solve().
Initializes the vector assuming it is properly dimensioned.
Implemented in PETScVector, StdVector, ISTLVector, and PETScVectors.
|
pure virtual |
L1-norm of the vector.
Implemented in StdVector, ISTLVector, PETScVector, and PETScVectors.
Referenced by HHTSIM::finalizeRHSvector(), and NewmarkSIM::initAcc().
|
pure virtual |
L2-norm of the vector.
Implemented in StdVector, ISTLVector, PETScVector, and PETScVectors.
|
pure virtual |
Linfinity-norm of the vector.
Implemented in StdVector, ISTLVector, PETScVector, and PETScVectors.
|
pure virtual |
Multiplication with a scalar.
Implemented in StdVector, and PETScVectors.
Referenced by TimeIntegration::SIMExplicitLMM< Solver >::solveStep().
|
pure virtual |
Sets the dimension of the system vector.
Implemented in StdVector, ISTLVector, PETScVector, and PETScVectors.
Referenced by copy(), SPRMatrix::multiply(), and resize().
|
inlinevirtual |
Resizes the vector to length n.
Reimplemented in StdVector.
References redim().
Referenced by SparseMatrix::multiply().
|
pure virtual |
Reference to underlying utl::vector, if any.
Implemented in StdVector, and PETScVectors.
Referenced by HHTSIM::correctStep(), NewmarkNLSIM::correctStep(), HHTSIM::finalizeRHSvector(), and ASMbase::globalL2projection().
|
inlineprotectedvirtual |
Writes the system vector to the given output stream.
Reimplemented in StdVector.