20#ifndef CONNECTIONSET_HPP_
21#define CONNECTIONSET_HPP_
23#include <opm/input/eclipse/Schedule/Well/Connection.hpp>
24#include <external/resinsight/LibGeometry/cvfBoundingBoxTree.h>
34 class ActiveGridCells;
36 class FieldPropsManager;
37 class KeywordLocation;
47 using const_iterator = std::vector<Connection>::const_iterator;
50 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ);
51 WellConnections(
const Connection::Order ordering,
const int headI,
const int headJ,
52 const std::vector<Connection>& connections);
59 : m_ordering(src.ordering())
63 for (
const auto& c : src) {
64 if (grid.isCellActive(c.getI(), c.getJ(), c.getK())) {
70 void addConnection(
const int i,
const int j,
const int k,
71 const std::size_t global_index,
73 const Connection::State state,
79 const double connection_length,
80 const double skin_factor,
82 const Connection::Direction direction = Connection::Direction::Z,
83 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
84 const std::size_t seqIndex = 0,
85 const bool defaultSatTabId =
true);
89 const std::string& wname,
92 void loadCOMPTRAJ(
const DeckRecord& record,
const ScheduleGrid& grid,
const std::string& wname,
const KeywordLocation& location, external::cvf::ref<external::cvf::BoundingBoxTree>& cellSearchTree);
97 std::size_t size()
const;
99 std::size_t num_open()
const;
100 const Connection& operator[](
size_t index)
const;
102 const Connection& getFromIJK(
const int i,
const int j,
const int k)
const;
103 const Connection& getFromGlobalIndex(std::size_t global_index)
const;
105 Connection& getFromIJK(
const int i,
const int j,
const int k);
106 bool hasGlobalIndex(std::size_t global_index)
const;
107 double segment_perf_length(
int segment)
const;
109 const_iterator begin()
const {
return this->m_connections.begin(); }
110 const_iterator end()
const {
return this->m_connections.end(); }
112 bool allConnectionsShut()
const;
130 Connection::Order ordering()
const {
return this->m_ordering; }
131 std::vector<const Connection *> output(
const EclipseGrid& grid)
const;
151 std::vector<bool>& scalingApplicable);
153 template <
class Serializer>
156 serializer(this->m_ordering);
157 serializer(this->headI);
158 serializer(this->headJ);
159 serializer(this->m_connections);
160 serializer(this->coord);
161 serializer(this->md);
164 Connection::Order m_ordering { Connection::Order::TRACK };
167 std::vector<Connection> m_connections{};
168 std::vector<std::vector<double>> coord{3, std::vector<double>(0, 0.0) };
169 std::vector<double> md{};
171 void addConnection(
const int i,
const int j,
const int k,
172 const std::size_t global_index,
175 const Connection::State state,
181 const double connection_length,
182 const double skin_factor,
183 const int satTableId,
184 const Connection::Direction direction = Connection::Direction::Z,
185 const Connection::CTFKind ctf_kind = Connection::CTFKind::DeckValue,
186 const std::size_t seqIndex = 0,
187 const bool defaultSatTabId =
true);
189 size_t findClosestConnection(
int oi,
int oj,
double oz,
size_t start_pos);
197 getCompletionNumberFromGlobalConnectionIndex(
const WellConnections& connections,
198 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:84
Definition: WellConnections.hpp:45
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:30