Opm::GridPropertyAccess::ArrayPolicy::ExtractFromDeck< T > Class Template Reference

#include <CompressedPropertyAccess.hpp>

Public Types

typedef T value_type
 
typedef std::size_t size_type
 

Public Member Functions

template<class PropertyContainer >
 ExtractFromDeck (PropertyContainer &ecl, const std::string &kw, const T dflt)
 
value_type operator[] (const size_type i) const
 

Detailed Description

template<typename T>
class Opm::GridPropertyAccess::ArrayPolicy::ExtractFromDeck< T >

Data array policy that extracts the array values from an ECLIPSE input deck or returns a user specified default value if the data vector is not present in a particular input deck.

Provides read-only access to the underlying data.

Template Parameters
TArray element type. Must be int or double.

Member Typedef Documentation

template<typename T >
typedef std::size_t Opm::GridPropertyAccess::ArrayPolicy::ExtractFromDeck< T >::size_type

Index type for accessing data array.

Publicly accessible data array element type.

Constructor & Destructor Documentation

template<typename T >
template<class PropertyContainer >
Opm::GridPropertyAccess::ArrayPolicy::ExtractFromDeck< T >::ExtractFromDeck ( PropertyContainer &  ecl,
const std::string &  kw,
const T  dflt 
)
inline

Constructor.

Template Parameters
PropertyContainerPointer type representing collection of (global) grid properties. Typically EclipseStatePtr or EclipseStateConstPtr. Must implement methods hasIntGridProperty and getIntGridProperty if T is int, or hasDoubleGridProperty and getDoubleGridProperty if T is double.
Parameters
[in]eclProperty container.
[in]kwECLIPSE keyword from which to extract data array.
[in]dlftDefault/fall-back data array value if kw is not defined.

Member Function Documentation

template<typename T >
value_type Opm::GridPropertyAccess::ArrayPolicy::ExtractFromDeck< T >::operator[] ( const size_type  i) const
inline

Read-only data array access.

Parameters
[in]iArray index. Assumed to identify a global (uncompressed) cell.
Returns
Data array element at global index i if present in input or user specified fall-back value if not.

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