added: StandardWellEquations::apply(r)

this applies the equation system to a 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 21bb4dc955
commit 033718f027
3 changed files with 15 additions and 6 deletions

View File

@@ -130,6 +130,17 @@ void StandardWellEquations<Scalar,numEq>::apply(const BVector& x, BVector& Ax) c
duneC_.mmtv(invDBx, Ax);
}
template<class Scalar, int numEq>
void StandardWellEquations<Scalar,numEq>::apply(BVector& r) const
{
assert(invDrw_.size() == invDuneD_.N());
// invDrw_ = invDuneD_ * resWell_
invDuneD_.mv(resWell_, invDrw_);
// r = r - duneC_^T * invDrw_
duneC_.mmtv(invDrw_, r);
}
#define INSTANCE(N) \
template class StandardWellEquations<double,N>;