Vector and Matrix
Detailed Description
A module that groups vector and matrix related classes.
Classes | |
| class | AbsVect |
| This is a template abstract class from which inherit finite element oriented vectors. More... | |
| class | BCVect |
| To treat vectors that contain imposed boundary conditions. More... | |
| class | DMatrix |
| To store dense matrices. More... | |
| class | DSMatrix |
| To store symmetric dense matrices. More... | |
| class | EdgeVect |
| Defines an edgewise vector. More... | |
| class | ElementVect |
| Defines an elementwise vector. More... | |
| class | LocalMatrix |
| Handles small size matrices like element matrices. More... | |
| class | LocalVect |
| Handles small size vectors like element vectors. More... | |
| class | NodeVect |
| Defines a nodewise vector. More... | |
| class | SideVect |
| Defines a sidewise vector. More... | |
| class | SkMatrix |
| To handle square matrices in skyline storage format. More... | |
| class | SkSMatrix |
| To handle symmetric matrices in skyline storage format. More... | |
| class | SpMatrix |
| To handle matrices in sparse storage format. More... | |
| class | TrMatrix |
| To store tridiagonal matrices. More... | |
| class | Vect |
| To handle general purpose vectors. More... | |
Functions | |
| template<class T_, size_t N_> | |
| void | Axpy (T_ a, const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
| Add a*x to vector y. | |
| template<class T_, size_t N_> | |
| void | Copy (const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
| Copy vector x into vector y. | |
| template<class T_> | |
| T_ | Dot (const Vect< T_ > &x, const Vect< T_ > &y) |
| Calculate dot product of two vectors. | |
| template<class T_, size_t N_> | |
| double | Dot (const LocalVect< T_, N_ > &a, const LocalVect< T_, N_ > &b) |
| Calculate dot product of 2 vectors (instances of class LocalVect). | |
| template<class T_> | |
| Vect< T_ > | operator* (T_ a, const Vect< T_ > &x) |
| Operator * (Multiplication of vector by constant). | |
| template<class T_> | |
| TrMatrix< T_ > | operator* (T_ a, const TrMatrix< T_ > &A) |
| Operator * (Premultiplication of matrix by constant). | |
| template<class T_, size_t N_> | |
| LocalVect< T_, N_ > | operator* (T_ a, const LocalVect< T_, N_ > &x) |
| Operator * (Premultiplication of vector by constant). | |
| template<class T_, size_t NR_, size_t NC_> | |
| LocalMatrix< T_, NR_, NC_ > | operator* (T_ a, const LocalMatrix< T_, NR_, NC_ > &x) |
| Operator * (Multiply matrix x by scalar a). | |
| template<class T_> | |
| Vect< T_ > | operator+ (const Vect< T_ > &x, const Vect< T_ > &y) |
| Operator + (Addition of two instances of class Vect). | |
| template<class T_, size_t N_> | |
| LocalVect< T_, N_ > | operator+ (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y) |
| Operator + (Add two vectors). | |
| template<class T_, size_t NR_, size_t NC_> | |
| LocalMatrix< T_, NR_, NC_ > | operator+ (const LocalMatrix< T_, NR_, NC_ > &x, const LocalMatrix< T_, NR_, NC_ > &y) |
| Operator + (Add matrix x to y). | |
| template<class T_> | |
| Vect< T_ > | operator- (const Vect< T_ > &x, const Vect< T_ > &y) |
| Operator - (Difference between two instances of class Vect). | |
| template<class T_, size_t N_> | |
| LocalVect< T_, N_ > | operator- (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y) |
| Operator - (Subtract two vectors). | |
| template<class T_, size_t NR_, size_t NC_> | |
| LocalMatrix< T_, NR_, NC_ > | operator- (const LocalMatrix< T_, NR_, NC_ > &x, const LocalMatrix< T_, NR_, NC_ > &y) |
| Operator - (Subtract matrix y from x). | |
| template<class T_, size_t N_> | |
| LocalVect< T_, N_ > | operator/ (T_ a, const LocalVect< T_, N_ > &x) |
| Operator / (Division of vector by constant). | |
| template<class T_, size_t NR_, size_t NC_> | |
| LocalMatrix< T_, NR_, NC_ > | operator/ (T_ a, const LocalMatrix< T_, NR_, NC_ > &x) |
| Operator / (Divide matrix x by scalar a). | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const Vect< T_ > &v) |
| Output vector in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const TrMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const SpMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const SkSMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const SkMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const SideVect< T_ > &v) |
| Output vector in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const NodeVect< T_ > &v) |
| Output vector in output stream. | |
| template<class T_, size_t N_> | |
| ostream & | operator<< (ostream &s, const LocalVect< T_, N_ > &v) |
| Output vector in output stream. | |
| template<class T_, size_t NR_, size_t NC_> | |
| ostream & | operator<< (ostream &s, const LocalMatrix< T_, NR_, NC_ > &a) |
| Output vector in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const ElementVect< T_ > &v) |
| Output vector in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const EdgeVect< T_ > &a) |
| Output vector. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const DSMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| ostream & | operator<< (ostream &s, const DMatrix< T_ > &a) |
| Output matrix in output stream. | |
| template<class T_> | |
| istream & | operator>> (istream &s, Vect< T_ > &a) |
| Read vector from input stream. | |
| template<class T_> | |
| istream & | operator>> (istream &s, SideVect< T_ > &v) |
| Read vector from an input stream. | |
| template<class T_> | |
| istream & | operator>> (istream &s, NodeVect< T_ > &v) |
| Read vector from input stream. | |
| template<class T_> | |
| istream & | operator>> (istream &s, ElementVect< T_ > &v) |
| Read vector from an input stream. | |
| template<class T_> | |
| istream & | operator>> (istream &s, EdgeVect< T_ > &a) |
| Read vector from an input stream. | |
| template<class T_, size_t N_> | |
| void | Scale (T_ a, LocalVect< T_, N_ > &x) |
| Multiply vector x by constant a and store result in x. | |
| template<class T_, size_t N_> | |
| void | Scale (T_ a, const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
| Multiply vector x by constant a and store result in y. | |
| template<class T_, size_t N_> | |
| void | SideAssembly (const Element &e, const LocalMatrix< T_, N_, N_ > &ae, SpMatrix< T_ > &a) |
| Side assembly of local matrix into global matrix (as instance of class SpMatrix). | |
Function Documentation
| Axpy | ( | T_ | a, | |
| const LocalVect< T_, N_ > & | x, | |||
| LocalVect< T_, N_ > & | y | |||
| ) |
Add a*x to vector y.
| void Copy | ( | const LocalVect< T_, N_ > & | x, | |
| LocalVect< T_, N_ > & | y | |||
| ) |
Copy vector x into vector y.
| T_ Dot | ( | const Vect< T_ > & | x, | |
| const Vect< T_ > & | y | |||
| ) |
Calculate dot product of two vectors.
- Return values:
-
Dot (inner or scalar) product Calculate dot (scalar) product of two vectors
Referenced by OFELI::BiCG(), OFELI::BiCGStab(), OFELI::CG(), OFELI::CGS(), OFELI::GMRes(), OFELI::Nrm2(), and OFELI::QMR().
| double Dot | ( | const LocalVect< T_, N_ > & | a, | |
| const LocalVect< T_, N_ > & | b | |||
| ) |
| Vect< T_ > operator* | ( | T_ | a, | |
| const Vect< T_ > & | x | |||
| ) |
Operator * (Multiplication of vector by constant).
- Return values:
-
a*x
| TrMatrix< T_ > operator* | ( | T_ | a, | |
| const TrMatrix< T_ > & | A | |||
| ) |
Operator * (Premultiplication of matrix by constant).
- Return values:
-
a*A
References Matrix::getLength().
| LocalVect< T_, N_ > operator* | ( | T_ | a, | |
| const LocalVect< T_, N_ > & | x | |||
| ) |
Operator * (Premultiplication of vector by constant).
- Return values:
-
a*x
| LocalMatrix< T_, NR_, NC_ > operator* | ( | T_ | a, | |
| const LocalMatrix< T_, NR_, NC_ > & | x | |||
| ) |
Operator * (Multiply matrix x by scalar a).
- Return values:
-
a*x
| Vect< T_ > operator+ | ( | const Vect< T_ > & | x, | |
| const Vect< T_ > & | y | |||
| ) |
| LocalVect< T_, N_ > operator+ | ( | const LocalVect< T_, N_ > & | x, | |
| const LocalVect< T_, N_ > & | y | |||
| ) |
Operator + (Add two vectors).
- Return values:
-
x+y
| LocalMatrix< T_, NR_, NC_ > operator+ | ( | const LocalMatrix< T_, NR_, NC_ > & | x, | |
| const LocalMatrix< T_, NR_, NC_ > & | y | |||
| ) |
Operator + (Add matrix x to y).
- Return values:
-
x+y
| Vect< T_ > operator- | ( | const Vect< T_ > & | x, | |
| const Vect< T_ > & | y | |||
| ) |
| LocalVect< T_, N_ > operator- | ( | const LocalVect< T_, N_ > & | x, | |
| const LocalVect< T_, N_ > & | y | |||
| ) |
Operator - (Subtract two vectors).
- Return values:
-
x-y
| LocalMatrix< T_, NR_, NC_ > operator- | ( | const LocalMatrix< T_, NR_, NC_ > & | x, | |
| const LocalMatrix< T_, NR_, NC_ > & | y | |||
| ) |
Operator - (Subtract matrix y from x).
- Return values:
-
x-y
| LocalVect< T_, N_ > operator/ | ( | T_ | a, | |
| const LocalVect< T_, N_ > & | x | |||
| ) |
Operator / (Division of vector by constant).
- Return values:
-
x/a
| LocalMatrix< T_, NR_, NC_ > operator/ | ( | T_ | a, | |
| const LocalMatrix< T_, NR_, NC_ > & | x | |||
| ) |
Operator / (Divide matrix x by scalar a).
- Return values:
-
x/a
| ostream & operator<< | ( | ostream & | s, | |
| const SideVect< T_ > & | v | |||
| ) |
| void Scale | ( | T_ | a, | |
| LocalVect< T_, N_ > & | x | |||
| ) |
Multiply vector x by constant a and store result in x.
| void Scale | ( | T_ | a, | |
| const LocalVect< T_, N_ > & | x, | |||
| LocalVect< T_, N_ > & | y | |||
| ) |
Multiply vector x by constant a and store result in y.
| void SideAssembly | ( | const Element & | e, | |
| const LocalMatrix< T_, N_, N_ > & | ae, | |||
| SpMatrix< T_ > & | a | |||
| ) |
Side assembly of local matrix into global matrix (as instance of class SpMatrix).
- Parameters:
-
[in] e Reference to local Element [in] ae Local matrix [in,out] a Global matrix
References SpMatrix::Add(), Side::getDOF(), Side::getNbDOF(), Element::getNbSides(), and Element::getPtrSide().