GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/geomechanics/stressvariablescache.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 0 0 -%
Branches: 0 3 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 GeomechanicsModels
10 * \brief Base class for the stress variables cache
11 */
12 #ifndef DUMUX_GEOMECHANICS_STRESSVARIABLESCACHE_HH
13 #define DUMUX_GEOMECHANICS_STRESSVARIABLESCACHE_HH
14
15 #include <dune/common/exceptions.hh>
16
17 #include <dumux/discretization/method.hh>
18 #include <dumux/flux/fluxvariablescaching.hh>
19 #include <dumux/discretization/cvfe/fluxvariablescache.hh>
20
21 namespace Dumux {
22
23 /*!
24 * \ingroup GeomechanicsModels
25 * \brief The stress variables cache classes for models involving geomechanics.
26 * Store data required for stress calculation.
27 */
28 template< class Scalar, class GridGeometry, class DiscretizationMethod = typename GridGeometry::DiscretizationMethod >
29 class StressVariablesCache;
30
31 //! We only store discretization-related quantities for the box method.
32 template< class Scalar, class GridGeometry >
33
0/3
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
266424 class StressVariablesCache<Scalar, GridGeometry, DiscretizationMethods::Box>
34 : public CVFEFluxVariablesCache< Scalar, GridGeometry >
35 {};
36
37 // specialization for the cell centered tpfa method
38 template< class Scalar, class GridGeometry >
39 class StressVariablesCache<Scalar, GridGeometry, DiscretizationMethods::CCTpfa>
40 : public FluxVariablesCaching::_EmptyCache
41 {
42 public:
43 /*!
44 * \brief Currently, we do not consider cell-centered schemes for geomechanics.
45 * In case this is to be integrated, one would have to rethink the structure
46 * of e.g. the elastic volume variables and what quantities they store that
47 * are necessary for flux/stress evaluation. In the porous medium flow context we
48 * define permeabilities/thermal conductivities etc. in the volume variables
49 * and then do the harmonic average at scvf integration points during flux calculation.
50 * However, for the box scheme one could evaluate the parameters required for flux
51 * computations directly at the integration point without averaging. For compatibility
52 * reasons with cell-centered schemes, and because one can derive an expression for the
53 * harmonic average, we do not do so in the porous medium framework. For now, we choose
54 * a more FEM-like mentality in the geomechanics framework and call the parameters in the
55 * spatial parameters, required for stress calculations, for a position in the element
56 * when assembling the stress tensors. We do not store them in the volume variables! This
57 * means that in case cell-centered geomechanical models are considered in the future, both
58 * the volume variables as well as the stress tensor assembly laws have to be restructured!
59 */
60 template<typename... Args>
61 void update(Args&&... args)
62 { DUNE_THROW(Dune::NotImplemented, "Geomechanics with cell-centered schemes"); }
63 };
64
65 // specialization for the cell centered mpfa method
66 template< class Scalar, class GridGeometry >
67 class StressVariablesCache<Scalar, GridGeometry, DiscretizationMethods::CCMpfa>
68 : public StressVariablesCache<Scalar, GridGeometry, DiscretizationMethods::CCTpfa>
69 {};
70
71 } // end namespace Dumux
72
73 #endif
74