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,
189 bool attachedToSegment()
const;
190 bool sameCoordinate(
const int i,
const int j,
const int k)
const;
194 std::size_t global_index()
const;
196 Direction dir()
const;
197 double depth()
const;
198 int satTableId()
const;
199 int complnum()
const;
201 double wpimult()
const;
208 double connectionLength()
const;
209 double skinFactor()
const;
210 double dFactor()
const;
211 CTFKind kind()
const;
212 const InjMult& injmult()
const;
213 bool activeInjMult()
const;
215 bool filterCakeActive()
const;
216 double getFilterCakeRadius()
const;
217 double getFilterCakeArea()
const;
219 const CTFProperties& ctfProperties()
const
221 return this->ctf_properties_;
224 std::size_t sort_value()
const;
225 bool getDefaultSatTabId()
const;
226 const std::optional<std::pair<double, double>>& perf_range()
const;
227 std::string str()
const;
229 bool ctfAssignedFromInput()
const
231 return this->m_ctfkind == CTFKind::DeckValue;
234 bool operator==(
const Connection&)
const;
235 bool operator!=(
const Connection& that)
const
237 return ! (*
this == that);
240 void setInjMult(
const InjMult& inj_mult);
241 void setFilterCake(
const FilterCake& filter_cake);
242 void setState(State state);
243 void setComplnum(
int compnum);
244 void setSkinFactor(
double skin_factor);
245 void setDFactor(
double d_factor);
246 void setKe(
double Ke);
247 void setCF(
double CF);
248 void setDefaultSatTabId(
bool id);
249 void setStaticDFacCorrCoeff(
const double c);
251 void scaleWellPi(
double wellPi);
252 bool prepareWellPIScaling();
253 bool applyWellPIScaling(
const double scaleFactor);
255 void updateSegmentRST(
int segment_number_arg,
256 double center_depth_arg);
257 void updateSegment(
int segment_number_arg,
258 double center_depth_arg,
259 std::size_t compseg_insert_index,
260 const std::optional<std::pair<double,double>>& perf_range);
262 template<
class Serializer>
263 void serializeOp(Serializer& serializer)
265 serializer(this->direction);
266 serializer(this->center_depth);
267 serializer(this->open_state);
268 serializer(this->sat_tableId);
269 serializer(this->m_complnum);
270 serializer(this->ctf_properties_);
271 serializer(this->ijk);
272 serializer(this->lgr_grid);
273 serializer(this->m_ctfkind);
274 serializer(this->m_global_index);
275 serializer(this->m_injmult);
276 serializer(this->m_sort_value);
277 serializer(this->m_perf_range);
278 serializer(this->m_defaultSatTabId);
279 serializer(this->segment_number);
280 serializer(this->m_wpimult);
281 serializer(this->m_subject_to_welpi);
282 serializer(this->m_filter_cake);
289 Direction direction { Direction::Z };
290 double center_depth { 0.0 };
291 State open_state { State::SHUT };
292 int sat_tableId { -1 };
293 int m_complnum { -1 };
294 CTFProperties ctf_properties_{};
296 std::array<int,3> ijk{};
298 CTFKind m_ctfkind { CTFKind::DeckValue };
299 std::optional<InjMult> m_injmult{};
300 std::size_t m_global_index{};
353 std::size_t m_sort_value{};
355 std::optional<std::pair<double,double>> m_perf_range{};
356 bool m_defaultSatTabId{
true};
361 int segment_number { 0 };
363 double m_wpimult { 1.0 };
366 bool m_subject_to_welpi {
false };
368 std::optional<FilterCake> m_filter_cake{};
370 static std::string CTFKindToString(
const CTFKind);