mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
Fix memory bug in setPrimaryVars for MSW
This commit is contained in:
parent
af93859a29
commit
e2ac43b76f
@ -2237,7 +2237,7 @@ namespace Opm
|
||||
constexpr int num_eq = MSWEval::numWellEq;
|
||||
std::array<Scalar, num_eq> tmp;
|
||||
for (int ii = 0; ii < num_seg; ++ii) {
|
||||
const auto start = it + num_seg * num_eq;
|
||||
const auto start = it + ii * num_eq;
|
||||
std::copy(start, start + num_eq, tmp.begin());
|
||||
this->primary_variables_.setValue(ii, tmp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user