opm-common
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
TProperty 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]kProperty name
[in]sRequest status
[in]dProperty 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.

FieldDataManager< T > try_get(const std::string &keyword, const unsigned int flags=0u)
Request read-only property array from internal cache.
Definition FieldProps.hpp:571

request

Throws an exception as outlined in GetStatus if

this->status
GetStatus status
Request status.
Definition FieldProps.hpp:386

is not

@ OK
Property exists and its property data is fully defined.
Definition FieldProps.hpp:347

. 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.

request

Throws an exception of type

Definition OpmInputError.hpp:49

if

this->status

is not

. Does nothing otherwise.

Parameters
[in]locLocation of input keyword which prompted request.
[in]descrTextual description of context in which request occurred.
[in]operationName of operation which prompted request.

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