mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: MultisegmentWellEquations::solve()
this applies the inverted D matrix to the residual vector. use the new method in the well implementation.
This commit is contained in:
parent
a7cb444328
commit
bc312d1117
@ -161,6 +161,13 @@ void MultisegmentWellEquations<Scalar,numWellEq,numEq>::createSolver()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Scalar, int numWellEq, int numEq>
|
||||||
|
typename MultisegmentWellEquations<Scalar,numWellEq,numEq>::BVectorWell
|
||||||
|
MultisegmentWellEquations<Scalar,numWellEq,numEq>::solve() const
|
||||||
|
{
|
||||||
|
return mswellhelpers::applyUMFPack(*duneDSolver_, resWell_);
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANCE(numWellEq, numEq) \
|
#define INSTANCE(numWellEq, numEq) \
|
||||||
template class MultisegmentWellEquations<double,numWellEq,numEq>;
|
template class MultisegmentWellEquations<double,numWellEq,numEq>;
|
||||||
|
|
||||||
|
@ -83,6 +83,9 @@ public:
|
|||||||
//! \brief Compute the LU-decomposition of D matrix.
|
//! \brief Compute the LU-decomposition of D matrix.
|
||||||
void createSolver();
|
void createSolver();
|
||||||
|
|
||||||
|
//! \brief Apply inverted D matrix to residual and return result.
|
||||||
|
BVectorWell solve() const;
|
||||||
|
|
||||||
// two off-diagonal matrices
|
// two off-diagonal matrices
|
||||||
OffDiagMatWell duneB_;
|
OffDiagMatWell duneB_;
|
||||||
OffDiagMatWell duneC_;
|
OffDiagMatWell duneC_;
|
||||||
|
@ -519,8 +519,7 @@ namespace Opm
|
|||||||
|
|
||||||
// We assemble the well equations, then we check the convergence,
|
// We assemble the well equations, then we check the convergence,
|
||||||
// which is why we do not put the assembleWellEq here.
|
// which is why we do not put the assembleWellEq here.
|
||||||
const BVectorWell dx_well = mswellhelpers::applyUMFPack(*this->linSys_.duneDSolver_,
|
const BVectorWell dx_well = this->linSys_.solve();
|
||||||
this->linSys_.resWell_);
|
|
||||||
|
|
||||||
updateWellState(dx_well, well_state, deferred_logger);
|
updateWellState(dx_well, well_state, deferred_logger);
|
||||||
}
|
}
|
||||||
@ -1495,8 +1494,7 @@ namespace Opm
|
|||||||
|
|
||||||
assembleWellEqWithoutIteration(ebosSimulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);
|
assembleWellEqWithoutIteration(ebosSimulator, dt, inj_controls, prod_controls, well_state, group_state, deferred_logger);
|
||||||
|
|
||||||
const BVectorWell dx_well = mswellhelpers::applyUMFPack(*this->linSys_.duneDSolver_,
|
const BVectorWell dx_well = this->linSys_.solve();
|
||||||
this->linSys_.resWell_);
|
|
||||||
|
|
||||||
if (it > this->param_.strict_inner_iter_wells_) {
|
if (it > this->param_.strict_inner_iter_wells_) {
|
||||||
relax_convergence = true;
|
relax_convergence = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user