44 static const double MAX_REL_ROUGHNESS;
47 enum class SegmentType {
56 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume,
double new_x,
double new_y);
57 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_x,
double new_y);
58 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume);
61 Segment(
const int segment_number_in,
63 const int outlet_segment_in,
64 const double length_in,
65 const double depth_in,
66 const double internal_diameter_in,
67 const double roughness_in,
68 const double cross_area_in,
69 const double volume_in,
70 const bool data_ready_in,
76 static Segment serializationTestObject();
78 int segmentNumber()
const;
79 int branchNumber()
const;
80 int outletSegment()
const;
81 double perfLength()
const;
82 double totalLength()
const;
83 double node_X()
const;
84 double node_Y()
const;
86 double internalDiameter()
const;
87 double roughness()
const;
88 double crossArea()
const;
89 double volume()
const;
90 bool dataReady()
const;
92 SegmentType segmentType()
const;
93 int ecl_type_id()
const;
95 const std::vector<int>& inletSegments()
const;
97 static double invalidValue();
99 bool operator==(
const Segment& )
const;
100 bool operator!=(
const Segment& )
const;
102 const SICD& spiralICD()
const;
103 const AutoICD& autoICD()
const;
104 const Valve& valve()
const;
106 void updatePerfLength(
double perf_length);
107 void updateSpiralICD(
const SICD& spiral_icd);
108 void updateAutoICD(
const AutoICD& aicd);
109 void updateValve(
const Valve& valve,
const double segment_length);
110 void updateValve(
const Valve& valve);
111 void addInletSegment(
const int segment_number);
113 bool isRegular()
const
115 return std::holds_alternative<RegularSegment>(this->m_icd);
118 inline bool isSpiralICD()
const
120 return std::holds_alternative<SICD>(this->m_icd);
123 inline bool isAICD()
const
125 return std::holds_alternative<AutoICD>(this->m_icd);
128 inline bool isValve()
const
130 return std::holds_alternative<Valve>(this->m_icd);
133 template<
class Serializer>
136 serializer(m_segment_number);
137 serializer(m_branch);
138 serializer(m_outlet_segment);
139 serializer(m_inlet_segments);
140 serializer(m_total_length);
142 serializer(m_internal_diameter);
143 serializer(m_roughness);
144 serializer(m_cross_area);
145 serializer(m_volume);
146 serializer(m_data_ready);
149 serializer(m_perf_length);
158 struct RegularSegment
160 template <
class Serializer>
163 static RegularSegment serializationTestObject() {
return {}; }
165 bool operator==(
const RegularSegment&)
const {
return true; }
170 int m_segment_number;
178 int m_outlet_segment;
181 std::vector<int> m_inlet_segments;
188 double m_total_length;
201 double m_internal_diameter;
231 std::optional<double> m_perf_length;
232 std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
237 void updateValve__(
Valve& valve,
const double segment_length);
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30