|
IFEM
90A354
|
Class for representing the system vector in ISTL format. More...
#include <ISTLMatrix.h>


Public Member Functions | |
| ISTLVector (const ProcessAdm &padm) | |
| Constructor creating an empty vector. | |
| ISTLVector (const ProcessAdm &padm, size_t n) | |
| Constructor creating a vector of length n. | |
| ISTLVector (const ProcessAdm &padm, const Real *values, size_t n) | |
| Constructor creating a vector from an array. | |
| ISTLVector (const ISTLVector &vec) | |
| Copy constructor. | |
| ~ISTLVector () override | |
| Destructor. | |
| LinAlg::MatrixType | getType () const override |
| Returns the vector type. | |
| void | init (Real value=Real(0)) override |
| Initializes the vector to a given scalar value. | |
| size_t | dim () const override |
| Returns the dimension of the system vector. | |
| void | redim (size_t n) override |
| Sets the dimension of the system vector. | |
| bool | endAssembly () override |
| Copies the assembled vector into x. | |
| Real | L1norm () const override |
| L1-norm of vector. | |
| Real | L2norm () const override |
| L2-norm of vector. | |
| Real | Linfnorm () const override |
| Linfinity-norm of vector. | |
| const ProcessAdm & | getAdm () const |
| Return associated process administrator. | |
| ISTL::Vec & | getVector () |
| Returns the ISTL vector (for assignment). | |
| const ISTL::Vec & | getVector () const |
| Returns the ISTL vector (for read access). | |
Public Member Functions inherited from StdVector | |
| StdVector (size_t n=0) | |
| Default constructor creating a vector of length n. | |
| StdVector (const Real *values, size_t n) | |
| Constructor creating a vector from an array. | |
| StdVector (const std::vector< Real > &vec) | |
| Overloaded copy constructor. | |
| virtual SystemVector * | copy () const |
| Creates a copy of the system vector and returns a pointer to it. | |
| virtual void | assemble (const Vectors &vecs, const IntVec &meqn, int neq) |
| Adds element vectors into the system vector. More... | |
| virtual void | resize (size_t n, bool forceClear=false) |
| Resizes the vector to length n. More... | |
| virtual Real * | getPtr () |
| Access through pointer. | |
| virtual const Real * | getRef () const |
| Reference through pointer. | |
| virtual const Vector & | vec () const |
| Reference to underlying utl::vector. | |
| virtual void | mult (Real alpha) |
| Multiplication with a scalar. | |
| virtual void | add (const SystemVector &vec, Real scale) |
| Addition of another system vector to this one. | |
| virtual void | dump (std::ostream &os, LinAlg::StorageFormat format, const char *label) const |
| Dumps the system vector on a specified format. | |
Public Member Functions inherited from SystemVector | |
| virtual | ~SystemVector () |
| Empty destructor. | |
| bool | empty () const |
| Checks if the vector is empty. | |
| SystemVector & | copy (const SystemVector &x) |
| Copies entries from input vector x into *this. | |
Public Member Functions inherited from utl::vector< T > | |
| vector () | |
| Constructor creating an empty vector. | |
| vector (size_t n) | |
| Constructor creating a vector of length n. | |
| vector (const T *values, size_t n) | |
| Constructor creating a vector from a C-array. | |
| vector (const std::vector< T > &X) | |
| Overloaded copy constructor. | |
| vector< T > & | operator= (const std::vector< T > &X) |
| Overloaded assignment operator. | |
| T * | ptr () |
| Access through pointer. | |
| const T * | ptr () const |
| Reference through pointer. | |
| size_t | size () const |
| Size of the vector. | |
| bool | empty () const |
| Is the vector empty (zero size)? | |
| bool | zero (T tol=T(0)) const |
| Is the vector elements all zero? | |
| ConstVecIter | begin () const |
| Start of the vector container, for access. | |
| ConstVecIter | end () const |
| End of the vector container, for access. | |
| VecIter | begin () |
| Start of the vector container, for update. | |
| VecIter | end () |
| End of the vector container, for update. | |
| operator const std::vector< T > & () const | |
| Type casting operator, for access. | |
| operator std::vector< T > & () | |
| Type casting operator, for update. | |
| T & | operator[] (size_t i) |
| Index-0 based element access. | |
| const T & | operator[] (size_t i) const |
| Index-0 based element reference. | |
| T & | operator() (size_t i) |
| Index-1 based element access. | |
| const T & | operator() (size_t i) const |
| Index-1 based element reference. | |
| void | fill (T s) |
| Fill the vector with a scalar value. | |
| void | fill (const T *values, size_t n=0) |
| Fill the vector with data from an array. | |
| void | push_back (T c) |
| Append a scalar value to the vector, increasing its size by one. | |
| void | push_back (ConstVecIter i1, ConstVecIter i2) |
| Append a range of values increasing the size by i2-i1. | |
| void | push_back (const T *p, const T *q) |
| Append a range of values increasing the size by q-p. | |
| void | swap (vector< T > &vec) |
| Swap the content with another vector. | |
| vector< T > & | operator*= (T c) |
| Multiplication with a scalar. | |
| vector< T > & | operator/= (T d) |
| Division by a scalar. | |
| vector< T > & | operator*= (const std::vector< T > &X) |
| Component-wise multiplication with a vector. | |
| vector< T > & | operator/= (const std::vector< T > &X) |
| Component-wise division with a vector. | |
| vector< T > & | operator+= (const vector< T > &X) |
| Add the given vector X to *this. | |
| vector< T > & | operator-= (const vector< T > &X) |
| Subtract the given vector X from *this. | |
| vector< T > & | add (const std::vector< T > &X, const T &alfa=T(1), unsigned int ofsx=0, int stridex=1, unsigned int ofsy=0, int stridey=1) |
| Add the given vector X scaled by alfa to *this. | |
| vector< T > & | relax (T alfa, const std::vector< T > &X) |
| Perform \({\bf Y} = \alpha{\bf Y} + (1-\alpha){\bf X} \) where Y = *this. | |
| vector< T > & | relax (T alfa, const std::vector< T > &X, const std::vector< T > &Y) |
| Perform \({\bf Z} = \alpha{\bf Y} + (1-\alpha){\bf X} \) where Z = *this. | |
| T | dot (const T *v, size_t nv, size_t off1=0, int inc1=1, size_t off2=0, int inc2=1) const |
| Dot product between *this and another vector. More... | |
| T | dot (const std::vector< T > &v, size_t off1=0, int inc1=1, size_t off2=0, int inc2=1) const |
| Dot product between *this and another vector. More... | |
| T | norm2 (size_t off=0, int inc=1) const |
| Return the Euclidean norm of the vector. More... | |
| T | normInf (size_t &off, int inc=1, bool sign=false) const |
| Return the infinite norm of the vector, or signed max value. More... | |
| T | normInf (int inc=1) const |
| Return the infinite norm of the vector (no index offset). More... | |
| T | max () const |
| Return the largest element of the vector. | |
| T | min () const |
| Return the smallest element of the vector. | |
| T | asum (size_t off=0, int inc=1) const |
| Return the sum of the absolute value of the vector elements. More... | |
| T | sum (size_t off=0, int inc=1, size_t max=0) const |
| Return the sum of the vector elements. More... | |
| bool | resize (size_t n, char forceClear=0) |
| Resize the vector to length n. More... | |
| void | reserve (size_t n) |
| Pre-allocation of vector length to n. | |
| void | clear () |
| Clear the vector, setting its size to zero. | |
Protected Attributes | |
| ISTL::Vec | x |
| The actual ISTL vector. | |
| const ProcessAdm & | adm |
| Process administrator. | |
Additional Inherited Members | |
Public Types inherited from utl::vector< T > | |
| using | ConstVecIter = typename std::vector< T >::const_iterator |
| Convenience alias for const iterators. | |
| using | VecIter = typename std::vector< T >::iterator |
| Convenience alias for non-const iterators. | |
Static Public Member Functions inherited from StdVector | |
| static void | dump (const Vector &x, const char *label, LinAlg::StorageFormat format, std::ostream &os) |
| Dumps a standard vector to given output stream on specified format. | |
Static Public Member Functions inherited from SystemVector | |
| static SystemVector * | create (const ProcessAdm *adm, LinAlg::MatrixType vtype) |
| Static method creating a vector of the given type. | |
Protected Member Functions inherited from StdVector | |
| virtual std::ostream & | write (std::ostream &os) const |
| Writes the system vector to the given output stream. | |
Protected Member Functions inherited from SystemVector | |
| SystemVector () | |
| The default constructor is protected to allow sub-classes only. | |
Class for representing the system vector in ISTL format.