mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
moving variableWellStateIndices to StandardWells
Probably it is the time to introduce SeqQs and SeqP for the multi-segment wells.
This commit is contained in:
parent
e7d00f4f99
commit
15380fd370
@ -363,9 +363,6 @@ namespace Opm {
|
|||||||
std::vector<int>
|
std::vector<int>
|
||||||
variableStateIndices() const;
|
variableStateIndices() const;
|
||||||
|
|
||||||
std::vector<int>
|
|
||||||
variableWellStateIndices() const;
|
|
||||||
|
|
||||||
SolutionState
|
SolutionState
|
||||||
variableStateExtractVars(const ReservoirState& x,
|
variableStateExtractVars(const ReservoirState& x,
|
||||||
const std::vector<int>& indices,
|
const std::vector<int>& indices,
|
||||||
|
@ -612,24 +612,6 @@ namespace detail {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class Grid, class WellModel, class Implementation>
|
|
||||||
std::vector<int>
|
|
||||||
BlackoilModelBase<Grid, WellModel, Implementation>::
|
|
||||||
variableWellStateIndices() const
|
|
||||||
{
|
|
||||||
// Black oil model standard is 5 equation.
|
|
||||||
// For the pure well solve, only the well equations are picked.
|
|
||||||
std::vector<int> indices(5, -1);
|
|
||||||
int next = 0;
|
|
||||||
indices[Qs] = next++;
|
|
||||||
indices[Bhp] = next++;
|
|
||||||
assert(next == 2);
|
|
||||||
return indices;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class Grid, class WellModel, class Implementation>
|
template <class Grid, class WellModel, class Implementation>
|
||||||
typename BlackoilModelBase<Grid, WellModel, Implementation>::SolutionState
|
typename BlackoilModelBase<Grid, WellModel, Implementation>::SolutionState
|
||||||
@ -1092,7 +1074,7 @@ namespace detail {
|
|||||||
V aliveWells;
|
V aliveWells;
|
||||||
const int np = wells().number_of_phases;
|
const int np = wells().number_of_phases;
|
||||||
std::vector<ADB> cq_s(np, ADB::null());
|
std::vector<ADB> cq_s(np, ADB::null());
|
||||||
std::vector<int> indices = variableWellStateIndices();
|
std::vector<int> indices = asImpl().stdWells().variableWellStateIndices();
|
||||||
SolutionState state0 = state;
|
SolutionState state0 = state;
|
||||||
WellState well_state0 = well_state;
|
WellState well_state0 = well_state;
|
||||||
asImpl().makeConstantState(state0);
|
asImpl().makeConstantState(state0);
|
||||||
|
@ -223,7 +223,7 @@ namespace Opm {
|
|||||||
using Base::convergenceReduction;
|
using Base::convergenceReduction;
|
||||||
using Base::maxResidualAllowed;
|
using Base::maxResidualAllowed;
|
||||||
using Base::variableState;
|
using Base::variableState;
|
||||||
using Base::variableWellStateIndices;
|
// using Base::variableWellStateIndices;
|
||||||
using Base::asImpl;
|
using Base::asImpl;
|
||||||
|
|
||||||
const std::vector<WellMultiSegmentConstPtr>& wellsMultiSegment() const { return wells_multisegment_; }
|
const std::vector<WellMultiSegmentConstPtr>& wellsMultiSegment() const { return wells_multisegment_; }
|
||||||
|
@ -1559,7 +1559,7 @@ namespace Opm {
|
|||||||
V aliveWells;
|
V aliveWells;
|
||||||
const int np = wells().number_of_phases;
|
const int np = wells().number_of_phases;
|
||||||
std::vector<ADB> cq_s(np, ADB::null());
|
std::vector<ADB> cq_s(np, ADB::null());
|
||||||
std::vector<int> indices = variableWellStateIndices();
|
std::vector<int> indices = stdWells().variableWellStateIndices();
|
||||||
SolutionState state0 = state;
|
SolutionState state0 = state;
|
||||||
WellState well_state0 = well_state;
|
WellState well_state0 = well_state;
|
||||||
makeConstantState(state0);
|
makeConstantState(state0);
|
||||||
|
@ -185,6 +185,8 @@ namespace Opm {
|
|||||||
int& next) const;
|
int& next) const;
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<int>
|
||||||
|
variableWellStateIndices() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool wells_active_;
|
bool wells_active_;
|
||||||
|
@ -1130,4 +1130,22 @@ namespace Opm
|
|||||||
indices[Bhp] = next++;
|
indices[Bhp] = next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<int>
|
||||||
|
StandardWells::variableWellStateIndices() const
|
||||||
|
{
|
||||||
|
// Black oil model standard is 5 equation.
|
||||||
|
// For the pure well solve, only the well equations are picked.
|
||||||
|
std::vector<int> indices(5, -1);
|
||||||
|
int next = 0;
|
||||||
|
|
||||||
|
variableStateWellIndices(indices, next);
|
||||||
|
|
||||||
|
assert(next == 2);
|
||||||
|
return indices;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user