40 enum class SegmentType {
49 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume,
double new_x,
double new_y);
50 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_x,
double new_y);
51 Segment(
const Segment& src,
double new_depth,
double new_length,
double new_volume);
54 Segment(
const int segment_number_in,
56 const int outlet_segment_in,
57 const double length_in,
58 const double depth_in,
59 const double internal_diameter_in,
60 const double roughness_in,
61 const double cross_area_in,
62 const double volume_in,
63 const bool data_ready_in,
69 static Segment serializationTestObject();
71 int segmentNumber()
const;
72 int branchNumber()
const;
73 int outletSegment()
const;
74 double perfLength()
const;
75 double totalLength()
const;
76 double node_X()
const;
77 double node_Y()
const;
79 double internalDiameter()
const;
80 double roughness()
const;
81 double crossArea()
const;
82 double volume()
const;
83 bool dataReady()
const;
85 SegmentType segmentType()
const;
86 int ecl_type_id()
const;
88 const std::vector<int>& inletSegments()
const;
90 static double invalidValue();
92 bool operator==(
const Segment& )
const;
93 bool operator!=(
const Segment& )
const;
95 const SICD& spiralICD()
const;
97 const Valve& valve()
const;
99 void updatePerfLength(
double perf_length);
100 void updateSpiralICD(
const SICD& spiral_icd);
101 void updateAutoICD(
const AutoICD& aicd);
102 void updateValve(
const Valve& valve,
const double segment_length);
103 void updateValve(
const Valve& valve);
104 void addInletSegment(
const int segment_number);
106 bool isRegular()
const
108 return std::holds_alternative<RegularSegment>(this->m_icd);
111 inline bool isSpiralICD()
const
113 return std::holds_alternative<SICD>(this->m_icd);
116 inline bool isAICD()
const
118 return std::holds_alternative<AutoICD>(this->m_icd);
121 inline bool isValve()
const
123 return std::holds_alternative<Valve>(this->m_icd);
126 template<
class Serializer>
129 serializer(m_segment_number);
130 serializer(m_branch);
131 serializer(m_outlet_segment);
132 serializer(m_inlet_segments);
133 serializer(m_total_length);
135 serializer(m_internal_diameter);
136 serializer(m_roughness);
137 serializer(m_cross_area);
138 serializer(m_volume);
139 serializer(m_data_ready);
142 serializer(m_perf_length);
151 struct RegularSegment
153 template <
class Serializer>
156 static RegularSegment serializationTestObject() {
return {}; }
158 bool operator==(
const RegularSegment&)
const {
return true; }
163 int m_segment_number;
171 int m_outlet_segment;
174 std::vector<int> m_inlet_segments;
181 double m_total_length;
194 double m_internal_diameter;
224 std::optional<double> m_perf_length;
225 std::variant<RegularSegment, SICD, AutoICD, Valve> m_icd;
230 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