mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make numWellVars work for null well pointers.
This commit is contained in:
parent
1a1797a061
commit
b4feb28389
@ -153,8 +153,13 @@ namespace Opm
|
|||||||
int
|
int
|
||||||
StandardWells::numWellVars() const
|
StandardWells::numWellVars() const
|
||||||
{
|
{
|
||||||
|
if ( !localWellsActive() )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// For each well, we have a bhp variable, and one flux per phase.
|
// For each well, we have a bhp variable, and one flux per phase.
|
||||||
const int nw = localWellsActive() ? wells().number_of_wells : 0;
|
const int nw = wells().number_of_wells;
|
||||||
return (numPhases() + 1) * nw;
|
return (numPhases() + 1) * nw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user