23#include <opm/input/eclipse/EclipseState/Phase.hpp>
25#include <opm/input/eclipse/Schedule/UDQ/UDQEnums.hpp>
27#include <opm/input/eclipse/Deck/UDAValue.hpp>
42namespace Opm::RestartIO {
69 const std::string& wgname_arg)
90 const std::string& wgname_arg,
92 :
RstRecord { control_arg, value_arg, wgname_arg }
145 const std::size_t input_index_arg,
146 const std::string& wgname_arg,
147 const UDAControl control_arg);
167 return ! (*
this == other);
175 template<
class Serializer>
217 std::string wgname{};
243 const std::string& udq_arg,
244 const std::string& wgname_arg,
245 const UDAControl control_arg);
261 template<
class Serializer>
307 static std::vector<RstRecord>
311 const std::vector<std::string>& well_names,
312 const std::vector<std::string>& group_names);
338 const std::string& wgname,
339 const UDAControl control);
345 explicit operator bool()
const;
351 const std::vector<OutputRecord>&
iuad()
const;
361 std::vector<InputRecord>
iuap()
const;
376 template<
class Serializer>
379 serializer(input_data);
380 serializer(output_data);
385 std::vector<InputRecord> input_data{};
394 mutable std::vector<OutputRecord> output_data{};
397 void constructOutputRecords()
const;
Class for (de-)serializing.
Definition Serializer.hpp:94
Definition UDAValue.hpp:31
Single UDA with use counts and IUAP start offsets for restart file output purposes.
Definition UDQActive.hpp:121
bool operator!=(const OutputRecord &other) const
Inequality predicate.
Definition UDQActive.hpp:165
int uda_code
Restart file integer representation of control.
Definition UDQActive.hpp:198
std::size_t input_index
Zero-based index in order of appearance of the UDQ use for this UDA.
Definition UDQActive.hpp:191
const std::string & wg_name() const
Name of well/group affected by this UDA.
Definition UDQActive.hpp:203
UDAControl control
Constraint keyword and item/limit for which this UDA supplies the numeric value.
Definition UDQActive.hpp:195
std::string udq
Name of UDQ from which this UDA derives its numeric value.
Definition UDQActive.hpp:187
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition UDQActive.hpp:176
bool operator==(const OutputRecord &other) const
Equality predicate.
Definition UDQActive.cpp:149
std::size_t use_count
Number of times this UDA is mentioned in this particular combination of constraint keyword and item/l...
Definition UDQActive.hpp:211
OutputRecord()
Default constructor.
Definition UDQActive.cpp:130
Internalised representation of all UDAs in a simulation run.
Definition UDQActive.hpp:50
const std::vector< OutputRecord > & iuad() const
Retrieve current set of UDAs, condensed by use counts and IUAP offsets.
Definition UDQActive.cpp:326
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.
Definition UDQActive.cpp:261
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition UDQActive.hpp:377
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.
Definition UDQActive.cpp:199
UDQActive()=default
Default constructor.
std::vector< InputRecord > iuap() const
Retrieve current set of UDAs from which to form IUAP restart file array.
Definition UDQActive.cpp:335
bool operator==(const UDQActive &data) const
Equality predicate.
Definition UDQActive.cpp:365
static UDQActive serializationTestObject()
Create a serialisation test object.
Definition UDQActive.cpp:188
Collection of all user-defined quantities in the current simulation run.
Definition UDQConfig.hpp:69
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Single UDA created from restart file information.
Definition UDQActive.hpp:54
UDAValue value
UDA value.
Definition UDQActive.hpp:104
std::string wgname
Name of well/group affected by this UDA.
Definition UDQActive.hpp:107
RstRecord(const UDAControl control_arg, const UDAValue value_arg, const std::string &wgname_arg, const Phase phase)
Constructor.
Definition UDQActive.hpp:88
RstRecord(const UDAControl control_arg, const UDAValue value_arg, const std::string &wgname_arg)
Constructor.
Definition UDQActive.hpp:67
std::optional< Phase > ig_phase
Injected phase in group level injection.
Definition UDQActive.hpp:112
UDAControl control
Item/limit of constraint keyword for which this UDA supplies the numeric value.
Definition UDQActive.hpp:99