66 enum class SegmentType {
75 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume,
double new_x,
double new_y);
76 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_x,
double new_y);
77 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume);
80 Segment(
const int segment_number_in,
82 const int outlet_segment_in,
83 const double length_in,
84 const double depth_in,
85 const double internal_diameter_in,
86 const double roughness_in,
87 const double cross_area_in,
88 const double volume_in,
89 const bool data_ready_in,
95 static Segment serializationTestObject();
97 int segmentNumber()
const;
98 int branchNumber()
const;
99 int outletSegment()
const;
100 double perfLength()
const;
101 double totalLength()
const;
102 double node_X()
const;
103 double node_Y()
const;
104 double depth()
const;
105 double internalDiameter()
const;
106 double roughness()
const;
107 double crossArea()
const;
108 double volume()
const;
109 bool dataReady()
const;
111 SegmentType segmentType()
const;
112 int ecl_type_id()
const;
115 const std::vector<int>& inletSegments()
const;
117 static double invalidValue();
118 static SegmentType type_from_int(
int ecl_id);
120 bool operator==(
const Segment& )
const;
121 bool operator!=(
const Segment& )
const;
123 const SICD& spiralICD()
const;
124 const AutoICD& autoICD()
const;
125 const Valve& valve()
const;
127 void updatePerfLength(
double perf_length);
128 void updateSpiralICD(
const SICD& spiral_icd);
129 void updateAutoICD(
const AutoICD& aicd);
130 void updateValve(
const Valve& valve,
const double segment_length);
131 void updateValve(
const Valve& valve);
132 void addInletSegment(
const int segment_number);
134 bool isRegular()
const
136 return std::holds_alternative<RegularSegment>(this->m_icd);
139 inline bool isSpiralICD()
const
141 return std::holds_alternative<SICD>(this->m_icd);
144 inline bool isAICD()
const
146 return std::holds_alternative<AutoICD>(this->m_icd);
149 inline bool isValve()
const
151 return std::holds_alternative<Valve>(this->m_icd);
154 template<
class Serializer>
157 serializer(m_segment_number);
158 serializer(m_branch);
159 serializer(m_outlet_segment);
160 serializer(m_inlet_segments);
161 serializer(m_total_length);
163 serializer(m_internal_diameter);
164 serializer(m_roughness);
165 serializer(m_cross_area);
166 serializer(m_volume);
167 serializer(m_data_ready);
170 serializer(m_perf_length);
175 void updateValve__(
Valve& valve,
const double segment_length);
178 int m_segment_number;
184 int m_outlet_segment;
186 std::vector<int> m_inlet_segments;
192 double m_total_length;
203 double m_internal_diameter;
227 std::optional<double> m_perf_length;
228 std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30