added: StandardWellEquations::solve()

this applies the inverted D matrix to the residual vector.
use the new method in the well implementation.
This commit is contained in:
Arne Morten Kvarving 2022-11-11 21:41:24 +01:00
parent 83c41e3f9c
commit daf0f90fe5
3 changed files with 10 additions and 1 deletions

View File

@ -160,6 +160,12 @@ void StandardWellEquations<Scalar,numEq>::invert()
}
}
template<class Scalar, int numEq>
void StandardWellEquations<Scalar,numEq>::solve(BVectorWell& dx_well) const
{
invDuneD_.mv(resWell_, dx_well);
}
#define INSTANCE(N) \
template class StandardWellEquations<double,N>;

View File

@ -79,6 +79,9 @@ public:
//! \brief Apply linear operator to vector.
void apply(BVector& r) const;
//! \brief Apply inverted D matrix to residual and store in vector.
void solve(BVectorWell& dx_well) const;
//! \brief Invert D matrix.
void invert();

View File

@ -1679,7 +1679,7 @@ namespace Opm
// which is why we do not put the assembleWellEq here.
BVectorWell dx_well(1);
dx_well[0].resize(this->numWellEq_);
this->linSys_.invDuneD_.mv(this->linSys_.resWell_, dx_well);
this->linSys_.solve( dx_well);
updateWellState(dx_well, well_state, deferred_logger);
}