DOpE
Data Structures | Public Member Functions
DOpE::StateVector< VECTOR > Class Template Reference

#include <statevector.h>

Public Member Functions

 StateVector (const StateVector< VECTOR > &ref)
 
 StateVector (const SpaceTimeHandlerBase< VECTOR > *STH, DOpEtypes::VectorStorageType behavior, ParameterReader &param_reader)
 
 ~StateVector ()
 
void SetTimeDoFNumber (unsigned int dof_number, const TimeIterator &interval) const
 
void SetTimeDoFNumber (unsigned int time_point) const
 
VECTOR & GetSpacialVector ()
 
const VECTOR & GetSpacialVector () const
 
VECTOR & GetNextSpacialVector ()
 
const VECTOR & GetNextSpacialVector () const
 
VECTOR & GetPreviousSpacialVector ()
 
const VECTOR & GetPreviousSpacialVector () 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 ()
 

Detailed Description

template<typename VECTOR>
class DOpE::StateVector< VECTOR >

This class represents the Statevector.

Template Parameters
<VECTOR>Class in which we want to store the spatial vector (i.e. dealii::Vector<double> or dealii::BlockVector<double>)

Constructor & Destructor Documentation

template<typename VECTOR >
DOpE::StateVector< VECTOR >::StateVector ( const StateVector< VECTOR > &  ref)
template<typename VECTOR >
DOpE::StateVector< VECTOR >::StateVector ( const SpaceTimeHandlerBase< VECTOR > *  STH,
DOpEtypes::VectorStorageType  behavior,
ParameterReader param_reader 
)
template<typename VECTOR >
DOpE::StateVector< VECTOR >::~StateVector ( )

Member Function Documentation

template<typename VECTOR >
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).

Parameters
sA double, by which the other vector is scaled.
dqThe other vector.
template<typename 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).

Parameters
dqThe other vector.
template<typename VECTOR>
DOpEtypes::VectorStorageType DOpE::StateVector< VECTOR >::GetBehavior ( ) const
inline

This returns the behavior of the StateVector Currently implemented are the following possibilities

fullmem Means there is a spatial vector for each time point. The whole vector
is stored in main memory.
store_on_disc Means there are only three spatial vectors (for the actual timepoint
and his two neighbors) stored in the main memory whereas the rest of the statevector is stored on the hard disc.
Returns
A string indicating the behavior.
template<typename VECTOR >
VECTOR & DOpE::StateVector< VECTOR >::GetNextSpacialVector ( )

Analog to GetSpacialVector, but the next timepoint in natural time direction

template<typename VECTOR >
const VECTOR & DOpE::StateVector< VECTOR >::GetNextSpacialVector ( ) const

Analog to GetSpacialVector, but the next timepoint in natural time direction

template<typename VECTOR >
VECTOR & DOpE::StateVector< VECTOR >::GetPreviousSpacialVector ( )

Analog to GetSpacialVector, but the previous timepoint in natural time direction

template<typename VECTOR >
const VECTOR & DOpE::StateVector< VECTOR >::GetPreviousSpacialVector ( ) const

Analog to GetSpacialVector, but the previous timepoint in natural time direction

template<typename VECTOR>
const SpaceTimeHandlerBase<VECTOR>* DOpE::StateVector< VECTOR >::GetSpaceTimeHandler ( ) const
inline
Returns
A const pointer to the SpaceTimeHandler associated with this vector.
template<typename VECTOR >
VECTOR & DOpE::StateVector< VECTOR >::GetSpacialVector ( )

Returns a reference to the spatial vector associated to the last time given by SetTime*

template<typename VECTOR >
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

template<typename VECTOR >
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.

template<typename VECTOR >
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.

Parameters
dqThe argument for the computation of the scalarproduct.
Returns
A double containing the scalar product.
template<typename VECTOR >
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).

Parameters
aA double to be multiplied with the vector.
template<typename 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).

Parameters
dqThe increment.
template<typename VECTOR >
void DOpE::StateVector< VECTOR >::operator= ( double  value)

Sets all the vector to a constant value. This function calls SetTime(0).

Parameters
valueThe constant value to be assigned to the vector.
template<typename 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).

Parameters
dqThe other vector.
template<typename VECTOR >
void DOpE::StateVector< VECTOR >::PrintInfos ( std::stringstream &  out)

Prints Information on this vector into the given stream.

Parameters
outThe output stream.
template<typename VECTOR >
void DOpE::StateVector< VECTOR >::ReInit ( )

Call if the SpaceTimeHandler has changed to reinitialize vector sizes.

template<typename VECTOR >
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.

Parameters
dof_numberAn unsigned int containing the global time DoF number of the given interval we are interested in.
intervalA TimeIterator. The interval we are currently looking on.
template<typename VECTOR >
void DOpE::StateVector< VECTOR >::SetTimeDoFNumber ( unsigned int  time_point) 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.

Parameters
tA double containing the time we are interested in.
intervalAn TimeIterator. The interval containing t. 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_pointAn unsigned integer. This gives the number of the point in the time mesh.
template<typename VECTOR>
void DOpE::StateVector< VECTOR >::UnLockCopy ( ) const
inline

This unlocks the function GetSpacialVectorCopy


The documentation for this class was generated from the following files: