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 PorousmediumflowModels | ||
10 | * \brief Base class for the model specific class which provides | ||
11 | * access to all volume averaged quantities. | ||
12 | */ | ||
13 | |||
14 | #ifndef DUMUX_POROUSMEDIUMFLOW_VOLUME_VARIABLES_HH | ||
15 | #define DUMUX_POROUSMEDIUMFLOW_VOLUME_VARIABLES_HH | ||
16 | |||
17 | namespace Dumux { | ||
18 | |||
19 | /*! | ||
20 | * \ingroup PorousmediumflowModels | ||
21 | * \brief The isothermal base class. | ||
22 | * | ||
23 | * \tparam Traits The volume variables traits | ||
24 | * \tparam Impl The implementation of the volume variables | ||
25 | */ | ||
26 | template<class Traits> | ||
27 |
41/52✓ Branch 0 taken 246084 times.
✓ Branch 1 taken 871967 times.
✓ Branch 2 taken 246084 times.
✓ Branch 3 taken 301951 times.
✓ Branch 4 taken 714898 times.
✓ Branch 5 taken 74448 times.
✓ Branch 6 taken 283482 times.
✓ Branch 7 taken 119814 times.
✓ Branch 8 taken 155040 times.
✓ Branch 9 taken 64349 times.
✓ Branch 10 taken 120234 times.
✓ Branch 11 taken 107360 times.
✓ Branch 12 taken 198901 times.
✓ Branch 13 taken 265539 times.
✓ Branch 14 taken 183484 times.
✓ Branch 15 taken 738479 times.
✓ Branch 16 taken 165011 times.
✓ Branch 17 taken 1210539 times.
✓ Branch 18 taken 1491951 times.
✓ Branch 19 taken 4312 times.
✓ Branch 20 taken 2064235 times.
✓ Branch 21 taken 7368 times.
✓ Branch 22 taken 24 times.
✓ Branch 23 taken 12191092 times.
✓ Branch 24 taken 77648 times.
✓ Branch 25 taken 15708 times.
✓ Branch 26 taken 12249648 times.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✓ Branch 29 taken 1125634 times.
✗ Branch 30 not taken.
✓ Branch 31 taken 517000 times.
✓ Branch 32 taken 609154 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 520 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 40 times.
✓ Branch 37 taken 80 times.
✓ Branch 38 taken 40 times.
✓ Branch 39 taken 80 times.
✓ Branch 40 taken 8112 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 8112 times.
✗ Branch 43 not taken.
✓ Branch 45 taken 97376 times.
✗ Branch 46 not taken.
✓ Branch 48 taken 97376 times.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✓ Branch 51 taken 1354 times.
✗ Branch 52 not taken.
✓ Branch 53 taken 1354 times.
|
379084813 | class PorousMediumFlowVolumeVariables |
28 | { | ||
29 | using Scalar = typename Traits::PrimaryVariables::value_type; | ||
30 | |||
31 | public: | ||
32 | //! Export the type used for the primary variables | ||
33 | using PrimaryVariables = typename Traits::PrimaryVariables; | ||
34 | //! Export the type encapsulating primary variable indices | ||
35 | using Indices = typename Traits::ModelTraits::Indices; | ||
36 | |||
37 | //! Return number of phases considered by the model | ||
38 | static constexpr int numFluidPhases() { return Traits::ModelTraits::numFluidPhases(); } | ||
39 | //! Return number of components considered by the model | ||
40 | static constexpr int numFluidComponents() { return Traits::ModelTraits::numFluidComponents(); } | ||
41 | |||
42 | /*! | ||
43 | * \brief Updates all quantities for a given control volume. | ||
44 | * | ||
45 | * \param elemSol A vector containing all primary variables connected to the element | ||
46 | * \param problem The object specifying the problem which ought to | ||
47 | * be simulated | ||
48 | * \param element An element which contains part of the control volume | ||
49 | * \param scv The sub-control volume | ||
50 | */ | ||
51 | template<class ElemSol, class Problem, class Element, class Scv> | ||
52 | ✗ | void update(const ElemSol& elemSol, | |
53 | const Problem& problem, | ||
54 | const Element& element, | ||
55 | const Scv& scv) | ||
56 | { | ||
57 |
0/4✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
313983032 | priVars_ = elemSol[scv.localDofIndex()]; |
58 |
37/69✓ Branch 0 taken 9003000 times.
✓ Branch 1 taken 6435736 times.
✓ Branch 2 taken 9003000 times.
✓ Branch 3 taken 6423680 times.
✓ Branch 4 taken 9017996 times.
✓ Branch 5 taken 6423680 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 806996 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 880520 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 884444 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 92444 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 6864 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1136 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 17024 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 17024 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 17653 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 2821 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 2821 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 1056 times.
✗ Branch 41 not taken.
✓ Branch 46 taken 542815 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 542815 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 542827 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 12 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 12 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 477951 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 477951 times.
✗ Branch 65 not taken.
✓ Branch 67 taken 481261 times.
✗ Branch 68 not taken.
✓ Branch 70 taken 3358 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 3358 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 48 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 3384 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 3384 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 25332 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 21948 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 21948 times.
✗ Branch 92 not taken.
✓ Branch 109 taken 528 times.
✗ Branch 110 not taken.
✓ Branch 112 taken 528 times.
✗ Branch 113 not taken.
✓ Branch 115 taken 528 times.
✗ Branch 116 not taken.
|
907030807 | extrusionFactor_ = problem.spatialParams().extrusionFactor(element, scv, elemSol); |
59 | ✗ | } | |
60 | |||
61 | /*! | ||
62 | * \brief Returns the vector of primary variables. | ||
63 | */ | ||
64 | const PrimaryVariables &priVars() const | ||
65 | 48423029 | { return priVars_; } | |
66 | |||
67 | /*! | ||
68 | * \brief Returns a component of primary variable vector. | ||
69 | * | ||
70 | * \param pvIdx The index of the primary variable of interest | ||
71 | */ | ||
72 | Scalar priVar(const int pvIdx) const | ||
73 | { return priVars_[pvIdx]; } | ||
74 | |||
75 | /*! | ||
76 | * \brief Returns how much the sub-control volume is extruded. | ||
77 | * | ||
78 | * This means the factor by which a lower-dimensional (1D or 2D) | ||
79 | * entity needs to be expanded to get a full dimensional cell. The | ||
80 | * default is 1.0 which means that 1D problems are actually | ||
81 | * thought as pipes with a cross section of 1 m^2 and 2D problems | ||
82 | * are assumed to extend 1 m to the back. | ||
83 | */ | ||
84 | ✗ | Scalar extrusionFactor() const | |
85 | ✗ | { return extrusionFactor_; } | |
86 | |||
87 | private: | ||
88 | PrimaryVariables priVars_; | ||
89 | Scalar extrusionFactor_; | ||
90 | }; | ||
91 | |||
92 | } // end namespace Dumux | ||
93 | |||
94 | #endif | ||
95 |