mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MultisegmentWellPrimaryVariables: make data members private
and add generic read-only accessor to evaluations
This commit is contained in:
@@ -842,7 +842,7 @@ assembleICDPressureEq(const int seg,
|
||||
(segment.segmentType() == Segment::SegmentType::VALVE) &&
|
||||
(segment.valve().status() == Opm::ICDStatus::SHUT) ) { // we use a zero rate equation to handle SHUT valve
|
||||
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(baseif_).
|
||||
assembleTrivialEq(seg, this->primary_variables_.evaluation_[seg][WQTotal].value(), linSys_);
|
||||
assembleTrivialEq(seg, this->primary_variables_.eval(seg)[WQTotal].value(), linSys_);
|
||||
|
||||
auto& ws = well_state.well(baseif_.indexOfWell());
|
||||
ws.segments.pressure_drop_friction[seg] = 0.;
|
||||
|
||||
@@ -137,12 +137,9 @@ public:
|
||||
void updateUpwindingSegments(const MultisegmentWellGeneric<Scalar>& mswell,
|
||||
std::vector<int>& upwinding_segments) const;
|
||||
|
||||
// the values for the primary varibles
|
||||
// based on different solutioin strategies, the wells can have different primary variables
|
||||
std::vector<std::array<double, numWellEq> > value_;
|
||||
|
||||
// the Evaluation for the well primary variables, which contain derivativles and are used in AD calculation
|
||||
std::vector<std::array<EvalWell, numWellEq> > evaluation_;
|
||||
//! \brief Returns a const ref to an evaluation.
|
||||
const std::array<EvalWell,numWellEq>& eval(const int idx) const
|
||||
{ return evaluation_[idx]; }
|
||||
|
||||
private:
|
||||
//! \brief Handle non-reasonable fractions due to numerical overshoot.
|
||||
@@ -152,6 +149,14 @@ private:
|
||||
EvalWell volumeFraction(const int seg,
|
||||
const unsigned compIdx) const;
|
||||
|
||||
//! \brief The values for the primary variables
|
||||
//! \details Based on different solution strategies, the wells can have different primary variables
|
||||
std::vector<std::array<double, numWellEq>> value_;
|
||||
|
||||
//! \brief The Evaluation for the well primary variables.
|
||||
//! \details Contains derivatives and are used in AD calculation
|
||||
std::vector<std::array<EvalWell, numWellEq>> evaluation_;
|
||||
|
||||
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well interface
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user