version 3.10-dev
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// 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_FLUXVAR_CACHING_HH
13#define DUMUX_DISCRETIZATION_FLUXVAR_CACHING_HH
14
15namespace Dumux {
16namespace FluxVariablesCaching {
17
20{
21 EmptyCacheFiller() = default;
22
23 template<class Problem>
24 EmptyCacheFiller(const Problem& p) {}
25
26 static constexpr bool isSolDependent = false; // the cache is empty
27
28 template<typename... Args>
29 static void fill(Args&&... args) {}
30};
31
33template<class S>
35{
37 using Scalar = S;
38
39 template<typename... Args>
40 void update(Args&&... args) {}
41};
42
43#ifndef DOXYGEN // hide the empty caches from doxygen
44// an empty cache filler
45// \note Never use the _EmptyCache directly as it lead to ambiguous definitions
46struct _EmptyCache
47{ using Filler = EmptyCacheFiller; };
48#endif // DOXYGEN
49
54struct EmptyAdvectionCache : public _EmptyCache {};
55struct EmptyDiffusionCache : public _EmptyCache {};
56struct EmptyHeatConductionCache : public _EmptyCache {};
57
58} // end namespace FluxVariablesCaching
59} // end namespace Dumux
60
61#endif
Definition: adapt.hh:17
Empty caches to use in a constitutive flux law/process, e.g. Darcy's law.
Definition: fluxvariablescaching.hh:54
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:20
EmptyCacheFiller(const Problem &p)
Definition: fluxvariablescaching.hh:24
static constexpr bool isSolDependent
Definition: fluxvariablescaching.hh:26
static void fill(Args &&... args)
Definition: fluxvariablescaching.hh:29
An empty flux variables cache.
Definition: fluxvariablescaching.hh:35
S Scalar
export type used for scalar values
Definition: fluxvariablescaching.hh:37
void update(Args &&... args)
Definition: fluxvariablescaching.hh:40
Definition: fluxvariablescaching.hh:55
Definition: fluxvariablescaching.hh:56