3.5-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 template<typename... Args>
52 void update(Args&&... args) {}
53};
54
55#ifndef DOXYGEN // hide the empty caches from doxygen
56// an empty cache filler
57// \note Never use the _EmptyCache directly as it lead to ambiguous definitions
58struct _EmptyCache
59{ using Filler = EmptyCacheFiller; };
60#endif // DOXYGEN
61
66struct EmptyAdvectionCache : public _EmptyCache {};
67struct EmptyDiffusionCache : public _EmptyCache {};
68struct EmptyHeatConductionCache : public _EmptyCache {};
69
70} // end namespace FluxVariablesCaching
71} // end namespace Dumux
72
73#endif
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
void update(Args &&... args)
Definition: fluxvariablescaching.hh:52
Empty caches to use in a constitutive flux law/process, e.g. Darcy's law.
Definition: fluxvariablescaching.hh:66
Definition: fluxvariablescaching.hh:67
Definition: fluxvariablescaching.hh:68