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

Collection of group names with built-in ordering. More...

`#include <NameOrder.hpp>`

## Public Member Functions

| GroupOrder ()=default
| Default constructor.
| GroupOrder (std::size_t max_groups)
| Constructor.
void | add (const std::string &name)
| Add a group name to ordered collection.
const std::vector< std::string > & | names () const
| Retrieve current list of group names.
std::vector< std::string > | names (const std::string &pattern) const
| Retrieve list of group names matching a pattern.
bool | has (const std::string &gname) const
| Group name existence predicate.
bool | anyGroupMatches (const std::string &pattern) const
| Group name existence predicate.
std::vector< std::optional< std::string > > | restart_groups () const
| Retrieve sequence of group names ordered appropriately for restart file output.
bool | operator== (const GroupOrder &other) const
| Equality predicate.
auto | begin () const
| Start of group name sequence.
auto | end () const
| End of group name sequence.
template<class Serializer>
void | serializeOp (Serializer &serializer)
| Convert between byte array and object representation.

## Static Public Member Functions

static GroupOrder | serializationTestObject ()
| Create a serialisation test object.

## Detailed Description

Collection of group names with built-in ordering.

## Constructor & Destructor Documentation

## GroupOrder() [1/2]

Opm::GroupOrder::GroupOrder | ( |  | ) |

default

Default constructor.

Mainly useful as a target for object deserialisation.

## GroupOrder() [2/2]

Opm::GroupOrder::GroupOrder | ( | std::size_t | max_groups | ) |

explicit

Constructor.

Parameters

  [in] | max_groups | Maximum number of non-FIELD groups in model. Typically taken from item 3 of the WELLDIMS keyword.

## Member Function Documentation

## add()

void Opm::GroupOrder::add | ( | const std::string & | name | ) |

Add a group name to ordered collection.

Parameters

  [in] | name | Group name.

## anyGroupMatches()

bool Opm::GroupOrder::anyGroupMatches | ( | const std::string & | pattern | ) | const

Group name existence predicate.

Pattern matching version.

Parameters

  [in] | pattern | Group name or group name root.

Returns
  Whether or not any group in the current collection matches the `pattern`.

## begin()

auto Opm::GroupOrder::begin | ( |  | ) | const

inline

Start of group name sequence.

Includes FIELD group.

## has()

bool Opm::GroupOrder::has | ( | const std::string & | gname | ) | const

Group name existence predicate.

Parameters

  [in] | gname | Group name

Returns
  Whether or not `gname` exists in the current collection.

## names() [1/2]

const std::vector< std::string > & Opm::GroupOrder::names | ( |  | ) | const

inline

Retrieve current list of group names.

Includes the FIELD group, as the first element in the sequence (at index zero).

## names() [2/2]

std::vector< std::string > Opm::GroupOrder::names | ( | const std::string & | pattern | ) | const

Retrieve list of group names matching a pattern.

Regular wild-card matching only.

Parameters

  [in] | pattern | Group name or group name template.

Returns
  List of unique group names matching `pattern`.

## operator==()

bool Opm::GroupOrder::operator== | ( | const GroupOrder & | other | ) | const

Equality predicate.

Parameters

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

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

## restart_groups()

std::vector< std::optional< std::string > > Opm::GroupOrder::restart_groups | ( |  | ) | const

Retrieve sequence of group names ordered appropriately for restart file output.

Sized according to the naximum number of groups in the model, and the FIELD group placed last. Nullopt in "unused" group name slots.

## serializeOp()

template<class Serializer>

void Opm::GroupOrder::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.

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

- opm/input/eclipse/Schedule/Well/NameOrder.hpp
- opm/input/eclipse/Schedule/Well/NameOrder.cpp