Loading...
Searching...
No Matches
Opm::UDQActive Class Reference

Internalised representation of all UDAs in a simulation run. More...

`#include <UDQActive.hpp>`

## Classes

struct | RstRecord
| Single UDA created from restart file information. More...
class | OutputRecord
| Single UDA with use counts and IUAP start offsets for restart file output purposes. More...
class | InputRecord
| Internalised representation of a UDA from the input file. More...

## Public Member Functions

| UDQActive ()=default
| Default constructor.
int | update (const UDQConfig &udq_config, const UDAValue &uda, const std::string &wgname, const UDAControl control)
| Amend collection of input UDAs to account for a new entry.
| operator bool () const
| UDA existence predicate.
const std::vector< OutputRecord > & | iuad () const
| Retrieve current set of UDAs, condensed by use counts and IUAP offsets.
std::vector< InputRecord > | iuap () const
| Retrieve current set of UDAs from which to form IUAP restart file array.
bool | operator== (const UDQActive &data) const
| Equality predicate.
template<class Serializer>
void | serializeOp (Serializer &serializer)
| Convert between byte array and object representation.

## Static Public Member Functions

static UDQActive | serializationTestObject ()
| Create a serialisation test object.
static std::vector< RstRecord > | load_rst (const UnitSystem &units, const UDQConfig &udq_config, const RestartIO::RstState &rst_state, const std::vector< std::string > &well_names, const std::vector< std::string > &group_names)
| Load UDAs from restart file.

## Detailed Description

Internalised representation of all UDAs in a simulation run.

## Constructor & Destructor Documentation

## UDQActive()

Opm::UDQActive::UDQActive | ( |  | ) |

default

Default constructor.

Creates an empty collection of UDAs. Resulting collection is usable as a target for a deserialisation operation, or as a container of new UDAs through calls to the update() member function.

## Member Function Documentation

## iuad()

const std::vector< Opm::UDQActive::OutputRecord > & Opm::UDQActive::iuad | ( |  | ) | const

Retrieve current set of UDAs, condensed by use counts and IUAP offsets.

Intended for restart file output purposes only.

## iuap()

std::vector< Opm::UDQActive::InputRecord > Opm::UDQActive::iuap | ( |  | ) | const

Retrieve current set of UDAs from which to form IUAP restart file array.

Intendend for restart file output purposes only.

Note
  This function's role could possibly be served by iuad() as well. If so, that's a future performance benefit since we won't have to form a new vector<> on every call to the function.

## load_rst()

std::vector< Opm::UDQActive::RstRecord > Opm::UDQActive::load_rst | ( | const UnitSystem & | units,
|  | const UDQConfig & | udq_config,
|  | const RestartIO::RstState & | rst_state,
|  | const std::vector< std::string > & | well_names,
|  | const std::vector< std::string > & | group_names )

static

Load UDAs from restart file.

Parameters

  [in] | units |
  [in] | udq_config | Simulation run's collection of user defined quantities.
  [in] | rst_state | Restart file information.
  [in] | well_names | Run's wells at restart point.
  [in] | group_names | Run's groups at restart point.

## operator bool()

Opm::UDQActive::operator bool | ( |  | ) | const

explicit

UDA existence predicate.

Returns
  Whether or not there are any UDAs registered in this collection.

## operator==()

bool Opm::UDQActive::operator== | ( | const UDQActive & | data | ) | const

Equality predicate.

Parameters

  [in] | data | Object against which will be tested for equality.

Returns
  Whether or not
  is the same as `data`.

## serializeOp()

template<class Serializer>

void Opm::UDQActive::serializeOp | ( | Serializer & | serializer | ) |

inline

Convert between byte array and object representation.

Template Parameters

  Serializer | Byte array conversion protocol.

Parameters

  [in,out] | serializer | Byte array conversion object.

## update()

int Opm::UDQActive::update | ( | const UDQConfig & | udq_config,
|  | const UDAValue & | uda,
|  | const std::string & | wgname,
|  | const UDAControl | control )

Amend collection of input UDAs to account for a new entry.

Does nothing if the UDA is numeric. Adds a new record if none exists for the particular combination of (UDA, well/group name, and constraint keyword item). Removes a record if the UDA value is numeric and previously used a UDQ specification. Replaces a record if a different UDA was used for the same combination of well/group name and keyword/item.

Parameters

  [in] | udq_config | Simulation run's collection of user defined quantities.
  [in] | uda | Numeric or string UDA value entered for a single limit/item in a constraint keyword.
  [in] | wgname | Well/group name affected by `uda`.
  [in] | control | Constraint keyword and associate item/limit for which `uda` supplies the numeric value.

Returns
  Whether or not internal data structures were altered. One (1) if changes were made, and zero (0) otherwise.

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

- opm/input/eclipse/Schedule/UDQ/UDQActive.hpp
- opm/input/eclipse/Schedule/UDQ/UDQActive.cpp