|
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. More... | |
| 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 |
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 PETScVectors, and StdVector.
Referenced by ASMs1D::assembleL2matrices(), ASMs2DLag::assembleL2matrices(), ASMs3DLag::assembleL2matrices(), ASMu2D::assembleL2matrices(), ASMu3D::assembleL2matrices(), ASMs2DmxLag::evalSolution(), and ASMs3DmxLag::evalSolution().