version 3.11-dev
freeflow/navierstokes/mass/1p/iofields.hh
Go to the documentation of this file.
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_NAVIERSTOKES_MASS_1P_IO_FIELDS_HH
13#define DUMUX_NAVIERSTOKES_MASS_1P_IO_FIELDS_HH
14
16#include <dumux/io/name.hh>
17
18namespace Dumux {
19
25{
26public:
28 template <class OutputModule>
29 static void initOutputModule(OutputModule& out)
30 {
31 out.addVolumeVariable([](const auto& v){ return v.pressure(); }, IOName::pressure());
32 out.addVolumeVariable([](const auto& v){ return v.density(); }, IOName::density());
33 }
34
36 template <class ModelTraits, class FluidSystem = void>
37 static std::string primaryVariableName(int pvIdx = 0, int state = 0)
38 {
39 return IOName::pressure();
40 }
41};
42
43} // end namespace Dumux
44
45#endif
Adds I/O fields for the Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/iofields.hh:25
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition: freeflow/navierstokes/mass/1p/iofields.hh:37
static void initOutputModule(OutputModule &out)
Initialize the Navier-Stokes specific output fields.
Definition: freeflow/navierstokes/mass/1p/iofields.hh:29
A collection of input/output field names for common physical quantities.
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
Definition: adapt.hh:17
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.