|
SU2
|
Class for holding and manipulating vectors needed by linear solvers. More...
#include <vector_structure.hpp>
Public Member Functions | |
| CSysVector (void) | |
| default constructor of the class. | |
| CSysVector (const unsigned long &size, const su2double &val=0.0) | |
| constructor of the class. More... | |
| CSysVector (const unsigned long &numBlk, const unsigned long &numBlkDomain, const unsigned short &numVar, const su2double &val=0.0) | |
| constructor of the class. More... | |
| CSysVector (const CSysVector &u) | |
| copy constructor of the class. More... | |
| void | SetValZero (void) |
| Sets to zero all the entries of the vector. | |
| CSysVector (const unsigned long &size, const su2double *u_array) | |
| constructor from array More... | |
| CSysVector (const unsigned long &numBlk, const unsigned long &numBlkDomain, const unsigned short &numVar, const su2double *u_array) | |
| constructor from array More... | |
| virtual | ~CSysVector () |
| class destructor | |
| void | Initialize (const unsigned long &numBlk, const unsigned long &numBlkDomain, const unsigned short &numVar, const su2double &val=0.0) |
| Initialize the class. More... | |
| unsigned long | GetLocSize () const |
| return the number of local elements in the CSysVector | |
| unsigned long | GetSize () const |
| return the size of the CSysVector (over all processors) | |
| unsigned short | GetNVar () const |
| return the number of variables at each block (typically number per node) | |
| unsigned long | GetNBlk () const |
| return the number of blocks (typically number of nodes locally) | |
| unsigned long | GetNBlkDomain () const |
| return the number of blocks (typically number of nodes locally) | |
| void | Equals_AX (const su2double &a, CSysVector &x) |
| set calling CSysVector to scaling of another CSysVector More... | |
| void | Plus_AX (const su2double &a, CSysVector &x) |
| adds a scaled CSysVector to calling CSysVector More... | |
| void | Equals_AX_Plus_BY (const su2double &a, CSysVector &x, const su2double &b, CSysVector &y) |
| general linear combination of two CSysVectors More... | |
| CSysVector & | operator= (const CSysVector &u) |
| assignment operator with deep copy More... | |
| CSysVector & | operator= (const su2double &val) |
| CSysVector=su2double assignment operator. More... | |
| CSysVector | operator+ (const CSysVector &u) const |
| addition operator More... | |
| CSysVector & | operator+= (const CSysVector &u) |
| compound addition-assignment operator More... | |
| CSysVector | operator- (const CSysVector &u) const |
| subtraction operator More... | |
| CSysVector & | operator-= (const CSysVector &u) |
| compound subtraction-assignment operator More... | |
| CSysVector | operator* (const su2double &val) const |
| vector * scalar multiplication operator More... | |
| CSysVector & | operator*= (const su2double &val) |
| compound scalar multiplication-assignment operator More... | |
| CSysVector | operator/ (const su2double &val) const |
| vector-scalar division operator (no scalar/vector operator) More... | |
| CSysVector & | operator/= (const su2double &val) |
| compound scalar division-assignment operator More... | |
| su2double & | operator[] (const unsigned long &i) |
| indexing operator with assignment permitted More... | |
| const su2double & | operator[] (const unsigned long &i) const |
| indexing operator with assignment not permitted More... | |
| su2double | norm () const |
| the L2 norm of the CSysVector More... | |
| void | CopyToArray (su2double *u_array) |
| copies the contents of the calling CSysVector into an array More... | |
| void | SubtractBlock (unsigned long val_ipoint, su2double *val_residual) |
| Subtract val_residual to the residual. More... | |
| void | AddBlock (unsigned long val_ipoint, su2double *val_residual) |
| Add val_residual to the residual. More... | |
| void | SetBlock (unsigned long val_ipoint, unsigned short val_var, su2double val_residual) |
| Set val_residual to the residual. More... | |
| void | SetBlock (unsigned long val_ipoint, su2double *val_residual) |
| Set val_residual to the residual. More... | |
| void | SetBlock_Zero (unsigned long val_ipoint) |
| Set the residual to zero. More... | |
| void | SetBlock_Zero (unsigned long val_ipoint, unsigned short val_var) |
| Set the velocity residual to zero. More... | |
| su2double * | GetBlock (unsigned long val_ipoint) |
| Get the value of the residual. More... | |
| su2double | GetBlock (unsigned long val_ipoint, unsigned short val_var) |
| Get the value of the residual. More... | |
Friends | |
| CSysVector | operator* (const su2double &val, const CSysVector &u) |
| scalar * vector multiplication operator More... | |
| su2double | dotProd (const CSysVector &u, const CSysVector &v) |
| dot-product between two CSysVectors More... | |
Class for holding and manipulating vectors needed by linear solvers.
We could use the STL vector as a base class here, but this gives us more flexibility with the underlying data (e.g. we may decide to use a block storage scheme rather than a continuous storage scheme).
| CSysVector::CSysVector | ( | const unsigned long & | size, |
| const su2double & | val = 0.0 |
||
| ) |
constructor of the class.
| [in] | size | - number of elements locally |
| [in] | val | - default value for elements |
| CSysVector::CSysVector | ( | const unsigned long & | numBlk, |
| const unsigned long & | numBlkDomain, | ||
| const unsigned short & | numVar, | ||
| const su2double & | val = 0.0 |
||
| ) |
constructor of the class.
| [in] | numBlk | - number of blocks locally |
| [in] | numBlkDomain | |
| [in] | numVar | - number of variables in each block |
| [in] | val | - default value for elements |
| CSysVector::CSysVector | ( | const CSysVector & | u | ) |
copy constructor of the class.
| [in] | u | - CSysVector that is being copied |
|
explicit |
constructor from array
| [in] | size | - number of elements locally |
| [in] | u_array | - vector stored as array being copied |
|
explicit |
constructor from array
| [in] | numBlk | - number of blocks locally |
| [in] | numBlkDomain | - number of blocks locally (without g cells) |
| [in] | numVar | - number of variables in each block |
| [in] | u_array | - vector stored as array being copied |
| void CSysVector::AddBlock | ( | unsigned long | val_ipoint, |
| su2double * | val_residual | ||
| ) |
Add val_residual to the residual.
| [in] | val_ipoint | - index of the point where add the residual. |
| [in] | val_residual | - Value to add to the residual. |
| void CSysVector::CopyToArray | ( | su2double * | u_array | ) |
copies the contents of the calling CSysVector into an array
| [out] | u_array | - array into which information is being copied |
| void CSysVector::Equals_AX | ( | const su2double & | a, |
| CSysVector & | x | ||
| ) |
set calling CSysVector to scaling of another CSysVector
| [in] | a | - scalar factor for x |
| [in] | x | - CSysVector that is being scaled |
| void CSysVector::Equals_AX_Plus_BY | ( | const su2double & | a, |
| CSysVector & | x, | ||
| const su2double & | b, | ||
| CSysVector & | y | ||
| ) |
general linear combination of two CSysVectors
| [in] | a | - scalar factor for x |
| [in] | x | - first CSysVector in linear combination |
| [in] | b | - scalar factor for y |
| [in] | y | - second CSysVector in linear combination |
| su2double * CSysVector::GetBlock | ( | unsigned long | val_ipoint | ) |
Get the value of the residual.
| [in] | val_ipoint | - index of the point where set the residual. |
| su2double CSysVector::GetBlock | ( | unsigned long | val_ipoint, |
| unsigned short | val_var | ||
| ) |
Get the value of the residual.
| [in] | val_ipoint | - index of the point where set the residual. |
| [in] | val_var | - inde of the residual to be set. |
| void CSysVector::Initialize | ( | const unsigned long & | numBlk, |
| const unsigned long & | numBlkDomain, | ||
| const unsigned short & | numVar, | ||
| const su2double & | val = 0.0 |
||
| ) |
Initialize the class.
| [in] | numBlk | - number of blocks locally |
| [in] | numBlkDomain | |
| [in] | numVar | - number of variables in each block |
| [in] | val | - default value for elements |
| su2double CSysVector::norm | ( | ) | const |
the L2 norm of the CSysVector
| CSysVector CSysVector::operator* | ( | const su2double & | val | ) | const |
vector * scalar multiplication operator
| [in] | val | - value to multiply *this by |
| CSysVector & CSysVector::operator*= | ( | const su2double & | val | ) |
compound scalar multiplication-assignment operator
| [in] | val | - value to multiply calling object by |
| CSysVector CSysVector::operator+ | ( | const CSysVector & | u | ) | const |
addition operator
| [in] | u | - CSysVector being added to *this |
| CSysVector & CSysVector::operator+= | ( | const CSysVector & | u | ) |
compound addition-assignment operator
| [in] | u | - CSysVector being added to calling object |
| CSysVector CSysVector::operator- | ( | const CSysVector & | u | ) | const |
subtraction operator
| [in] | u | - CSysVector being subtracted from *this |
| CSysVector & CSysVector::operator-= | ( | const CSysVector & | u | ) |
compound subtraction-assignment operator
| [in] | u | - CSysVector being subtracted from calling object |
| CSysVector CSysVector::operator/ | ( | const su2double & | val | ) | const |
vector-scalar division operator (no scalar/vector operator)
| [in] | val | - value to divide elements of *this by |
| CSysVector & CSysVector::operator/= | ( | const su2double & | val | ) |
compound scalar division-assignment operator
| [in] | val | - value to divide elements of calling object by |
| CSysVector & CSysVector::operator= | ( | const CSysVector & | u | ) |
assignment operator with deep copy
| [in] | u | - CSysVector whose values are being assigned |
| CSysVector & CSysVector::operator= | ( | const su2double & | val | ) |
CSysVector=su2double assignment operator.
| [in] | val | - value assigned to each element of CSysVector |
|
inline |
indexing operator with assignment permitted
| [in] | i | = local index to access |
|
inline |
indexing operator with assignment not permitted
| [in] | i | = local index to access |
| void CSysVector::Plus_AX | ( | const su2double & | a, |
| CSysVector & | x | ||
| ) |
adds a scaled CSysVector to calling CSysVector
| [in] | a | - scalar factor for x |
| [in] | x | - CSysVector that is being scaled |
| void CSysVector::SetBlock | ( | unsigned long | val_ipoint, |
| unsigned short | val_var, | ||
| su2double | val_residual | ||
| ) |
Set val_residual to the residual.
| [in] | val_ipoint | - index of the point where set the residual. |
| [in] | val_var | - inde of the residual to be set. |
| [in] | val_residual | - Value to set to the residual. |
| void CSysVector::SetBlock | ( | unsigned long | val_ipoint, |
| su2double * | val_residual | ||
| ) |
Set val_residual to the residual.
| [in] | val_ipoint | - index of the point where set the residual. |
| [in] | val_residual | - Value to set to the residual. |
| void CSysVector::SetBlock_Zero | ( | unsigned long | val_ipoint | ) |
Set the residual to zero.
| [in] | val_ipoint | - index of the point where set the residual. |
| void CSysVector::SetBlock_Zero | ( | unsigned long | val_ipoint, |
| unsigned short | val_var | ||
| ) |
Set the velocity residual to zero.
| [in] | val_ipoint | - index of the point where set the residual. |
| [in] | val_var | - inde of the residual to be set. |
| void CSysVector::SubtractBlock | ( | unsigned long | val_ipoint, |
| su2double * | val_residual | ||
| ) |
Subtract val_residual to the residual.
| [in] | val_ipoint | - index of the point where subtract the residual. |
| [in] | val_residual | - Value to subtract to the residual. |
|
friend |
dot-product between two CSysVectors
| [in] | u | - first CSysVector in dot product |
| [in] | v | - second CSysVector in dot product |
|
friend |
scalar * vector multiplication operator
| [in] | val | - scalar value to multiply by |
| [in] | u | - CSysVector having its elements scaled |
1.8.12