Fix vector sizing bug.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-05-26 11:41:34 +02:00
parent 143b213f53
commit 52d035940e

View File

@ -466,8 +466,7 @@ namespace detail {
BlackoilModelBase<Grid, Implementation>::variableStateIndices() const
{
assert(active_[Oil]);
const int np = fluid_.numPhases();
std::vector<int> indices(np + 2, -1);
std::vector<int> indices(5, -1);
int next = 0;
indices[Pressure] = next++;
if (active_[Water]) {
@ -478,7 +477,7 @@ namespace detail {
}
indices[Qs] = next++;
indices[Bhp] = next++;
assert(next == np + 2);
assert(next == fluid_.numPhases() + 2);
return indices;
}