Templated vector space. More...
#include <OpenFOAM/VectorSpace.H>
Templated vector space.
Template arguments are the Form the vector space will be used to create, the type of the elements and the number of elements.
Definition at line 75 of file VectorSpace.H.
Public Types | |
enum | { dim = 3, nComponents = nCmpt } |
typedef Cmpt | cmptType |
Component type.
| |
Public Member Functions | |
VectorSpace () | |
Construct null.
| |
VectorSpace (Istream &) | |
Construct from Istream.
| |
VectorSpace (const VectorSpace< Form, Cmpt, nCmpt > &) | |
Construct as copy.
| |
label | size () const |
Return the number of elements in the VectorSpace = nCmpt.
| |
const Cmpt & | component (const direction) const |
Cmpt & | component (const direction) |
void | component (Cmpt &, const direction) const |
void | replace (const direction, const Cmpt &) |
const Cmpt & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator+= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator-= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
Public Attributes | |
Cmpt | v_ [nCmpt] |
The components of this vector space.
| |
Friends | |
Istream & | operator>> (Istream &, VectorSpace< Form, Cmpt, nCmpt > &) |
Ostream & | operator (Ostream &, const VectorSpace< Form, Cmpt, nCmpt > &) |
typedef Cmpt cmptType |
Component type.
Definition at line 81 of file VectorSpace.H.
anonymous enum |
Definition at line 86 of file VectorSpace.H.
VectorSpace | ( | ) | [inline]
|
Construct null.
Definition at line 39 of file VectorSpaceI.H.
VectorSpace | ( | Istream & | is ) |
Construct from Istream.
Definition at line 36 of file VectorSpace.C.
References IOstream::check(), Istream::readBegin(), and Istream::readEnd().
VectorSpace | ( | const VectorSpace< Form, Cmpt, nCmpt > & | vs ) | [inline]
|
Construct as copy.
Definition at line 45 of file VectorSpaceI.H.
label size | ( | ) | const [inline]
|
Return the number of elements in the VectorSpace = nCmpt.
Definition at line 56 of file VectorSpaceI.H.
const Cmpt & component | ( | const direction | d ) | const [inline]
|
Definition at line 64 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
Referenced by Foam::component(), EulerCoordinateRotation::EulerCoordinateRotation(), cellMDLimitedGrad< Type >::limitFace(), Random::position(), Foam::setComponent(), STARCDCoordinateRotation::STARCDCoordinateRotation(), Random::symmTensor01(), Random::tensor01(), and Random::vector01().
Cmpt & component | ( | const direction | d ) | [inline]
|
Definition at line 85 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
void component | ( | Cmpt & | c, |
const direction | d | ||
) | const [inline]
|
Definition at line 104 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
void replace | ( | const direction | d, |
const Cmpt & | c | ||
) | [inline]
|
Definition at line 126 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
const Cmpt & operator[] | ( | const direction | d ) | const [inline]
|
Definition at line 151 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
Cmpt & operator[] | ( | const direction | d ) | [inline]
|
Definition at line 172 of file VectorSpaceI.H.
References Foam::abort(), d, Foam::FatalError, and FatalErrorIn.
void operator= | ( | const VectorSpace< Form, Cmpt, nCmpt > & | vs ) | [inline]
|
Definition at line 191 of file VectorSpaceI.H.
void operator+= | ( | const VectorSpace< Form, Cmpt, nCmpt > & | vs ) | [inline]
|
Definition at line 201 of file VectorSpaceI.H.
void operator-= | ( | const VectorSpace< Form, Cmpt, nCmpt > & | vs ) | [inline]
|
Definition at line 211 of file VectorSpaceI.H.
void operator*= | ( | const scalar | s ) | [inline]
|
Definition at line 221 of file VectorSpaceI.H.
void operator/= | ( | const scalar | s ) | [inline]
|
Definition at line 231 of file VectorSpaceI.H.
Istream& operator>> | ( | Istream & | , |
VectorSpace< Form, Cmpt, nCmpt > & | |||
) | [friend]
|
Ostream& operator | ( | Ostream & | , |
const VectorSpace< Form, Cmpt, nCmpt > & | |||
) | [friend]
|
Cmpt v_[nCmpt] |
The components of this vector space.
Definition at line 96 of file VectorSpace.H.
Referenced by Foam::cmptMax(), Foam::cmptMin(), Foam::cmptSum(), Foam::magSqr(), Foam::name(), Foam::operator&&(), Foam::operator<(), Foam::operator<<(), Foam::operator==(), Foam::operator>(), and Foam::operator>>().