Opm::DynamicState< T > Class Template Reference

#include <DynamicState.hpp>

Public Member Functions

 DynamicState (const TimeMapConstPtr timeMap, T initialValue)
 
void globalReset (T newValue)
 
const T & at (size_t index) const
 
const T & operator[] (size_t index) const
 
get (size_t index) const
 
void updateInitial (T initialValue)
 
size_t size () const
 
bool update (size_t index, T value)
 

Detailed Description

template<class T>
class Opm::DynamicState< T >

The DynamicState<T> class is designed to hold information about properties with the following semantics:

  1. The property can be updated repeatedly at different timesteps; observe that the class does not support operator[] - only updates with weakly increasing timesteps are supported.
  2. At any point in the time the previous last set value applies.

The class is very much tailored to support the Schedule file of Eclipse where a control applied at time T will apply indefinitely, or until explicitly set to a different value.

The update() method returns true if the updated value is different from the current value, this implies that the class<T> must support operator!=

Constructor & Destructor Documentation

template<class T >
Opm::DynamicState< T >::DynamicState ( const TimeMapConstPtr  timeMap,
initialValue 
)
inline

Member Function Documentation

template<class T >
const T& Opm::DynamicState< T >::at ( size_t  index) const
inline
template<class T >
T Opm::DynamicState< T >::get ( size_t  index) const
inline
template<class T >
void Opm::DynamicState< T >::globalReset ( newValue)
inline
template<class T >
const T& Opm::DynamicState< T >::operator[] ( size_t  index) const
inline
template<class T >
size_t Opm::DynamicState< T >::size ( ) const
inline
template<class T >
bool Opm::DynamicState< T >::update ( size_t  index,
value 
)
inline

If the current value has been changed the method will return true, otherwise it will return false.

template<class T >
void Opm::DynamicState< T >::updateInitial ( initialValue)
inline

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