DOpE
|
#include <statevector.h>
Public Member Functions | |
StateVector (const StateVector< VECTOR > &ref) | |
StateVector (const SpaceTimeHandlerBase< VECTOR > *STH, DOpEtypes::VectorStorageType behavior, ParameterReader ¶m_reader) | |
~StateVector () | |
void | SetTimeDoFNumber (unsigned int dof_number, const TimeIterator &interval) const |
void | SetTime (double t, const TimeIterator &interval) const |
void | SetTimeDoFNumber (unsigned int time_point) const |
VECTOR & | GetSpacialVector () |
const VECTOR & | GetSpacialVector () const |
const dealii::Vector< double > & | GetSpacialVectorCopy () const |
void | operator= (double value) |
void | operator= (const StateVector< VECTOR > &dq) |
void | operator+= (const StateVector< VECTOR > &dq) |
void | operator*= (double a) |
double | operator* (const StateVector< VECTOR > &dq) const |
void | add (double s, const StateVector< VECTOR > &dq) |
void | equ (double s, const StateVector< VECTOR > &dq) |
void | PrintInfos (std::stringstream &out) |
void | UnLockCopy () const |
DOpEtypes::VectorStorageType | GetBehavior () const |
const SpaceTimeHandlerBase < VECTOR > * | GetSpaceTimeHandler () const |
void | ReInit () |
This class represents the Statevector.
<VECTOR> | Class in which we want to store the spatial vector (i.e. dealii::Vector<double> or dealii::BlockVector<double>) |
DOpE::StateVector< VECTOR >::StateVector | ( | const StateVector< VECTOR > & | ref | ) |
DOpE::StateVector< VECTOR >::StateVector | ( | const SpaceTimeHandlerBase< VECTOR > * | STH, |
DOpEtypes::VectorStorageType | behavior, | ||
ParameterReader & | param_reader | ||
) |
DOpE::StateVector< VECTOR >::~StateVector | ( | ) |
void DOpE::StateVector< VECTOR >::add | ( | double | s, |
const StateVector< VECTOR > & | dq | ||
) |
Sets this vector adds a multiple of an other vector to this vector. this = this + s * dq It expects both vectors to be of the same structure. This function calls SetTime(0).
s | A double, by which the other vector is scaled. |
dq | The other vector. |
void DOpE::StateVector< VECTOR >::equ | ( | double | s, |
const StateVector< VECTOR > & | dq | ||
) |
Sets this vector to the values of an other given vector. The vector is not resized! It expects both vectors to be of the same structure. This function calls SetTime(0).
dq | The other vector. |
|
inline |
This returns the behavior of the StateVector Currently implemented are the following possibilities
|
inline |
VECTOR & DOpE::StateVector< VECTOR >::GetSpacialVector | ( | ) |
Returns a reference to the spatial vector associated to the last time given by SetTime*
const VECTOR & DOpE::StateVector< VECTOR >::GetSpacialVector | ( | ) | const |
Returns a const reference to the spatial vector associated to the last time given by SetTime* or SetTimeDoFNumber
const Vector< double > & DOpE::StateVector< VECTOR >::GetSpacialVectorCopy | ( | ) | const |
Returns a const reference to the spatial vector associated to the last time given by SetTime* This makes a copy of the real vector in order to change the vector type. To assert data integrity this Only one Copy may be obtained at any time. Hence prior to calling this Function again UnLockCopy must be called.
double DOpE::StateVector< VECTOR >::operator* | ( | const StateVector< VECTOR > & | dq | ) | const |
Computes the Euclidean scalar product of this vector with the argument. Both Vectors must have the same structure.
dq | The argument for the computation of the scalarproduct. |
void DOpE::StateVector< VECTOR >::operator*= | ( | double | a | ) |
Multiplies the Vector with a constant. It expects both vectors to be of the same structure. This function calls SetTime(0).
a | A double to be multiplied with the vector. |
void DOpE::StateVector< VECTOR >::operator+= | ( | const StateVector< VECTOR > & | dq | ) |
Upon completion each entry of this Vector contains the following Result this = this + dq; It is required that both this and dq have the same structure! This function calls SetTime(0).
dq | The increment. |
void DOpE::StateVector< VECTOR >::operator= | ( | double | value | ) |
Sets all the vector to a constant value. This function calls SetTime(0).
value | The constant value to be assigned to the vector. |
void DOpE::StateVector< VECTOR >::operator= | ( | const StateVector< VECTOR > & | dq | ) |
Sets this vector to the values of an other given vector. If required this vector is resized. This function calls SetTime(0).
dq | The other vector. |
void DOpE::StateVector< VECTOR >::PrintInfos | ( | std::stringstream & | out | ) |
Prints Information on this vector into the given stream.
out | The output stream. |
void DOpE::StateVector< VECTOR >::ReInit | ( | ) |
Call if the SpaceTimeHandler has changed to reinitialize vector sizes.
void DOpE::StateVector< VECTOR >::SetTime | ( | double | t, |
const TimeIterator & | interval | ||
) | const |
Sets the time in the vector for interpolation. This Function or SetTimeDoFNumber or SetTimeDoFNumber must be called before calling GetSpacialVector in order to load the required data.
t | A double containing the time we are interested in. |
interval | An TimeIterator. The interval containing t. |
void DOpE::StateVector< VECTOR >::SetTimeDoFNumber | ( | unsigned int | dof_number, |
const TimeIterator & | interval | ||
) | const |
Sets the time in the vector. This Function or SetTimeDoFNumber or SetTime must be called before calling GetSpacialVector in order to load the required data.
dof_number | An unsigned int containing the global time DoF number of the given interval we are interested in. |
interval | A TimeIterator. The interval we are currently looking on. |
void DOpE::StateVector< VECTOR >::SetTimeDoFNumber | ( | unsigned int | time_point | ) | const |
Sets the time in the vector. This Function or SetTime or SetTimeDoFNumber must be called before calling GetSpacialVector in order to load the required data.
time_point | An unsigned integer. This gives the number of the point in the time mesh. |
|
inline |
This unlocks the function GetSpacialVectorCopy