#include <GridVec.hpp>
Collaboration diagram for GridVec< T >:

Public Member Functions | |
| int | NOfVectors () const |
| Number of the grid functions in the object. | |
| void | Reset (int n_of_vectors=0) |
| Memory management. | |
| void | Reset (const Array< Array< int > > &sizes) |
| Memory management. | |
| void | SameSize (const GridVec &src) |
| Sets the sizes as for a given system of vectors. | |
| void | Reset (const Array< int > &size) |
| A system of one vector. | |
| MultiVector< T > & | operator[] (int i) |
| Access to the multi-vectors. | |
| GridVec< T > & | operator= (const GridVec< T > &src) |
| The normal assignment. | |
| void | SetZero () |
| Sets all the grid functions to zero. | |
| GridVec< T > & | operator *= (T a) |
| Multiplies 'this' by a scalar. | |
| GridVec< T > & | operator+= (GridVec< T > &y) |
| Adds a given vector to 'this' one. | |
| GridVec< T > & | operator-= (GridVec< T > &y) |
| Subtracts from 'this'. | |
| GridVec< T > & | AddScaled (T a, GridVec< T > &y) |
| Adds a vector y scaled by a factor a. | |
| GridVec< T > & | AddScaled (Array< T > &a, GridVec< T > &y) |
| Adds a vector y scaled by factors a. | |
| GridVec< T > & | LinComb (T a, GridVec< T > &x, T b, GridVec< T > &y) |
Sets 'this' to . | |
| GridVec< T > & | LinComb (Array< T > &a, GridVec< T > &x, Array< T > &b, GridVec< T > &y) |
Sets 'this' to . | |
| GridVec< T > & | LinComb (GridVec< T > &x, T b, GridVec< T > &y) |
Sets 'this' to (i.e. a = 1). | |
| GridVec< T > & | LinComb (GridVec< T > &x, Array< T > &b, GridVec< T > &y) |
Sets 'this' to . | |
| T | operator & (GridVec< T > &y) |
| The Eucleadean scalar product. | |
| double | norm_2 () |
| The Eucleadean norm. | |
| GridVec () | |
| creates a dummy object. | |
| GridVec (Array< Array< int > > &sizes) | |
| Allocates the memory. | |
| GridVec (Array< int > &size) | |
| A system of one vector. | |
| GridVec (GridVec< T > &src) | |
| Duplication. | |
This class is an array of MultiVector<T>-objects that should represent grid functions on different grids. For example, in the staggered-grid approximations, there are grid functions associated with different sides of the grid elements. The ranges of the grid functions are cartesian products of different sizes. These grid functions can be comprised in one GridVec<T> object.
As well as MultiVector<T>, GridVec<T> includes the arithmetic operations that induce the structure of the vector field on the set of all GridVec<T> objects of the same type.
The template depends on a type T. This type should satisfy the conditions listed in small_matrix.hpp for small matrices.
Allocates the memory.
| [in] | sizes | The sizes. |
A system of one vector.
| [in] | size | The sizes of the grid |
| int GridVec< T >::NOfVectors | ( | ) | const [inline] |
Number of the grid functions in the object.
| void GridVec< T >::Reset | ( | int | n_of_vectors = 0 |
) | [inline] |
Memory management.
| [in] | n_of_vectors | Number of MultiVectors in the GridVector. |
Memory management.
| [in] | sizes | The sizes to set. |
Sets the sizes as for a given system of vectors.
| [in] | src | The given system of vectors. |
A system of one vector.
| [in] | size | The sizes to set. |
| MultiVector<T>& GridVec< T >::operator[] | ( | int | i | ) | [inline] |
Access to the multi-vectors.
| [in] | i | The index of the multi-vector (from 0). |
The normal assignment.
| void GridVec< T >::SetZero | ( | ) | [inline] |
Sets all the grid functions to zero.
Multiplies 'this' by a scalar.
| [in] | a | The scalar. |
Adds a given vector to 'this' one.
Subtracts from 'this'.
Adds a vector y scaled by a factor a.
| [in] | a | Factor for scaling. |
| [in] | y | Vector to scale-add. |
| GridVec< T > & GridVec< T >::AddScaled | ( | Array< T > & | a, | |
| GridVec< T > & | y | |||
| ) | [inline] |
Adds a vector y scaled by factors a.
| [in] | a | Factors for scaling. |
| [in] | y | Vector to scale-add. |
| GridVec< T > & GridVec< T >::LinComb | ( | T | a, | |
| GridVec< T > & | x, | |||
| T | b, | |||
| GridVec< T > & | y | |||
| ) | [inline] |
Sets 'this' to
.
| GridVec< T > & GridVec< T >::LinComb | ( | Array< T > & | a, | |
| GridVec< T > & | x, | |||
| Array< T > & | b, | |||
| GridVec< T > & | y | |||
| ) | [inline] |
Sets 'this' to
.
| GridVec< T > & GridVec< T >::LinComb | ( | GridVec< T > & | x, | |
| T | b, | |||
| GridVec< T > & | y | |||
| ) | [inline] |
Sets 'this' to
(i.e. a = 1).
| GridVec< T > & GridVec< T >::LinComb | ( | GridVec< T > & | x, | |
| Array< T > & | b, | |||
| GridVec< T > & | y | |||
| ) | [inline] |
Sets 'this' to
.
The Eucleadean scalar product.
| double GridVec< T >::norm_2 | ( | ) | [inline] |
The Eucleadean norm.
1.5.2