mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding applySolutionWellState to apply solution from reservoir
to update well state. With this way, the BlackoilModelEbos does not need to know the data type assocated with different well type. It is not well tested yet.
This commit is contained in:
@@ -1904,4 +1904,36 @@ namespace Opm
|
||||
duneC_.mmtv(invDrw_, r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
recoverSolutionWell(const BVector& x, BVector& xw) const
|
||||
{
|
||||
BVector resWell = resWell_;
|
||||
// resWell = resWell - B * x
|
||||
duneB_.mmv(x, resWell);
|
||||
// xw = D^-1 * resWell
|
||||
invDuneD_.mv(resWell, xw);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
applySolutionWellState(const BVector& x,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state) const
|
||||
{
|
||||
BVector xw(1);
|
||||
recoverSolutionWell(x, xw);
|
||||
updateWellState(xw, param, well_state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user