mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 09:10:59 -06:00
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:
parent
21bb4dc955
commit
033718f027
@ -130,6 +130,17 @@ void StandardWellEquations<Scalar,numEq>::apply(const BVector& x, BVector& Ax) c
|
|||||||
duneC_.mmtv(invDBx, Ax);
|
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) \
|
#define INSTANCE(N) \
|
||||||
template class StandardWellEquations<double,N>;
|
template class StandardWellEquations<double,N>;
|
||||||
|
|
||||||
|
@ -76,6 +76,9 @@ public:
|
|||||||
//! \brief Apply linear operator to vector.
|
//! \brief Apply linear operator to vector.
|
||||||
void apply(const BVector& x, BVector& Ax) const;
|
void apply(const BVector& x, BVector& Ax) const;
|
||||||
|
|
||||||
|
//! \brief Apply linear operator to vector.
|
||||||
|
void apply(BVector& r) const;
|
||||||
|
|
||||||
// two off-diagonal matrices
|
// two off-diagonal matrices
|
||||||
OffDiagMatWell duneB_;
|
OffDiagMatWell duneB_;
|
||||||
OffDiagMatWell duneC_;
|
OffDiagMatWell duneC_;
|
||||||
|
@ -1736,12 +1736,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
if (!this->isOperableAndSolvable() && !this->wellIsStopped()) return;
|
if (!this->isOperableAndSolvable() && !this->wellIsStopped()) return;
|
||||||
|
|
||||||
assert(this->linSys_.invDrw_.size() == this->linSys_.invDuneD_.N());
|
this->linSys_.apply(r);
|
||||||
|
|
||||||
// invDrw_ = invDuneD_ * resWell_
|
|
||||||
this->linSys_.invDuneD_.mv(this->linSys_.resWell_, this->linSys_.invDrw_);
|
|
||||||
// r = r - duneC_^T * invDrw_
|
|
||||||
this->linSys_.duneC_.mmtv(this->linSys_.invDrw_, r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
|
Loading…
Reference in New Issue
Block a user