mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 18:50:19 -06:00
Merge pull request #5675 from jakobtorben/fix_memory_bug_in_setPrimaryVars_for_msw
Fix memory bug in setPrimaryVars for MSW
This commit is contained in:
commit
98513d92f9
@ -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