GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/test/geomechanics/elastic/spatialparams.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 7 8 87.5%
Functions: 1 2 50.0%
Branches: 3 12 25.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 GeomechanicsTests
10 * \brief Definition of the spatial parameters for the linear elasticity problem.
11 */
12
13 #ifndef DUMUX_ELASTIC_SPATIAL_PARAMS_HH
14 #define DUMUX_ELASTIC_SPATIAL_PARAMS_HH
15
16 #include <dumux/geomechanics/lameparams.hh>
17 #include <dumux/geomechanics/elastic/fvspatialparams.hh>
18
19 namespace Dumux {
20
21 /*!
22 * \ingroup GeomechanicsTests
23 * \brief Definition of the spatial parameters for the linear elasticity problem.
24 */
25 template<class Scalar, class GridGeometry>
26
1/6
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
1 class ElasticSpatialParams : public FVElasticSpatialParams< GridGeometry,
27 Scalar,
28 ElasticSpatialParams<Scalar, GridGeometry> >
29 {
30 using ThisType = ElasticSpatialParams<Scalar, GridGeometry>;
31 using ParentType = FVElasticSpatialParams<GridGeometry, Scalar, ThisType>;
32
33 using SubControlVolume = typename GridGeometry::SubControlVolume;
34 using GridView = typename GridGeometry::GridView;
35 using Element = typename GridView::template Codim<0>::Entity;
36 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
37
38 public:
39 //! Export the type of the lame parameters
40 using LameParams = Dumux::LameParams<Scalar>;
41
42 1 ElasticSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
43
2/6
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
1 : ParentType(gridGeometry)
44 {
45 1 lameParams_.setLambda(3e9);
46 2 lameParams_.setMu(3e9);
47 1 }
48
49 //! Defines the Lame parameters.
50 const LameParams& lameParamsAtPos(const GlobalPosition& globalPos) const
51 15048 { return lameParams_; }
52
53 private:
54 LameParams lameParams_;
55 };
56 } // end namespace Dumux
57 #endif
58