mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add single-AD quantity select() method.
Also make comments into Doxygen comments.
This commit is contained in:
parent
f83c03de63
commit
e217b70ee0
@ -141,6 +141,8 @@ namespace {
|
|||||||
// -------------------- upwinding helper class --------------------
|
// -------------------- upwinding helper class --------------------
|
||||||
|
|
||||||
|
|
||||||
|
/// Upwind selection in absence of counter-current flow (i.e.,
|
||||||
|
/// without effects of gravity and/or capillary pressure).
|
||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
class UpwindSelectorTotalFlux {
|
class UpwindSelectorTotalFlux {
|
||||||
public:
|
public:
|
||||||
@ -174,14 +176,10 @@ namespace {
|
|||||||
select_.setFromTriplets(s.begin(), s.end());
|
select_.setFromTriplets(s.begin(), s.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upwind selection in absence of counter-current flow (i.e.,
|
/// Apply selector to multiple per-cell quantities.
|
||||||
// without effects of gravity and/or capillary pressure).
|
|
||||||
std::vector<ADB>
|
std::vector<ADB>
|
||||||
select(const std::vector<ADB>& xc) const
|
select(const std::vector<ADB>& xc) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// Apply selector.
|
|
||||||
//
|
|
||||||
// Absence of counter-current flow means that the same
|
// Absence of counter-current flow means that the same
|
||||||
// selector applies to all quantities, 'x', defined per
|
// selector applies to all quantities, 'x', defined per
|
||||||
// cell.
|
// cell.
|
||||||
@ -195,6 +193,12 @@ namespace {
|
|||||||
return xf;
|
return xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Apply selector to single per-cell quantity.
|
||||||
|
ADB select(const ADB& xc) const
|
||||||
|
{
|
||||||
|
return select_*xc;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typename ADB::M select_;
|
typename ADB::M select_;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user