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 TracerModel | ||
10 | * \brief Adds I/O fields specific to the tracer model. | ||
11 | */ | ||
12 | |||
13 | #ifndef DUMUX_TRACER_IO_FIELDS_HH | ||
14 | #define DUMUX_TRACER_IO_FIELDS_HH | ||
15 | |||
16 | #include <string> | ||
17 | |||
18 | #include <dumux/io/name.hh> | ||
19 | |||
20 | namespace Dumux { | ||
21 | |||
22 | /*! | ||
23 | * \ingroup TracerModel | ||
24 | * \brief Adds I/O fields specific to the tracer model. | ||
25 | */ | ||
26 | class TracerIOFields | ||
27 | { | ||
28 | public: | ||
29 | template <class OutputModule> | ||
30 | 28 | static void initOutputModule(OutputModule& out) | |
31 | { | ||
32 | using VolumeVariables = typename OutputModule::VolumeVariables; | ||
33 | using FluidSystem = typename VolumeVariables::FluidSystem; | ||
34 | |||
35 | // register standardized out output fields | ||
36 |
2/2✓ Branch 0 taken 30 times.
✓ Branch 1 taken 20 times.
|
66 | for (int compIdx = 0; compIdx < VolumeVariables::numFluidComponents(); ++compIdx) |
37 | { | ||
38 |
6/18✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 30 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 30 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 30 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 30 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2187426 | out.addVolumeVariable([compIdx](const auto& v){ return v.moleFraction(0, compIdx); }, |
39 | "x^" + FluidSystem::componentName(compIdx)); | ||
40 |
6/18✓ Branch 2 taken 30 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 30 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 30 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 30 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 30 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 30 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
1204191 | out.addVolumeVariable([compIdx](const auto& v){ return v.massFraction(0, compIdx); }, |
41 | "X^" + FluidSystem::componentName(compIdx)); | ||
42 | } | ||
43 |
4/12✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 20 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 20 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 20 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
|
1093731 | out.addVolumeVariable( [](const auto& v){ return v.density(); }, IOName::density()); |
44 | 28 | } | |
45 | |||
46 | template <class ModelTraits, class FluidSystem, class SolidSystem = void> | ||
47 | static std::string primaryVariableName(int pvIdx, int state = 0) | ||
48 | { | ||
49 | const std::string xString = ModelTraits::useMoles() ? "x" : "X"; | ||
50 | return xString + "^" + FluidSystem::componentName(pvIdx); | ||
51 | } | ||
52 | }; | ||
53 | |||
54 | } // end namespace Dumux | ||
55 | |||
56 | #endif | ||
57 |