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 InputOutput | ||
10 | * \brief A collection of input/output field names for common physical quantities | ||
11 | */ | ||
12 | #ifndef DUMUX_IO_NAME_HH | ||
13 | #define DUMUX_IO_NAME_HH | ||
14 | |||
15 | #include <string> | ||
16 | |||
17 | namespace Dumux { | ||
18 | namespace IOName { | ||
19 | |||
20 | //! I/O name of pressure for multiphase systems | ||
21 | template<class FluidSystem> | ||
22 | 297 | std::string pressure(int phaseIdx) noexcept | |
23 |
4/5✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 295 times.
✓ Branch 4 taken 2 times.
|
299 | { return (FluidSystem::numPhases == 1) ? "p" : "p_" + FluidSystem::phaseName(phaseIdx); } |
24 | |||
25 | //! I/O name of pressure for singlephase systems | ||
26 | ✗ | std::string pressure() noexcept | |
27 |
8/106✓ Branch 3 taken 301 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 19 times.
✓ Branch 6 taken 301 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 19 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 93 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 93 times.
✗ Branch 15 not taken.
✓ Branch 19 taken 3 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 3 times.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 72 not taken.
✗ Branch 73 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✗ Branch 108 not taken.
✗ Branch 109 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 123 not taken.
✗ Branch 124 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 133 not taken.
✗ Branch 134 not taken.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 197 not taken.
✗ Branch 198 not taken.
✗ Branch 200 not taken.
✗ Branch 201 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 225 not taken.
✗ Branch 226 not taken.
✗ Branch 228 not taken.
✗ Branch 229 not taken.
✗ Branch 235 not taken.
✗ Branch 236 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
|
832 | { return "p"; } |
28 | |||
29 | //! I/O name of saturation for multiphase systems | ||
30 | template<class FluidSystem> | ||
31 | 297 | std::string saturation(int phaseIdx) noexcept | |
32 |
4/5✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 295 times.
✓ Branch 4 taken 2 times.
|
299 | { return (FluidSystem::numPhases == 1) ? "S" : "S_" + FluidSystem::phaseName(phaseIdx); } |
33 | |||
34 | //! I/O name of saturation for singlephase systems | ||
35 | ✗ | std::string saturation() noexcept | |
36 |
5/10✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
✓ Branch 10 taken 3 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 3 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 3 times.
✗ Branch 17 not taken.
|
9 | { return "S"; } |
37 | |||
38 | //! I/O name of temperature for equilibrium models | ||
39 | ✗ | std::string temperature() noexcept | |
40 |
6/59✓ Branch 3 taken 89 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 14 times.
✓ Branch 6 taken 89 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 14 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 8 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 8 times.
✗ Branch 15 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 75 not taken.
✗ Branch 76 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
|
222 | { return "T"; } |
41 | |||
42 | //! I/O name of temperature for non-equilibrium models | ||
43 | template<class FluidSystem> | ||
44 | 2 | std::string fluidTemperature(int phaseIdx) noexcept | |
45 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
|
2 | { return "T_" + FluidSystem::phaseName(phaseIdx); } |
46 | |||
47 | //! I/O name of solid temperature for non-equilibrium models | ||
48 | ✗ | std::string solidTemperature() noexcept | |
49 |
2/4✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | { return "T_s"; } |
50 | |||
51 | //! I/O name of density for multiphase systems | ||
52 | template<class FluidSystem> | ||
53 | 259 | std::string density(int phaseIdx) noexcept | |
54 |
4/5✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 257 times.
✓ Branch 4 taken 2 times.
|
261 | { return (FluidSystem::numPhases == 1) ? "rho" : "rho_" + FluidSystem::phaseName(phaseIdx); } |
55 | |||
56 | //! I/O name of density for singlephase systems | ||
57 | ✗ | std::string density() noexcept | |
58 |
4/96✓ Branch 3 taken 176 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 176 times.
✗ Branch 7 not taken.
✓ Branch 11 taken 24 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 24 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 75 not taken.
✗ Branch 76 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 102 not taken.
✗ Branch 103 not taken.
✗ Branch 107 not taken.
✗ Branch 108 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 123 not taken.
✗ Branch 124 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✗ Branch 131 not taken.
✗ Branch 132 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
|
400 | { return "rho"; } |
59 | |||
60 | //! I/O name of viscosity for multiphase systems | ||
61 | template<class FluidSystem> | ||
62 | 3 | std::string viscosity(int phaseIdx) noexcept | |
63 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 3 times.
|
3 | { return (FluidSystem::numPhases == 1) ? "mu" : "mu_" + FluidSystem::phaseName(phaseIdx); } |
64 | |||
65 | //! I/O name of viscosity for singlephase systems | ||
66 | ✗ | std::string viscosity() noexcept | |
67 |
4/8✓ Branch 3 taken 50 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 50 times.
✗ Branch 7 not taken.
✓ Branch 11 taken 13 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 13 times.
✗ Branch 15 not taken.
|
126 | { return "mu"; } |
68 | |||
69 | //! I/O name of molar density for multiphase systems | ||
70 | template<class FluidSystem> | ||
71 | 88 | std::string molarDensity(int phaseIdx) noexcept | |
72 |
4/5✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 86 times.
✓ Branch 4 taken 2 times.
|
90 | { return (FluidSystem::numPhases == 1) ? "rhoMolar" : "rhoMolar_" + FluidSystem::phaseName(phaseIdx); } |
73 | |||
74 | //! I/O name of molar density for singlephase systems | ||
75 | ✗ | std::string molarDensity() noexcept | |
76 |
2/48✓ Branch 3 taken 30 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 30 times.
✗ Branch 7 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 30 not taken.
✗ Branch 31 not taken.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 46 not taken.
✗ Branch 47 not taken.
✗ Branch 51 not taken.
✗ Branch 52 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 67 not taken.
✗ Branch 68 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✗ Branch 75 not taken.
✗ Branch 76 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
|
60 | { return "rhoMolar"; } |
77 | |||
78 | //! I/O name of relative permeability for multiphase systems | ||
79 | template<class FluidSystem> | ||
80 | 38 | std::string relativePermeability(int phaseIdx) noexcept | |
81 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 38 times.
|
38 | { return (FluidSystem::numPhases == 1) ? "kr" : "kr_" + FluidSystem::phaseName(phaseIdx); } |
82 | |||
83 | //! I/O name of relative permeability for singlephase systems | ||
84 | ✗ | std::string relativePermeability() noexcept | |
85 |
2/4✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | { return "kr"; } |
86 | |||
87 | //! I/O name of mobility for multiphase systems | ||
88 | template<class FluidSystem> | ||
89 | 223 | std::string mobility(int phaseIdx) noexcept | |
90 |
4/5✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 221 times.
✓ Branch 4 taken 2 times.
|
225 | { return (FluidSystem::numPhases == 1) ? "mob" : "mob_" + FluidSystem::phaseName(phaseIdx); } |
91 | |||
92 | //! I/O name of mobility for singlephase systems | ||
93 | ✗ | std::string mobility() noexcept | |
94 |
2/4✓ Branch 3 taken 3 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
|
6 | { return "mob"; } |
95 | |||
96 | //! I/O name of mole fraction | ||
97 | template<class FluidSystem> | ||
98 | 505 | std::string moleFraction(int phaseIdx, int compIdx) noexcept | |
99 |
12/13✓ Branch 0 taken 3 times.
✓ Branch 1 taken 89 times.
✓ Branch 2 taken 86 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 307 times.
✓ Branch 7 taken 186 times.
✓ Branch 8 taken 307 times.
✓ Branch 9 taken 186 times.
✓ Branch 10 taken 307 times.
✓ Branch 11 taken 186 times.
✓ Branch 12 taken 307 times.
✓ Branch 13 taken 178 times.
|
695 | { return "x^" + FluidSystem::componentName(compIdx) + "_" + FluidSystem::phaseName(phaseIdx); } |
100 | |||
101 | //! I/O name of mass fraction | ||
102 | template<class FluidSystem> | ||
103 | 359 | std::string massFraction(int phaseIdx, int compIdx) noexcept | |
104 |
11/12✓ Branch 1 taken 86 times.
✓ Branch 2 taken 86 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 173 times.
✓ Branch 7 taken 174 times.
✓ Branch 8 taken 173 times.
✓ Branch 9 taken 174 times.
✓ Branch 10 taken 173 times.
✓ Branch 11 taken 174 times.
✓ Branch 12 taken 173 times.
✓ Branch 13 taken 172 times.
|
537 | { return "X^" + FluidSystem::componentName(compIdx) + "_" + FluidSystem::phaseName(phaseIdx); } |
105 | |||
106 | //! I/O name of liquid phase | ||
107 | ✗ | std::string liquidPhase() noexcept | |
108 |
4/8✗ Branch 56 not taken.
✓ Branch 57 taken 1 times.
✗ Branch 58 not taken.
✓ Branch 59 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 63 taken 1 times.
✗ Branch 64 not taken.
✓ Branch 65 taken 1 times.
|
5216 | { return "liq"; } |
109 | |||
110 | //! I/O name of gaseous phase | ||
111 | ✗ | std::string gaseousPhase() noexcept | |
112 |
2/4✗ Branch 62 not taken.
✓ Branch 63 taken 1 times.
✗ Branch 64 not taken.
✓ Branch 65 taken 1 times.
|
4796 | { return "gas"; } |
113 | |||
114 | //! I/O name of aqueous phase | ||
115 | ✗ | std::string aqueousPhase() noexcept | |
116 | 252 | { return "aq"; } | |
117 | |||
118 | //! I/O name of napl phase | ||
119 | ✗ | std::string naplPhase() noexcept | |
120 | 244 | { return "napl"; } | |
121 | |||
122 | //! I/O name of capillary pressure | ||
123 | ✗ | std::string capillaryPressure() noexcept | |
124 |
2/4✓ Branch 3 taken 125 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 125 times.
✗ Branch 7 not taken.
|
250 | { return "pc"; } |
125 | |||
126 | //! I/O name of porosity | ||
127 | ✗ | std::string porosity() noexcept | |
128 |
4/8✓ Branch 3 taken 147 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 147 times.
✗ Branch 7 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 2 times.
✗ Branch 15 not taken.
|
298 | { return "porosity"; } |
129 | |||
130 | //! I/O name of permeability | ||
131 | ✗ | std::string permeability() noexcept | |
132 |
2/4✓ Branch 3 taken 13 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 13 times.
✗ Branch 7 not taken.
|
26 | { return "permeability"; } |
133 | |||
134 | //! I/O name of phase presence | ||
135 | ✗ | std::string phasePresence() noexcept | |
136 |
2/4✓ Branch 3 taken 57 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 57 times.
✗ Branch 7 not taken.
|
114 | { return "phase presence"; } |
137 | |||
138 | //! I/O name of pressure head | ||
139 | ✗ | std::string pressureHead() noexcept | |
140 |
2/4✓ Branch 3 taken 27 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 27 times.
✗ Branch 7 not taken.
|
54 | { return "pressure head"; } |
141 | |||
142 | //! I/O name of water content | ||
143 | ✗ | std::string waterContent() noexcept | |
144 |
2/4✓ Branch 3 taken 41 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 41 times.
✗ Branch 7 not taken.
|
82 | { return "water content"; } |
145 | |||
146 | //! I/O name of solid volume fraction | ||
147 | template<class SolidSystem> | ||
148 | 8 | std::string solidVolumeFraction(int compIdx = 0) noexcept | |
149 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 8 times.
|
8 | { return "precipitateVolumeFraction^" + SolidSystem::componentName(compIdx); } |
150 | |||
151 | //! I/O name of displacement | ||
152 | ✗ | std::string displacement() noexcept | |
153 |
2/4✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
|
8 | { return "u"; } |
154 | |||
155 | } // end namespace IOName | ||
156 | } // end namespace Dumux | ||
157 | |||
158 | #endif | ||
159 |