Loading...
Searching...
No Matches
Opm::FieldProps::FieldDataManager< T > Struct Template Reference

Wrapper type for field properties. More...

`#include <FieldProps.hpp>`

## Public Member Functions

| FieldDataManager (const std::string &k, GetStatus s, const Fieldprops::FieldData< T > *d)
| Constructor.
void | verify_status (const KeywordLocation &loc, const std::string &descr, const std::string &operation) const
| Validate result of.
void | verify_status () const
| Validate result of.
const std::vector< T > * | ptr () const
| Access underlying property data elements.
const std::vector< T > & | data () const
| Access underlying property data elements.
const Fieldprops::FieldData< T > & | field_data () const
| Read-only access to contained FieldData object.
bool | valid () const
| Property validity predicate.

## Public Attributes

const std::string & | keyword
| Property name.
GetStatus | status
| Request status.
const Fieldprops::FieldData< T > * | data_ptr
| Property data.

## Detailed Description

template<typename T>
struct Opm::FieldProps::FieldDataManager< T >

Wrapper type for field properties.

Template Parameters

  T | Property element type. Typically `double` or `int`.

## Constructor & Destructor Documentation

## FieldDataManager()

template<typename T >

Opm::FieldProps::FieldDataManager< T >::FieldDataManager | ( | const std::string & | k,
|  | GetStatus | s,
|  | const Fieldprops::FieldData< T > * | d
| ) |  |

inline

Constructor.

Parameters

  [in] | k | Property name
  [in] | s | Request status
  [in] | d | Property data. Pass `nullptr` for missing property data.

## Member Function Documentation

## data()

template<typename T >

const std::vector< T > & Opm::FieldProps::FieldDataManager< T >::data | ( |  | ) | const

inline

Access underlying property data elements.

Throws an exception as outlined in `GetStatus` if property data is not fully defined.

## field_data()

template<typename T >

const Fieldprops::FieldData< T > & Opm::FieldProps::FieldDataManager< T >::field_data | ( |  | ) | const

inline

Read-only access to contained FieldData object.

Throws an exception as outlined in `GetStatus` if property data is not fully defined.

## ptr()

template<typename T >

const std::vector< T > * Opm::FieldProps::FieldDataManager< T >::ptr | ( |  | ) | const

inline

Access underlying property data elements.

Returns `nullptr` if property data is not fully defined.

## valid()

template<typename T >

bool Opm::FieldProps::FieldDataManager< T >::valid | ( |  | ) | const

inline

Property validity predicate.

Returns true if property exists and has fully defined data elements. False otherwise.

## verify_status() [1/2]

template<typename T >

void Opm::FieldProps::FieldDataManager< T >::verify_status | ( |  | ) | const

inline

Validate result of.

try_get<>()

request

Throws an exception as outlined in `GetStatus` if

this->status
Opm::FieldProps::FieldDataManager::status
GetStatus status
Request status.
Definition FieldProps.hpp:383

is not

GetStatus::OK
Opm::FieldProps::GetStatus::OK
@ OK
Property exists and its property data is fully defined.

. Does nothing otherwise.

## verify_status() [2/2]

template<typename T >

void Opm::FieldProps::FieldDataManager< T >::verify_status | ( | const KeywordLocation & | loc,
|  | const std::string & | descr,
|  | const std::string & | operation
| ) |  | const

inline

Validate result of.

try_get<>()

request

Throws an exception of type

OpmInputError
Opm::OpmInputError
Definition OpmInputError.hpp:49

if

this->status

is not

GetStatus::OK

. Does nothing otherwise.

Parameters

  [in] | Input | keyword which prompted request.
  [in] | descr | Textual description of context in which request occurred.
  [in] | operation | Name of operation which prompted request.

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

- opm/input/eclipse/EclipseState/Grid/FieldProps.hpp