51 using const_iterator = std::vector<Connection>::const_iterator;
53 WellConnections() =
default;
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);
58 static WellConnections serializationTestObject();
62 WellConnections(
const WellConnections& src,
const Grid& grid)
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;
156 bool operator==(
const WellConnections& )
const;
157 bool operator!=(
const WellConnections& )
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,
Control parser behaviour in failure conditions.
Definition ParseContext.hpp:115
void applyWellPIScaling(const double scaleFactor, std::vector< bool > &scalingApplicable)
Scale pertinent connections' CF value by supplied value.
Definition WellConnections.cpp:370
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30