mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Check which each well whether to call apply for well contributions.
This allows for different implementations of wells in well_container when adding well contributions to the matrix.
This commit is contained in:
parent
455cf79d8d
commit
e53374b8ec
@ -321,13 +321,15 @@ namespace Opm {
|
||||
apply(const BVector& x, BVector& Ax) const
|
||||
{
|
||||
// TODO: do we still need localWellsActive()?
|
||||
if ( ! localWellsActive() ||
|
||||
well_container_[0]->jacobianContainsWellContributions() ) {
|
||||
if ( ! localWellsActive() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto& well : well_container_) {
|
||||
well->apply(x, Ax);
|
||||
if ( ! well->jacobianContainsWellContributions() )
|
||||
{
|
||||
well->apply(x, Ax);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,8 +343,7 @@ namespace Opm {
|
||||
BlackoilWellModel<TypeTag>::
|
||||
applyScaleAdd(const Scalar alpha, const BVector& x, BVector& Ax) const
|
||||
{
|
||||
if ( ! localWellsActive() ||
|
||||
well_container_[0]->jacobianContainsWellContributions() ) {
|
||||
if ( ! localWellsActive() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user