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 ThreePModel | ||
10 | * \brief Adds I/O fields specific to the three-phase model. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_THREEP_IO_FIELDS_HH | ||
14 | #define DUMUX_THREEP_IO_FIELDS_HH | ||
15 | |||
16 | #include <dumux/io/name.hh> | ||
17 | |||
18 | namespace Dumux { | ||
19 | |||
20 | /*! | ||
21 | * \ingroup ThreePModel | ||
22 | * \brief Adds I/O fields specific to the three-phase model. | ||
23 | */ | ||
24 | class ThreePIOFields | ||
25 | { | ||
26 | public: | ||
27 | template <class OutputModule> | ||
28 | 6 | static void initOutputModule(OutputModule& out) | |
29 | { | ||
30 | using VolumeVariables = typename OutputModule::VolumeVariables; | ||
31 | using FluidSystem = typename VolumeVariables::FluidSystem; | ||
32 | |||
33 | // register standardized output fields | ||
34 |
2/2✓ Branch 0 taken 18 times.
✓ Branch 1 taken 6 times.
|
24 | for (int phaseIdx = 0; phaseIdx < VolumeVariables::numFluidPhases(); ++phaseIdx) |
35 | { | ||
36 |
4/12✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 18 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 18 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
36 | out.addVolumeVariable([phaseIdx](const auto& v){ return v.saturation(phaseIdx); }, |
37 | IOName::saturation<FluidSystem>(phaseIdx)); | ||
38 |
4/12✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 18 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 18 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
36 | out.addVolumeVariable([phaseIdx](const auto& v){ return v.pressure(phaseIdx); }, |
39 | IOName::pressure<FluidSystem>(phaseIdx)); | ||
40 |
4/12✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 18 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 18 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 18 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
36 | out.addVolumeVariable([phaseIdx](const auto& v){ return v.density(phaseIdx); }, |
41 | IOName::density<FluidSystem>(phaseIdx)); | ||
42 | } | ||
43 | |||
44 |
4/12✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 6 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 6 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 6 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
12 | out.addVolumeVariable( [](const auto& v){ return v.porosity(); }, |
45 | IOName::porosity()); | ||
46 |
4/12✓ Branch 2 taken 6 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 6 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 6 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 6 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
12 | out.addVolumeVariable( [](const auto& v){ return v.permeability(); }, |
47 | IOName::permeability()); | ||
48 | 6 | } | |
49 | |||
50 | template <class ModelTraits, class FluidSystem, class SolidSystem = void> | ||
51 | static std::string primaryVariableName(int pvIdx, int state = 0) | ||
52 | { | ||
53 | switch (pvIdx) | ||
54 | { | ||
55 | case 0: return IOName::pressure<FluidSystem>(FluidSystem::gPhaseIdx); | ||
56 | case 1: return IOName::saturation<FluidSystem>(FluidSystem::wPhaseIdx); | ||
57 | default: return IOName::saturation<FluidSystem>(FluidSystem::nPhaseIdx); | ||
58 | } | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | } // end namespace Dumux | ||
63 | |||
64 | #endif | ||
65 |