13#ifndef DUMUX_POROUSMEDIUMFLOW_VELOCITYOUTPUT_HH
14#define DUMUX_POROUSMEDIUMFLOW_VELOCITYOUTPUT_HH
17#include <dune/common/float_cmp.hh>
31template<
class Gr
idVariables,
class FluxVariables>
35 using GridGeometry =
typename GridVariables::GridGeometry;
36 using FVElementGeometry =
typename GridGeometry::LocalView;
37 using GridView =
typename GridGeometry::GridView;
38 using Element =
typename GridView::template Codim<0>::Entity;
39 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
40 using ElementFluxVarsCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
41 using VolumeVariables =
typename GridVariables::VolumeVariables;
42 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
43 using FluidSystem =
typename VolumeVariables::FluidSystem;
58 enableOutput_ = getParamFromGroup<bool>(gridVariables.curGridVolVars().problem().paramGroup(),
"Vtk.AddVelocity");
60 velocityBackend = std::make_unique<VelocityBackend>(gridVariables);
67 std::string
phaseName(
int phaseIdx)
const override {
return FluidSystem::phaseName(phaseIdx); }
70 int numFluidPhases()
const override {
return VolumeVariables::numFluidPhases(); }
75 const Element& element,
76 const FVElementGeometry& fvGeometry,
77 const ElementVolumeVariables& elemVolVars,
78 const ElementFluxVarsCache& elemFluxVarsCache,
79 int phaseIdx)
const override
82 velocityBackend->calculateVelocity(velocity, element, fvGeometry, elemVolVars, elemFluxVarsCache, phaseIdx);
87 std::unique_ptr<VelocityBackend> velocityBackend;
Velocity computation for implicit (porous media) models.
Definition: velocity.hh:59
Velocity output policy for implicit (porous media) models.
Definition: porousmediumflow/velocityoutput.hh:33
std::string phaseName(int phaseIdx) const override
Returns the phase name of a given phase index.
Definition: porousmediumflow/velocityoutput.hh:67
bool enableOutput() const override
Returns whether or not velocity output is enabled.
Definition: porousmediumflow/velocityoutput.hh:64
void calculateVelocity(VelocityVector &velocity, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, int phaseIdx) const override
Definition: porousmediumflow/velocityoutput.hh:74
PorousMediumFlowVelocityOutput(const GridVariables &gridVariables)
Constructor initializes the static data with the initial solution.
Definition: porousmediumflow/velocityoutput.hh:55
int numFluidPhases() const override
Returns the number of phases.
Definition: porousmediumflow/velocityoutput.hh:70
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:29
std::vector< Dune::FieldVector< Scalar, dimWorld > > VelocityVector
Definition: io/velocityoutput.hh:38
Element solution classes and factory functions.
Default velocity output policy for porous media models.
The available discretization methods in Dumux.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Velocity computation for implicit (porous media) models.