3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
scalarvolumevariables.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_NAVIERSTOKES_SCALAR_CONSERVATION_MODEL_VOLUME_VARIABLES_HH
25#define DUMUX_NAVIERSTOKES_SCALAR_CONSERVATION_MODEL_VOLUME_VARIABLES_HH
26
28
29namespace Dumux {
30
35template <class Traits>
37{
38 using Scalar = typename Traits::PrimaryVariables::value_type;
39
40public:
42 using PrimaryVariables = typename Traits::PrimaryVariables;
44 using Indices = typename Traits::ModelTraits::Indices;
46 using FluidSystem = typename Traits::FluidSystem;
48 using FluidState = typename Traits::FluidState;
49
51 static constexpr int numFluidPhases() { return Traits::ModelTraits::numFluidPhases(); }
53 static constexpr int numFluidComponents() { return Traits::ModelTraits::numFluidComponents(); }
54
64 template<class ElementSolution, class Problem, class Element, class SubControlVolume>
65 void update(const ElementSolution& elemSol,
66 const Problem& problem,
67 const Element& element,
68 const SubControlVolume& scv)
69 {
70 priVars_ = elemSol[scv.indexInElement()];
71 extrusionFactor_ = Deprecated::extrusionFactor(problem, element, scv, elemSol);
72 }
73
83 Scalar extrusionFactor() const
84 { return extrusionFactor_; }
85
91 Scalar priVar(const int pvIdx) const
92 { return priVars_[pvIdx]; }
93
98 { return priVars_; }
99
100protected:
103};
104
105} // end namespace Dumux
106
107#endif // DUMUX_NAVIERSTOKES_MOMENTUM_VOLUME_VARIABLES_HH
Helpers for deprecation.
Definition: adapt.hh:29
Volume variables for the single-phase Navier-Stokes model.
Definition: scalarvolumevariables.hh:37
typename Traits::FluidSystem FluidSystem
Export the underlying fluid system.
Definition: scalarvolumevariables.hh:46
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: scalarvolumevariables.hh:53
typename Traits::FluidState FluidState
Export the fluid state type.
Definition: scalarvolumevariables.hh:48
typename Traits::PrimaryVariables PrimaryVariables
export the type used for the primary variables
Definition: scalarvolumevariables.hh:42
Scalar extrusionFactor_
Definition: scalarvolumevariables.hh:102
typename Traits::ModelTraits::Indices Indices
export the indices type
Definition: scalarvolumevariables.hh:44
PrimaryVariables priVars_
Definition: scalarvolumevariables.hh:101
Scalar extrusionFactor() const
Return how much the sub-control volume is extruded.
Definition: scalarvolumevariables.hh:83
const PrimaryVariables & priVars() const
Return the primary variable vector.
Definition: scalarvolumevariables.hh:97
Scalar priVar(const int pvIdx) const
Return a component of primary variable vector.
Definition: scalarvolumevariables.hh:91
static constexpr int numFluidPhases()
Return number of phases considered by the model.
Definition: scalarvolumevariables.hh:51
void update(const ElementSolution &elemSol, const Problem &problem, const Element &element, const SubControlVolume &scv)
Update all quantities for a given control volume.
Definition: scalarvolumevariables.hh:65