mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Bugfix: extra swap was done on odd number of sweeps
This commit is contained in:
parent
48ebef7808
commit
dba20adf04
@ -343,8 +343,8 @@ namespace bda
|
|||||||
std::swap(Ut->nnzValues, Utmp);
|
std::swap(Ut->nnzValues, Utmp);
|
||||||
} // end sweep
|
} // end sweep
|
||||||
|
|
||||||
// if number of sweeps is odd, swap again so data is in Lmat->nnzValues
|
// if number of sweeps is even, swap again so data is in Lmat->nnzValues
|
||||||
if (num_sweeps % 2 == 1) {
|
if (num_sweeps % 2 == 0) {
|
||||||
std::swap(Lmat->nnzValues, Ltmp);
|
std::swap(Lmat->nnzValues, Ltmp);
|
||||||
std::swap(Ut->nnzValues, Utmp);
|
std::swap(Ut->nnzValues, Utmp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user