20 #ifndef CONNECTIONSET_HPP_ 21 #define CONNECTIONSET_HPP_ 23 #include <opm/input/eclipse/Schedule/Well/Connection.hpp> 34 class ActiveGridCells;
38 class FieldPropsManager;
39 class KeywordLocation;
51 using const_iterator = std::vector<Connection>::const_iterator;
54 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ);
55 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ,
56 const std::vector<Connection>& connections);
63 : m_ordering(src.ordering())
67 for (
const auto& c : src) {
68 if (grid.isCellActive(c.getI(), c.getJ(), c.getK())) {
76 this->m_connections.push_back(conn);
79 void addConnection(
const int i,
const int j,
const int k,
80 const std::size_t global_index,
81 const Connection::State state,
85 const Connection::Direction direction = Connection::Direction::Z,
86 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
87 const std::size_t seqIndex = 0,
88 int lgr_grid_number = 0,
89 const bool defaultSatTabId =
true);
92 const std::string& wname,
100 const std::string& wname,
108 const std::string& wname,
114 const std::string& wname,
121 int getHeadI()
const;
122 int getHeadJ()
const;
123 const std::vector<double>& getMD()
const;
124 std::size_t size()
const;
126 std::size_t num_open()
const;
127 const Connection& operator[](
size_t index)
const;
129 const Connection& getFromIJK(
const int i,
const int j,
const int k)
const;
130 const Connection& getFromGlobalIndex(std::size_t global_index)
const;
132 Connection& getFromIJK(
const int i,
const int j,
const int k);
133 Connection* maybeGetFromGlobalIndex(
const std::size_t global_index);
134 bool hasGlobalIndex(std::size_t global_index)
const;
135 double segment_perf_length(
int segment)
const;
137 const_iterator begin()
const {
return this->m_connections.begin(); }
138 const_iterator end()
const {
return this->m_connections.end(); }
139 auto begin() {
return this->m_connections.begin(); }
140 auto end() {
return this->m_connections.end(); }
141 bool allConnectionsShut()
const;
159 Connection::Order ordering()
const {
return this->m_ordering; }
160 std::vector<const Connection *> output(
const EclipseGrid& grid)
const;
180 std::vector<bool>& scalingApplicable);
182 template <
class Serializer>
185 serializer(this->m_ordering);
186 serializer(this->headI);
187 serializer(this->headJ);
188 serializer(this->m_connections);
189 serializer(this->coord);
190 serializer(this->md);
194 Connection::Order m_ordering { Connection::Order::TRACK };
197 std::vector<Connection> m_connections{};
199 std::array<std::vector<double>, 3> coord{};
200 std::vector<double> md{};
202 void addConnection(
const int i,
const int j,
const int k,
203 const std::size_t global_index,
205 const Connection::State state,
208 const int satTableId,
209 const Connection::Direction direction,
210 const Connection::CTFKind ctf_kind,
211 const std::size_t seqIndex,
213 const bool defaultSatTabId);
215 size_t findClosestConnection(
int oi,
int oj,
double oz,
size_t start_pos);
221 const std::string& wname,
225 const std::optional<std::string>& lgr_label,
231 getCompletionNumberFromGlobalConnectionIndex(
const WellConnections& connections,
232 const std::size_t global_index);
235 #endif // CONNECTIONSET_HPP_ Definition: Connection.hpp:52
Quantities that go into calculating the connection transmissibility factor.
Definition: Connection.hpp:90
Definition: KeywordLocation.hpp:27
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:62
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Collection of intersected cells and associate properties for all simulation grids, i.e., the main grid and all LGRs in the simulation run.
Definition: ScheduleGrid.hpp:49
Definition: WellTrajInfo.hpp:29
void applyWellPIScaling(const double scaleFactor, std::vector< bool > &scalingApplicable)
Scale pertinent connections' CF value by supplied value.
Definition: WellConnections.cpp:370
bool prepareWellPIScaling()
Activate or reactivate WELPI scaling for this connection set.
Definition: WellConnections.cpp:360
Control parser behaviour in failure conditions.
Definition: ParseContext.hpp:114
Definition: WellConnections.hpp:48
void order()
Order connections irrespective of input order.
Definition: WellConnections.cpp:1048
Definition: DeckRecord.hpp:32
Class for (de-)serializing.
Definition: Serializer.hpp:94
Definition: ErrorGuard.hpp:30