Add single-AD quantity select() method.

Also make comments into Doxygen comments.
This commit is contained in:
Atgeirr Flø Rasmussen 2013-05-07 10:06:22 +02:00
parent f83c03de63
commit e217b70ee0

View File

@ -141,6 +141,8 @@ namespace {
// -------------------- upwinding helper class --------------------
/// Upwind selection in absence of counter-current flow (i.e.,
/// without effects of gravity and/or capillary pressure).
template <typename Scalar>
class UpwindSelectorTotalFlux {
public:
@ -174,14 +176,10 @@ namespace {
select_.setFromTriplets(s.begin(), s.end());
}
// Upwind selection in absence of counter-current flow (i.e.,
// without effects of gravity and/or capillary pressure).
/// Apply selector to multiple per-cell quantities.
std::vector<ADB>
select(const std::vector<ADB>& xc) const
{
// Apply selector.
//
// Absence of counter-current flow means that the same
// selector applies to all quantities, 'x', defined per
// cell.
@ -195,6 +193,12 @@ namespace {
return xf;
}
/// Apply selector to single per-cell quantity.
ADB select(const ADB& xc) const
{
return select_*xc;
}
private:
typename ADB::M select_;
};