|
opm-common
|
Collection of run's known well lists. More...
#include <WListManager.hpp>
Public Member Functions | |
| WListManager ()=default | |
| Default constructor. | |
| WListManager (const RestartIO::RstState &rst_state) | |
| Constructor. | |
| std::size_t | WListSize () const |
| Number of well lists in current collection. | |
| bool | hasWell (const std::string &pattern) const |
| Whether or not one or more wells matching a well list name or well list template exists. | |
| bool | hasList (const std::string &wlistName) const |
| Predicate for existence of particular well lists. | |
| WList & | getList (const std::string &name) |
| Access individual well list by name. | |
| const WList & | getList (const std::string &name) const |
| Access individual well list by name. | |
| WList & | newList (const std::string &name, const std::vector< std::string > &wname) |
| Create a new well list with initial sequence of wells. | |
| auto | begin () const |
| Start of sequence of run's current well lists. | |
| auto | end () const |
| End of sequence of run's current well lists. | |
| const std::vector< std::string > & | getWListNames (const std::string &wname) const |
| Sequence of well lists containing named well. | |
| std::size_t | getNoWListsWell (const std::string &wname) const |
| Number of well lists containing named well. | |
| bool | hasWList (const std::string &wname) const |
| Whether or not named well is on any current well list. | |
| void | addWListWell (const std::string &wname, const std::string &wlname) |
| Add named well to named well list. | |
| void | addOrCreateWellList (const std::string &wlname, const std::vector< std::string > &wnames) |
| Add sequence of wells to a named well list. | |
| bool | delWell (const std::string &wname) |
| Remove named well from all existing well lists. | |
| bool | delWListWell (const std::string &wname, const std::string &wlname) |
| Remove named well from specific, named well list. | |
| bool | operator== (const WListManager &data) const |
| Equality predicate. | |
| std::vector< std::string > | wells (const std::string &wlist_pattern) const |
| All wells on all well lists matching a name pattern. | |
| template<class Serializer> | |
| void | serializeOp (Serializer &serializer) |
| Convert between byte array and object representation. | |
Static Public Member Functions | |
| static WListManager | serializationTestObject () |
| Create a serialisation test object. | |
Collection of run's known well lists.
Manages how well lists are created (NEW), how new wells are added to new or existing lists (ADD), how wells move between well lists (MOV), and how to remove a set of wells from an existing well list (DEL).
|
explicit |
Constructor.
Forms collection of well lists from restart file information.
| [in] | rst_state | Restart file information. |
| void Opm::WListManager::addOrCreateWellList | ( | const std::string & | wlname, |
| const std::vector< std::string > & | wnames ) |
Add sequence of wells to a named well list.
Will create the well list if it does not already exist. Implements the ADD operation.
| [in] | wlname | Well list name, including the leading asterisk. |
| [in] | wnames | Sequence of named wells that will be added to well list wlname. |
| void Opm::WListManager::addWListWell | ( | const std::string & | wname, |
| const std::string & | wlname ) |
|
inline |
Start of sequence of run's current well lists.
Sorted by well list name.
| bool Opm::WListManager::delWell | ( | const std::string & | wname | ) |
Remove named well from all existing well lists.
No change if named well is not on any existing well list. Implements the DEL operation.
| [in] | wname | Well name. |
wname. | bool Opm::WListManager::delWListWell | ( | const std::string & | wname, |
| const std::string & | wlname ) |
Remove named well from specific, named well list.
| [in] | wname | Named well. |
| [in] | wlname | Well list name, including leading asterisk. |
wlname changed. | WList & Opm::WListManager::getList | ( | const std::string & | name | ) |
| const WList & Opm::WListManager::getList | ( | const std::string & | name | ) | const |
| std::size_t Opm::WListManager::getNoWListsWell | ( | const std::string & | wname | ) | const |
Number of well lists containing named well.
| [in] | wname | Well name. |
wname. | const std::vector< std::string > & Opm::WListManager::getWListNames | ( | const std::string & | wname | ) | const |
Sequence of well lists containing named well.
| [in] | wname | Well name. |
wname. | bool Opm::WListManager::hasList | ( | const std::string & | wlistName | ) | const |
Predicate for existence of particular well lists.
| [in] | wlistName | Well list name, including leading asterisk. |
wlistName exists in current collection. | bool Opm::WListManager::hasWell | ( | const std::string & | pattern | ) | const |
Whether or not one or more wells matching a well list name or well list template exists.
This predicate checks whether or not a well list exists matching the pattern and that that well list is non-empty.
| [in] | pattern | Well list name or well list template. |
pattern. | bool Opm::WListManager::hasWList | ( | const std::string & | wname | ) | const |
Whether or not named well is on any current well list.
| [in] | wname | Well name. |
wname is on any well list. | WList & Opm::WListManager::newList | ( | const std::string & | name, |
| const std::vector< std::string > & | wname ) |
Create a new well list with initial sequence of wells.
Implements the NEW operation.
| [in] | name | Well list name, including the leading asterisk. |
| [in] | wname | Initial collection of wells in well list name. |
name. | bool Opm::WListManager::operator== | ( | const WListManager & | data | ) | const |
Equality predicate.
| [in] | data | Object against which will be tested for equality. |
data.
|
inline |
Convert between byte array and object representation.
| Serializer | Byte array conversion protocol. |
| [in,out] | serializer | Byte array conversion object. |
| std::vector< std::string > Opm::WListManager::wells | ( | const std::string & | wlist_pattern | ) | const |
All wells on all well lists matching a name pattern.
Well names are unique.
| [in] | wlist_pattern | Well list name or well list name pattern. Should include the leading asterisk. |
wlist_pattern. Empty if no such list exists, or if all matching well lists are empty.