25#ifndef DUMUX_POROUSMEDIUMFLOW_VELOCITYOUTPUT_HH
26#define DUMUX_POROUSMEDIUMFLOW_VELOCITYOUTPUT_HH
29#include <dune/common/float_cmp.hh>
43template<
class Gr
idVariables,
class FluxVariables>
47 using GridGeometry =
typename GridVariables::GridGeometry;
48 using FVElementGeometry =
typename GridGeometry::LocalView;
49 using GridView =
typename GridGeometry::GridView;
50 using Element =
typename GridView::template Codim<0>::Entity;
51 using GridVolumeVariables =
typename GridVariables::GridVolumeVariables;
52 using ElementFluxVarsCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
53 using VolumeVariables =
typename GridVariables::VolumeVariables;
54 using ElementVolumeVariables =
typename GridVolumeVariables::LocalView;
55 using FluidSystem =
typename VolumeVariables::FluidSystem;
70 enableOutput_ = getParamFromGroup<bool>(gridVariables.curGridVolVars().problem().paramGroup(),
"Vtk.AddVelocity");
72 velocityBackend = std::make_unique<VelocityBackend>(gridVariables);
79 std::string
phaseName(
int phaseIdx)
const override {
return FluidSystem::phaseName(phaseIdx); }
82 int numFluidPhases()
const override {
return VolumeVariables::numFluidPhases(); }
87 const Element& element,
88 const FVElementGeometry& fvGeometry,
89 const ElementVolumeVariables& elemVolVars,
90 const ElementFluxVarsCache& elemFluxVarsCache,
91 int phaseIdx)
const override
94 velocityBackend->calculateVelocity(velocity, element, fvGeometry, elemVolVars, elemFluxVarsCache, phaseIdx);
99 std::unique_ptr<VelocityBackend> velocityBackend;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Element solution classes and factory functions.
The available discretization methods in Dumux.
Velocity computation for implicit (porous media) models.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:41
std::vector< Dune::FieldVector< Scalar, dimWorld > > VelocityVector
Definition: io/velocityoutput.hh:50
Velocity computation for implicit (porous media) models.
Definition: velocity.hh:71
Velocity output policy for implicit (porous media) models.
Definition: porousmediumflow/velocityoutput.hh:45
std::string phaseName(int phaseIdx) const override
Returns the phase name of a given phase index.
Definition: porousmediumflow/velocityoutput.hh:79
bool enableOutput() const override
Returns whether or not velocity output is enabled.
Definition: porousmediumflow/velocityoutput.hh:76
void calculateVelocity(VelocityVector &velocity, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, int phaseIdx) const override
Definition: porousmediumflow/velocityoutput.hh:86
PorousMediumFlowVelocityOutput(const GridVariables &gridVariables)
Constructor initializes the static data with the initial solution.
Definition: porousmediumflow/velocityoutput.hh:67
int numFluidPhases() const override
Returns the number of phases.
Definition: porousmediumflow/velocityoutput.hh:82
Default velocity output policy for porous media models.