mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-01 21:39:09 -06:00
moving numWellVars from models to Wells.
This commit is contained in:
parent
b3d1c0eabc
commit
f2b7f2a56c
@ -343,8 +343,6 @@ namespace Opm {
|
||||
/// return true if wells are available on this process
|
||||
bool localWellsActive() const { return well_model_.localWellsActive(); }
|
||||
|
||||
int numWellVars() const;
|
||||
|
||||
void
|
||||
makeConstantState(SolutionState& state) const;
|
||||
|
||||
|
@ -460,19 +460,6 @@ namespace detail {
|
||||
|
||||
|
||||
|
||||
template <class Grid, class WellModel, class Implementation>
|
||||
int
|
||||
BlackoilModelBase<Grid, WellModel, Implementation>::numWellVars() const
|
||||
{
|
||||
// For each well, we have a bhp variable, and one flux per phase.
|
||||
const int nw = wellModel().localWellsActive() ? wells().number_of_wells : 0;
|
||||
return (numPhases() + 1) * nw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class Grid, class WellModel, class Implementation>
|
||||
void
|
||||
BlackoilModelBase<Grid, WellModel, Implementation>::
|
||||
@ -1248,7 +1235,7 @@ namespace detail {
|
||||
varstart += dxvar.size();
|
||||
|
||||
// Extract well parts np phase rates + bhp
|
||||
const V dwells = subset(dx, Span(asImpl().numWellVars(), 1, varstart));
|
||||
const V dwells = subset(dx, Span(asImpl().wellModel().numWellVars(), 1, varstart));
|
||||
varstart += dwells.size();
|
||||
|
||||
assert(varstart == dx.size());
|
||||
|
@ -170,8 +170,6 @@ namespace Opm {
|
||||
SolutionState& state,
|
||||
WellState& well_state);
|
||||
|
||||
int numWellVars() const;
|
||||
|
||||
void
|
||||
makeConstantState(SolutionState& state) const;
|
||||
|
||||
|
@ -112,19 +112,6 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template <class Grid>
|
||||
int
|
||||
BlackoilMultiSegmentModel<Grid>::numWellVars() const
|
||||
{
|
||||
// For each segment, we have a pressure variable, and one flux per phase.
|
||||
const int nseg = wellModel().numSegment();
|
||||
return (numPhases() + 1) * nseg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class Grid>
|
||||
void
|
||||
BlackoilMultiSegmentModel<Grid>::makeConstantState(SolutionState& state) const
|
||||
|
@ -114,7 +114,9 @@ namespace Opm {
|
||||
|
||||
void setWellsActive(const bool wells_active) { wells_active_ = wells_active; };
|
||||
|
||||
bool localWellsActive() const { return ! wells_multisegment_.empty(); }
|
||||
bool localWellsActive() const { return ! wells_multisegment_.empty(); };
|
||||
|
||||
int numWellVars() const { return (num_phases_ + 1) * nseg_total_; };
|
||||
|
||||
template <class ReservoirResidualQuant, class SolutionState>
|
||||
void extractWellPerfProperties(const SolutionState& state,
|
||||
|
@ -81,6 +81,7 @@ namespace Opm {
|
||||
/// return true if wells are available on this process
|
||||
bool localWellsActive() const;
|
||||
|
||||
int numWellVars() const;
|
||||
|
||||
/// Density of each well perforation
|
||||
Vector& wellPerforationDensities(); // mutable version kept for BlackoilMultisegmentModel
|
||||
|
@ -145,6 +145,18 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
int
|
||||
StandardWells::numWellVars() const
|
||||
{
|
||||
// For each well, we have a bhp variable, and one flux per phase.
|
||||
const int nw = localWellsActive() ? wells().number_of_wells : 0;
|
||||
return (numPhases() + 1) * nw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const StandardWells::WellOps&
|
||||
StandardWells::wellOps() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user