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:
Kai Bao
2017-07-21 15:30:34 +02:00
parent 07f563a1e1
commit ab67635134
6 changed files with 60 additions and 15 deletions

View File

@@ -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);
}
}