BlackoilModelEbos: apply the well residual in assemble()

This used to be done in solveJacobianSystem(), but this method is only
supposed to solve the linearized system of equations, not to modify it
IMO.

I tested this patch with Norne: It did not change anything.
This commit is contained in:
Andreas Lauser 2017-03-17 11:39:41 +01:00
parent d700f3e946
commit 093310c437

View File

@ -377,6 +377,10 @@ namespace Opm {
try
{
report = wellModel().assemble(ebosSimulator_, iterationIdx, dt, well_state);
// apply well residual to the residual.
auto& ebosResid = ebosSimulator_.model().linearizer().residual();
wellModel().apply(ebosResid);
}
catch ( const Dune::FMatrixError& e )
{
@ -460,12 +464,6 @@ namespace Opm {
const auto& ebosJac = ebosSimulator_.model().linearizer().matrix();
auto& ebosResid = ebosSimulator_.model().linearizer().residual();
if( xw.size() > 0 )
{
// apply well residual to the residual.
wellModel().apply(ebosResid);
}
// set initial guess
x = 0.0;