mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-04 13:36:57 -06:00
Merge pull request #1108 from andlaus/apply_wells_in_assemble
BlackoilModelEbos: apply the well residual in assemble()
This commit is contained in:
commit
0b0ef7e20f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user