29#include <opm/input/eclipse/Deck/UDAValue.hpp>
30#include <opm/input/eclipse/Schedule/UDQ/UDQEnums.hpp>
31#include <opm/input/eclipse/EclipseState/Runspec.hpp>
49 : control(control_arg)
54 RstRecord(UDAControl control_arg,
UDAValue value_arg, std::string wgname_arg, Phase phase)
55 :
RstRecord(control_arg, value_arg, wgname_arg)
57 this->ig_phase = phase;
63 std::optional<Phase> ig_phase;
72 control(UDAControl::WCONPROD_ORAT),
77 OutputRecord(
const std::string& udq_arg, std::size_t input_index_arg, std::size_t use_index_arg,
const std::string& wgname_arg, UDAControl control_arg) :
79 input_index(input_index_arg),
80 use_index(use_index_arg),
82 uda_code(UDQ::udaCode(control_arg)),
88 if ((this->udq == other.udq) &&
89 (this->input_index == other.input_index) &&
90 (this->use_index == other.use_index) &&
91 (this->wgname == other.wgname) &&
92 (this->control == other.control) &&
93 (this->uda_code == other.uda_code) &&
94 (this->use_count == other.use_count))
100 return !(*
this == other);
103 template<
class Serializer>
107 serializer(input_index);
108 serializer(use_index);
111 serializer(uda_code);
112 serializer(use_count);
116 std::size_t input_index;
117 std::size_t use_index = 0;
120 std::string wg_name()
const;
121 std::size_t use_count;
132 control(UDAControl::WCONPROD_ORAT)
135 InputRecord(std::size_t input_index_arg,
const std::string& udq_arg,
const std::string& wgname_arg, UDAControl control_arg) :
136 input_index(input_index_arg),
143 return this->input_index == other.input_index &&
144 this->udq == other.udq &&
145 this->wgname == other.wgname &&
146 this->control == other.control;
149 template<
class Serializer>
152 serializer(input_index);
158 std::size_t input_index;
164 static UDQActive serializationTestObject();
166 static std::vector<RstRecord> load_rst(
const UnitSystem& units,
169 const std::vector<std::string>& well_names,
170 const std::vector<std::string>& group_names);
171 int update(
const UDQConfig& udq_config,
const UDAValue& uda,
const std::string& wgname, UDAControl control);
172 explicit operator bool()
const;
173 const std::vector<OutputRecord>& iuad()
const;
174 std::vector<InputRecord> iuap()
const;
176 bool operator==(
const UDQActive& data)
const;
178 template<
class Serializer>
181 serializer(input_data);
182 serializer(output_data);
186 std::string udq_hash(
const std::string& udq, UDAControl control);
187 std::string wg_hash(
const std::string& wgname, UDAControl control);
188 int add(
const UDQConfig& udq_config,
const std::string& udq,
const std::string& wgname, UDAControl control);
189 int update_input(
const UDQConfig& udq_config,
const UDAValue& uda,
const std::string& wgname, UDAControl control);
190 int drop(
const std::string& wgname, UDAControl control);
192 std::vector<InputRecord> input_data;
193 std::vector<OutputRecord>
mutable output_data;
Class for (de-)serializing.
Definition: Serializer.hpp:75
Definition: UDAValue.hpp:32
Definition: UDQActive.hpp:68
Definition: UDQActive.hpp:43
Definition: UDQConfig.hpp:51
Definition: UnitSystem.hpp:33
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: UDQActive.hpp:46