GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/flux/fluxvariablescaching.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 122 0.0%
Branches: 0 0 -%

Line Branch Exec Source
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 //
7 /*!
8 * \file
9 * \ingroup Flux
10 * \brief Classes related to flux variables caching
11 */
12 #ifndef DUMUX_DISCRETIZATION_FLUXVAR_CACHING_HH
13 #define DUMUX_DISCRETIZATION_FLUXVAR_CACHING_HH
14
15 namespace Dumux {
16 namespace FluxVariablesCaching {
17
18 //! The empty filler class corresponding to EmptyCache
19 struct EmptyCacheFiller
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
32 //! An empty flux variables cache
33 template<class S>
34 struct EmptyCache
35 {
36 //! export type used for scalar values
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
46 struct _EmptyCache
47 { using Filler = EmptyCacheFiller; };
48 #endif // DOXYGEN
49
50 /*!
51 * \ingroup Flux
52 * \brief Empty caches to use in a constitutive flux law/process, e.g. Darcy's law
53 */
54 struct EmptyAdvectionCache : public _EmptyCache {};
55 struct EmptyDiffusionCache : public _EmptyCache {};
56 struct EmptyHeatConductionCache : public _EmptyCache {};
57
58 } // end namespace FluxVariablesCaching
59 } // end namespace Dumux
60
61 #endif
62