61 static std::string State2String(State enumValue);
62 static State StateFromString(std::string_view stringValue);
65 enum class Direction {
71 static std::string Direction2String(
const Direction enumValue);
72 static Direction DirectionFromString(std::string_view stringValue);
75 using Order = ConnectionOrder;
77 static std::string Order2String(Order enumValue);
78 static Order OrderFromString(std::string_view comporderStringValue);
141 return ! (*
this == that);
151 template <
class Serializer>
154 serializer(this->
CF);
155 serializer(this->
Kh);
156 serializer(this->
Ke);
157 serializer(this->
rw);
158 serializer(this->
r0);
159 serializer(this->
re);
171 std::size_t global_index,
176 const int satTableId,
178 const CTFProperties& ctf_properties,
179 const std::size_t sort_value,
180 const bool defaultSatTabId);
188 bool attachedToSegment()
const;
189 bool sameCoordinate(
const int i,
const int j,
const int k)
const;
193 std::size_t global_index()
const;
195 Direction dir()
const;
196 double depth()
const;
197 int satTableId()
const;
198 int complnum()
const;
200 double wpimult()
const;
207 double connectionLength()
const;
208 double skinFactor()
const;
209 double dFactor()
const;
210 CTFKind kind()
const;
211 const InjMult& injmult()
const;
212 bool activeInjMult()
const;
214 bool filterCakeActive()
const;
215 double getFilterCakeRadius()
const;
216 double getFilterCakeArea()
const;
218 const CTFProperties& ctfProperties()
const
220 return this->ctf_properties_;
223 std::size_t sort_value()
const;
224 bool getDefaultSatTabId()
const;
225 const std::optional<std::pair<double, double>>& perf_range()
const;
226 std::string str()
const;
228 bool ctfAssignedFromInput()
const
230 return this->m_ctfkind == CTFKind::DeckValue;
233 bool operator==(
const Connection&)
const;
234 bool operator!=(
const Connection& that)
const
236 return ! (*
this == that);
239 void setInjMult(
const InjMult& inj_mult);
240 void setFilterCake(
const FilterCake& filter_cake);
241 void setState(State state);
242 void setComplnum(
int compnum);
243 void setSkinFactor(
double skin_factor);
244 void setDFactor(
double d_factor);
245 void setKe(
double Ke);
246 void setCF(
double CF);
247 void setDefaultSatTabId(
bool id);
248 void setStaticDFacCorrCoeff(
const double c);
250 void scaleWellPi(
double wellPi);
251 bool prepareWellPIScaling();
252 bool applyWellPIScaling(
const double scaleFactor);
254 void updateSegmentRST(
int segment_number_arg,
255 double center_depth_arg);
256 void updateSegment(
int segment_number_arg,
257 double center_depth_arg,
258 std::size_t compseg_insert_index,
259 const std::optional<std::pair<double,double>>& perf_range);
261 template<
class Serializer>
262 void serializeOp(Serializer& serializer)
264 serializer(this->direction);
265 serializer(this->center_depth);
266 serializer(this->open_state);
267 serializer(this->sat_tableId);
268 serializer(this->m_complnum);
269 serializer(this->ctf_properties_);
270 serializer(this->ijk);
271 serializer(this->m_ctfkind);
272 serializer(this->m_global_index);
273 serializer(this->m_injmult);
274 serializer(this->m_sort_value);
275 serializer(this->m_perf_range);
276 serializer(this->m_defaultSatTabId);
277 serializer(this->segment_number);
278 serializer(this->m_wpimult);
279 serializer(this->m_subject_to_welpi);
280 serializer(this->m_filter_cake);
287 Direction direction { Direction::Z };
288 double center_depth { 0.0 };
289 State open_state { State::SHUT };
290 int sat_tableId { -1 };
291 int m_complnum { -1 };
292 CTFProperties ctf_properties_{};
294 std::array<int,3> ijk{};
295 CTFKind m_ctfkind { CTFKind::DeckValue };
296 std::optional<InjMult> m_injmult{};
297 std::size_t m_global_index{};
350 std::size_t m_sort_value{};
352 std::optional<std::pair<double,double>> m_perf_range{};
353 bool m_defaultSatTabId{
true};
358 int segment_number { 0 };
360 double m_wpimult { 1.0 };
363 bool m_subject_to_welpi {
false };
365 std::optional<FilterCake> m_filter_cake{};
367 static std::string CTFKindToString(
const CTFKind);