mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
avoiding creating dx_V unnecessarily
by using dx.array() in function solveWellEq().
This commit is contained in:
parent
919286d700
commit
f2089f5a1b
@ -1266,10 +1266,7 @@ namespace detail {
|
||||
const std::vector<M>& Jn = total_residual.derivative();
|
||||
const Eigen::SparseLU< M > solver(Jn[0]);
|
||||
const Eigen::VectorXd& dx = solver.solve(total_residual.value().matrix());
|
||||
const int numeq = well_state.numWells()*(well_state.numPhases()+1);
|
||||
V dx_V = V(numeq);
|
||||
std::copy_n(dx.data(), numeq, dx_V.data());
|
||||
updateWellState(dx_V, well_state);
|
||||
updateWellState(dx.array(), well_state);
|
||||
updateWellControls(well_state);
|
||||
|
||||
} while (it < 15);
|
||||
|
Loading…
Reference in New Issue
Block a user