allow constructing Segment from variables
This commit is contained in:
@@ -44,6 +44,14 @@ namespace Opm {
|
||||
Segment(int segment_number_in, int branch_in, int outlet_segment_in, double length_in, double depth_in,
|
||||
double internal_diameter_in, double roughness_in, double cross_area_in, double volume_in, bool data_ready_in);
|
||||
|
||||
Segment(int segmentNumber, int branchNumber, int outlegSegment,
|
||||
const std::vector<int>& inletSegments,
|
||||
double totalLength, double depth, double internalDiameter,
|
||||
double roughness, double crossArea, double volume,
|
||||
bool dataReady, SegmentType segmentType,
|
||||
std::shared_ptr<SpiralICD> spiralICD,
|
||||
std::shared_ptr<Valve> valv);
|
||||
|
||||
int segmentNumber() const;
|
||||
int branchNumber() const;
|
||||
int outletSegment() const;
|
||||
@@ -71,6 +79,7 @@ namespace Opm {
|
||||
void updateSpiralICD(const SpiralICD& spiral_icd);
|
||||
|
||||
const std::shared_ptr<SpiralICD>& spiralICD() const;
|
||||
const std::shared_ptr<Valve>& getValve() const;
|
||||
|
||||
void updateValve(const Valve& valve, const double segment_length);
|
||||
|
||||
|
||||
@@ -56,6 +56,31 @@ namespace Opm {
|
||||
{
|
||||
}
|
||||
|
||||
Segment::Segment(int segmentNum, int branchNum, int outletSeg,
|
||||
const std::vector<int>& inletSegs,
|
||||
double totalLen, double dept, double internalDiam,
|
||||
double rough, double crossA, double vol,
|
||||
bool dr, SegmentType segment,
|
||||
std::shared_ptr<SpiralICD> spiralIcd,
|
||||
std::shared_ptr<Valve> valv)
|
||||
: m_segment_number(segmentNum),
|
||||
m_branch(branchNum),
|
||||
m_outlet_segment(outletSeg),
|
||||
m_inlet_segments(inletSegs),
|
||||
m_total_length(totalLen),
|
||||
m_depth(dept),
|
||||
m_internal_diameter(internalDiam),
|
||||
m_roughness(rough),
|
||||
m_cross_area(crossA),
|
||||
m_volume(vol),
|
||||
m_data_ready(dr),
|
||||
m_segment_type(segment),
|
||||
m_spiral_icd(spiralIcd),
|
||||
m_valve(valv)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int Segment::segmentNumber() const {
|
||||
return m_segment_number;
|
||||
}
|
||||
@@ -196,4 +221,8 @@ namespace Opm {
|
||||
return m_valve.get();
|
||||
}
|
||||
|
||||
const std::shared_ptr<Valve>& Segment::getValve() const {
|
||||
return m_valve;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user