Opm::DynamicState< T > Class Template Reference

#include <DynamicState.hpp>

Inheritance diagram for Opm::DynamicState< T >:
Inheritance graph

Public Types

typedef std::vector< T >::iterator iterator
 

Public Member Functions

 DynamicState ()=default
 
 DynamicState (const TimeMap &timeMap, T initial)
 
 DynamicState (const std::vector< T > &data, size_t init_range)
 
void globalReset (T value)
 
const T & back () const
 
const T & at (size_t index) const
 
const T & operator[] (size_t index) const
 
const T & get (size_t index) const
 
void updateInitial (T initial)
 
std::vector< std::pair< std::size_t, T > > unique () const
 
bool is_new_data (size_t index) const
 
bool update (size_t index, T value)
 
void update_elm (size_t index, const T &value)
 
void update_equal (size_t index, const T &value)
 
int find (const T &value) const
 
template<typename P >
int find_if (P &&pred) const
 
int find_not (const T &value) const
 
iterator begin ()
 
iterator end ()
 
std::size_t size () const
 
const std::vector< T > & data () const
 
size_t initialRange () const
 
bool operator== (const DynamicState< T > &data) const
 
template<class Serializer , bool complexType = true>
void serializeOp (Serializer &serializer)
 

Friends

class Schedule
 

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!=

Member Typedef Documentation

◆ iterator

template<class T >
typedef std::vector<T>::iterator Opm::DynamicState< T >::iterator

Constructor & Destructor Documentation

◆ DynamicState() [1/3]

template<class T >
Opm::DynamicState< T >::DynamicState ( )
default

◆ DynamicState() [2/3]

template<class T >
Opm::DynamicState< T >::DynamicState ( const TimeMap timeMap,
initial 
)
inline

◆ DynamicState() [3/3]

template<class T >
Opm::DynamicState< T >::DynamicState ( const std::vector< T > &  data,
size_t  init_range 
)
inline

Member Function Documentation

◆ at()

template<class T >
const T & Opm::DynamicState< T >::at ( size_t  index) const
inline

◆ back()

template<class T >
const T & Opm::DynamicState< T >::back ( ) const
inline

◆ begin()

template<class T >
iterator Opm::DynamicState< T >::begin ( )
inline

◆ data()

template<class T >
const std::vector< T > & Opm::DynamicState< T >::data ( ) const
inline

◆ end()

template<class T >
iterator Opm::DynamicState< T >::end ( )
inline

◆ find()

template<class T >
int Opm::DynamicState< T >::find ( const T &  value) const
inline

Will return the index of the first occurence of @value, or -1 if @value is not found.

References exprtk::details::value().

◆ find_if()

template<class T >
template<typename P >
int Opm::DynamicState< T >::find_if ( P &&  pred) const
inline

◆ find_not()

template<class T >
int Opm::DynamicState< T >::find_not ( const T &  value) const
inline

Will return the index of the first value which is != @value, or -1 if all values are == @value

References exprtk::details::value().

◆ get()

template<class T >
const T & Opm::DynamicState< T >::get ( size_t  index) const
inline

◆ globalReset()

template<class T >
void Opm::DynamicState< T >::globalReset ( value)
inline

◆ initialRange()

template<class T >
size_t Opm::DynamicState< T >::initialRange ( ) const
inline

◆ is_new_data()

template<class T >
bool Opm::DynamicState< T >::is_new_data ( size_t  index) const
inline

◆ operator==()

template<class T >
bool Opm::DynamicState< T >::operator== ( const DynamicState< T > &  data) const
inline

◆ operator[]()

template<class T >
const T & Opm::DynamicState< T >::operator[] ( size_t  index) const
inline

◆ serializeOp()

template<class T >
template<class Serializer , bool complexType = true>
void Opm::DynamicState< T >::serializeOp ( Serializer serializer)
inline

◆ size()

template<class T >
std::size_t Opm::DynamicState< T >::size ( ) const
inline

◆ unique()

template<class T >
std::vector< std::pair< std::size_t, T > > Opm::DynamicState< T >::unique ( ) const
inline

◆ update()

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.

References index, and exprtk::details::value().

◆ update_elm()

template<class T >
void Opm::DynamicState< T >::update_elm ( size_t  index,
const T &  value 
)
inline

References index, and exprtk::details::value().

◆ update_equal()

template<class T >
void Opm::DynamicState< T >::update_equal ( size_t  index,
const T &  value 
)
inline

References index, and exprtk::details::value().

◆ updateInitial()

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

Friends And Related Function Documentation

◆ Schedule

template<class T >
friend class Schedule
friend

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