12#ifndef DUMUX_NAVIER_STOKES_IO_FIELDS_HH 
   13#define DUMUX_NAVIER_STOKES_IO_FIELDS_HH 
   25template<
class IOFields, 
class PrimaryVariables, 
class ModelTraits, 
class Flu
idSystem>
 
   28    static constexpr auto offset = ModelTraits::numEq() - PrimaryVariables::dimension;
 
   33        return [n = std::move(pvName)](
int pvIdx, 
int state = 0){ 
return n[pvIdx]; };
 
 
   45template<
class IOFields, 
class PrimaryVariables, 
class ModelTraits, 
class Flu
idSystem>
 
   51        return [n = std::move(pvName)](
int pvIdx, 
int state = 0){ 
return n[pvIdx]; };
 
 
   59template<
class T, 
class U>
 
   60class StaggeredVtkOutputModule;
 
   70    struct isStaggered : 
public std::false_type {};
 
   72    template<
class... Args>
 
   74    : 
public std::true_type {};
 
   78    template <
class OutputModule>
 
   81        out.addVolumeVariable([](
const auto& v){ 
return v.pressure(); }, 
IOName::pressure());
 
   82        out.addVolumeVariable([](
const auto& v){ 
return v.density(); }, 
IOName::density());
 
   85        additionalOutput_(out, isStaggered<OutputModule>());
 
 
   89    template <
class ModelTraits, 
class Flu
idSystem = 
void>
 
   92        if (pvIdx < ModelTraits::dim())
 
 
  101    template <
class OutputModule>
 
  102    static void additionalOutput_(OutputModule& out, std::false_type)
 
  106    template <
class OutputModule>
 
  107    static void additionalOutput_(OutputModule& out, std::true_type)
 
  112            auto faceVelocityVector = [](
const auto& scvf, 
const auto& faceVars)
 
  114                                          using VelocityVector = std::decay_t<
decltype(scvf.unitOuterNormal())>;
 
  116                                          VelocityVector velocity(0.0);
 
  117                                          velocity[scvf.directionIndex()] = faceVars.velocitySelf();
 
  121            out.addFaceVariable(faceVelocityVector, 
"faceVelocity");
 
  123            auto faceNormalVelocity = [](
const auto& faceVars)
 
  125                                          return faceVars.velocitySelf();
 
  128            out.addFaceVariable(faceNormalVelocity, 
"v");
 
 
Adds I/O fields for the Navier-Stokes model.
Definition freeflow/navierstokes/iofields.hh:67
static void initOutputModule(OutputModule &out)
Initialize the Navier-Stokes specific output fields.
Definition freeflow/navierstokes/iofields.hh:79
static std::string primaryVariableName(int pvIdx=0, int state=0)
return the names of the primary variables
Definition freeflow/navierstokes/iofields.hh:90
A VTK output module to simplify writing dumux simulation data to VTK format Specialization for stagge...
Definition staggeredvtkoutputmodule.hh:38
std::function< std::string(int, int)> createFacePVNameFunction(const std::string ¶mGroup="")
helper function to determine the names of primary variables on the cell faces of a model with stagger...
Definition freeflow/navierstokes/iofields.hh:46
std::function< std::string(int, int)> createCellCenterPVNameFunction(const std::string ¶mGroup="")
helper function to determine the names of cell-centered primary variables of a model with staggered g...
Definition freeflow/navierstokes/iofields.hh:26
T getParamFromGroup(Args &&... args)
A free function to get a parameter from the parameter tree singleton with a model group.
Definition parameters.hh:149
bool hasParamInGroup(const std::string ¶mGroup, const std::string ¶m)
Check whether a key exists in the parameter tree with a model group prefix.
Definition parameters.hh:165
A collection of input/output field names for common physical quantities.
std::string pressure() noexcept
I/O name of pressure for singlephase systems.
Definition name.hh:26
std::string density() noexcept
I/O name of density for singlephase systems.
Definition name.hh:57
static std::string primaryVariableName(int pvIdx, int state)
Definition porousmediumflow/richardsextended/iofields.hh:45
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.