Merge pull request #1108 from andlaus/apply_wells_in_assemble

BlackoilModelEbos: apply the well residual in assemble()
This commit is contained in:
Atgeirr Flø Rasmussen 2017-03-20 08:44:32 +01:00 committed by GitHub
commit 0b0ef7e20f

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;