50 using const_iterator = std::vector<Connection>::const_iterator;
52 WellConnections() =
default;
53 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ);
54 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ,
55 const std::vector<Connection>& connections);
57 static WellConnections serializationTestObject();
61 WellConnections(
const WellConnections& src,
const Grid& grid)
62 : m_ordering(src.ordering())
66 for (
const auto& c : src) {
67 if (grid.isCellActive(c.getI(), c.getJ(), c.getK())) {
75 this->m_connections.push_back(conn);
78 void addConnection(
const int i,
const int j,
const int k,
79 const std::size_t global_index,
80 const Connection::State state,
84 const Connection::Direction direction = Connection::Direction::Z,
85 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
86 const std::size_t seqIndex = 0,
87 int lgr_grid_number = 0,
88 const bool defaultSatTabId =
true);
92 const std::string& wname,
98 const std::string& wname,
104 const std::string& wname,
106 external::cvf::ref<external::cvf::BoundingBoxTree>& cellSearchTree);
110 const std::string& wname,
116 int getHeadI()
const;
117 int getHeadJ()
const;
118 const std::vector<double>& getMD()
const;
119 std::size_t size()
const;
121 std::size_t num_open()
const;
122 const Connection& operator[](
size_t index)
const;
124 const Connection& getFromIJK(
const int i,
const int j,
const int k)
const;
125 const Connection& getFromGlobalIndex(std::size_t global_index)
const;
127 Connection& getFromIJK(
const int i,
const int j,
const int k);
128 Connection* maybeGetFromGlobalIndex(
const std::size_t global_index);
129 bool hasGlobalIndex(std::size_t global_index)
const;
130 double segment_perf_length(
int segment)
const;
132 const_iterator begin()
const {
return this->m_connections.begin(); }
133 const_iterator end()
const {
return this->m_connections.end(); }
134 auto begin() {
return this->m_connections.begin(); }
135 auto end() {
return this->m_connections.end(); }
137 bool allConnectionsShut()
const;
152 bool operator==(
const WellConnections& )
const;
153 bool operator!=(
const WellConnections& )
const;
155 Connection::Order ordering()
const {
return this->m_ordering; }
156 std::vector<const Connection *> output(
const EclipseGrid& grid)
const;
176 std::vector<bool>& scalingApplicable);
178 template <
class Serializer>
181 serializer(this->m_ordering);
182 serializer(this->headI);
183 serializer(this->headJ);
184 serializer(this->m_connections);
185 serializer(this->coord);
186 serializer(this->md);
190 Connection::Order m_ordering { Connection::Order::TRACK };
193 std::vector<Connection> m_connections{};
195 std::array<std::vector<double>, 3> coord{};
196 std::vector<double> md{};
198 void addConnection(
const int i,
const int j,
const int k,
199 const std::size_t global_index,
201 const Connection::State state,
204 const int satTableId,
205 const Connection::Direction direction,
206 const Connection::CTFKind ctf_kind,
207 const std::size_t seqIndex,
209 const bool defaultSatTabId);
211 size_t findClosestConnection(
int oi,
int oj,
double oz,
size_t start_pos);
218 const std::string& wname,
221 const std::optional<std::string>& lgr_label);
void applyWellPIScaling(const double scaleFactor, std::vector< bool > &scalingApplicable)
Scale pertinent connections' CF value by supplied value.
Definition WellConnections.cpp:306
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30