3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fluxvariablescaching.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_DISCRETIZATION_FLUXVAR_CACHING_HH
25#define DUMUX_DISCRETIZATION_FLUXVAR_CACHING_HH
26
27namespace Dumux {
28namespace FluxVariablesCaching {
29
32{
33 EmptyCacheFiller() = default;
34
35 template<class Problem>
36 EmptyCacheFiller(const Problem& p) {}
37
38 static constexpr bool isSolDependent = false; // the cache is empty
39
40 template<typename... Args>
41 static void fill(Args&&... args) {}
42};
43
45template<class S>
47{
49 using Scalar = S;
50};
51
52#ifndef DOXYGEN // hide the empty caches from doxygen
53// an empty cache filler
54// \note Never use the _EmptyCache directly as it lead to ambiguous definitions
55struct _EmptyCache
56{ using Filler = EmptyCacheFiller; };
57#endif // DOXYGEN
58
63struct EmptyAdvectionCache : public _EmptyCache {};
64struct EmptyDiffusionCache : public _EmptyCache {};
65struct EmptyHeatConductionCache : public _EmptyCache {};
66
67} // end namespace FluxVariablesCaching
68} // end namespace Dumux
69
70#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:32
EmptyCacheFiller(const Problem &p)
Definition: fluxvariablescaching.hh:36
static constexpr bool isSolDependent
Definition: fluxvariablescaching.hh:38
static void fill(Args &&... args)
Definition: fluxvariablescaching.hh:41
An empty flux variables cache.
Definition: fluxvariablescaching.hh:47
S Scalar
export type used for scalar values
Definition: fluxvariablescaching.hh:49
Empty caches to use in a constitutive flux law/process, e.g. Darcy's law.
Definition: fluxvariablescaching.hh:63
Definition: fluxvariablescaching.hh:64
Definition: fluxvariablescaching.hh:65