mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix vector sizing bug.
This commit is contained in:
parent
143b213f53
commit
52d035940e
@ -466,8 +466,7 @@ namespace detail {
|
|||||||
BlackoilModelBase<Grid, Implementation>::variableStateIndices() const
|
BlackoilModelBase<Grid, Implementation>::variableStateIndices() const
|
||||||
{
|
{
|
||||||
assert(active_[Oil]);
|
assert(active_[Oil]);
|
||||||
const int np = fluid_.numPhases();
|
std::vector<int> indices(5, -1);
|
||||||
std::vector<int> indices(np + 2, -1);
|
|
||||||
int next = 0;
|
int next = 0;
|
||||||
indices[Pressure] = next++;
|
indices[Pressure] = next++;
|
||||||
if (active_[Water]) {
|
if (active_[Water]) {
|
||||||
@ -478,7 +477,7 @@ namespace detail {
|
|||||||
}
|
}
|
||||||
indices[Qs] = next++;
|
indices[Qs] = next++;
|
||||||
indices[Bhp] = next++;
|
indices[Bhp] = next++;
|
||||||
assert(next == np + 2);
|
assert(next == fluid_.numPhases() + 2);
|
||||||
return indices;
|
return indices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user