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);
59 Segment(
const Segment& src,
double new_depth,
double new_length);
60 Segment(
const Segment& src,
double new_volume);
61 Segment(
const int segment_number_in,
63 const int outlet_segment_in,
64 const double depth_in,
65 const double length_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 totalLength()
const;
82 double node_X()
const;
83 double node_Y()
const;
85 double internalDiameter()
const;
86 double roughness()
const;
87 double crossArea()
const;
88 double volume()
const;
89 bool dataReady()
const;
91 SegmentType segmentType()
const;
92 int ecl_type_id()
const;
94 const std::vector<int>& inletSegments()
const;
96 static double invalidValue();
98 bool operator==(
const Segment& )
const;
99 bool operator!=(
const Segment& )
const;
101 const SICD& spiralICD()
const;
102 const AutoICD& autoICD()
const;
103 const Valve& valve()
const;
105 void updateSpiralICD(
const SICD& spiral_icd);
106 void updateAutoICD(
const AutoICD& aicd);
107 void updateValve(
const Valve& valve,
const double segment_length);
108 void updateValve(
const Valve& valve);
109 bool updateICDScalingFactor(
const double outlet_segment_length,
const double completion_length);
110 void addInletSegment(
const int segment_number);
112 bool isRegular()
const
114 return std::holds_alternative<RegularSegment>(this->m_icd);
117 inline bool isSpiralICD()
const
119 return std::holds_alternative<SICD>(this->m_icd);
122 inline bool isAICD()
const
124 return std::holds_alternative<AutoICD>(this->m_icd);
127 inline bool isValve()
const
129 return std::holds_alternative<Valve>(this->m_icd);
132 template<
class Serializer>
135 serializer(m_segment_number);
136 serializer(m_branch);
137 serializer(m_outlet_segment);
138 serializer(m_inlet_segments);
140 serializer(m_total_length);
141 serializer(m_internal_diameter);
142 serializer(m_roughness);
143 serializer(m_cross_area);
144 serializer(m_volume);
145 serializer(m_data_ready);
156 struct RegularSegment
158 template <
class Serializer>
161 static RegularSegment serializationTestObject() {
return {}; }
163 bool operator==(
const RegularSegment&)
const {
return true; }
168 int m_segment_number;
176 int m_outlet_segment;
179 std::vector<int> m_inlet_segments;
193 double m_total_length;
199 double m_internal_diameter;
229 std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
234 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