20#ifndef CONNECTIONSET_HPP_
21#define CONNECTIONSET_HPP_
23#include <opm/input/eclipse/Schedule/Well/Connection.hpp>
33 class ActiveGridCells;
35 class FieldPropsManager;
36 class KeywordLocation;
46 using const_iterator = std::vector<Connection>::const_iterator;
49 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ);
50 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ,
51 const std::vector<Connection>& connections);
58 : m_ordering(src.ordering())
62 for (
const auto& c : src) {
63 if (grid.isCellActive(c.getI(), c.getJ(), c.getK())) {
69 void addConnection(
const int i,
const int j,
const int k,
70 const std::size_t global_index,
72 const Connection::State state,
78 const double connection_length,
79 const double skin_factor,
81 const Connection::Direction direction = Connection::Direction::Z,
82 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
83 const std::size_t seqIndex = 0,
84 const bool defaultSatTabId =
true);
88 const std::string& wname,
92 std::size_t size()
const;
94 std::size_t num_open()
const;
95 const Connection& operator[](
size_t index)
const;
97 const Connection& getFromIJK(
const int i,
const int j,
const int k)
const;
98 const Connection& getFromGlobalIndex(std::size_t global_index)
const;
100 Connection& getFromIJK(
const int i,
const int j,
const int k);
101 bool hasGlobalIndex(std::size_t global_index)
const;
102 double segment_perf_length(
int segment)
const;
104 const_iterator begin()
const {
return this->m_connections.begin(); }
105 const_iterator end()
const {
return this->m_connections.end(); }
107 bool allConnectionsShut()
const;
125 Connection::Order ordering()
const {
return this->m_ordering; }
126 std::vector<const Connection *> output(
const EclipseGrid& grid)
const;
146 std::vector<bool>& scalingApplicable);
148 template <
class Serializer>
151 serializer(this->m_ordering);
152 serializer(this->headI);
153 serializer(this->headJ);
154 serializer(this->m_connections);
158 Connection::Order m_ordering { Connection::Order::TRACK };
161 std::vector<Connection> m_connections{};
163 void addConnection(
const int i,
const int j,
const int k,
164 const std::size_t global_index,
167 const Connection::State state,
173 const double connection_length,
174 const double skin_factor,
175 const int satTableId,
176 const Connection::Direction direction = Connection::Direction::Z,
177 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
178 const std::size_t seqIndex = 0,
179 const bool defaultSatTabId =
true);
181 size_t findClosestConnection(
int oi,
int oj,
double oz,
size_t start_pos);
188 getCompletionNumberFromGlobalConnectionIndex(
const WellConnections& connections,
189 const std::size_t global_index);
Simple class capturing active cells of a grid.
Definition: ActiveGridCells.hpp:36
Definition: Connection.hpp:43
Definition: DeckRecord.hpp:32
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:54
Definition: KeywordLocation.hpp:27
Definition: ScheduleGrid.hpp:29
Class for (de-)serializing.
Definition: Serializer.hpp:75
Definition: WellConnections.hpp:44
void order()
Order connections irrespective of input order.
void applyWellPIScaling(const double scaleFactor, std::vector< bool > &scalingApplicable)
Scale pertinent connections' CF value by supplied value.
bool prepareWellPIScaling()
Activate or reactivate WELPI scaling for this connection set.
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29