version 3.8
fluxvariablesbase.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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_DISCRETIZATION_FLUXVARIABLESBASE_HH
13#define DUMUX_DISCRETIZATION_FLUXVARIABLESBASE_HH
14
15#include <vector>
16
17namespace Dumux {
18
28template<class Problem,
29 class FVElementGeometry,
30 class ElementVolumeVariables,
31 class ElementFluxVariablesCache>
33{
34 using GridView = typename FVElementGeometry::GridGeometry::GridView;
35 using Element = typename GridView::template Codim<0>::Entity;
36 using Stencil = std::vector<std::size_t>;
37 using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
38
39public:
40
42 void init(const Problem& problem,
43 const Element& element,
44 const FVElementGeometry& fvGeometry,
45 const ElementVolumeVariables& elemVolVars,
46 const SubControlVolumeFace &scvFace,
47 const ElementFluxVariablesCache& elemFluxVarsCache)
48 {
49 problemPtr_ = &problem;
50 elementPtr_ = &element;
51 scvFacePtr_ = &scvFace;
52 fvGeometryPtr_ = &fvGeometry;
53 elemVolVarsPtr_ = &elemVolVars;
54 elemFluxVarsCachePtr_ = &elemFluxVarsCache;
55 }
56
57 const Problem& problem() const
58 { return *problemPtr_; }
59
60 const Element& element() const
61 { return *elementPtr_; }
62
63 const SubControlVolumeFace& scvFace() const
64 { return *scvFacePtr_; }
65
66 const FVElementGeometry& fvGeometry() const
67 { return *fvGeometryPtr_; }
68
69 const ElementVolumeVariables& elemVolVars() const
70 { return *elemVolVarsPtr_; }
71
72 const ElementFluxVariablesCache& elemFluxVarsCache() const
73 { return *elemFluxVarsCachePtr_; }
74
75private:
76 const Problem* problemPtr_;
77 const Element* elementPtr_;
78 const FVElementGeometry* fvGeometryPtr_;
79 const SubControlVolumeFace* scvFacePtr_;
80 const ElementVolumeVariables* elemVolVarsPtr_;
81 const ElementFluxVariablesCache* elemFluxVarsCachePtr_;
82};
83
84} // end namespace Dumux
85
86#endif
Base class for the flux variables living on a sub control volume face.
Definition: fluxvariablesbase.hh:33
const ElementVolumeVariables & elemVolVars() const
Definition: fluxvariablesbase.hh:69
const SubControlVolumeFace & scvFace() const
Definition: fluxvariablesbase.hh:63
const ElementFluxVariablesCache & elemFluxVarsCache() const
Definition: fluxvariablesbase.hh:72
void init(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvFace, const ElementFluxVariablesCache &elemFluxVarsCache)
Initialize the flux variables storing some temporary pointers.
Definition: fluxvariablesbase.hh:42
const FVElementGeometry & fvGeometry() const
Definition: fluxvariablesbase.hh:66
const Element & element() const
Definition: fluxvariablesbase.hh:60
const Problem & problem() const
Definition: fluxvariablesbase.hh:57
Definition: adapt.hh:17