3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
io/velocityoutput.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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_IO_VELOCITYOUTPUT_HH
25#define DUMUX_IO_VELOCITYOUTPUT_HH
26
27#include <vector>
28
29#include <dune/common/fvector.hh>
30#include <dune/common/exceptions.hh>
32
33namespace Dumux {
34
39template<class GridVariables>
41{
42 using Scalar = typename GridVariables::Scalar;
43 static constexpr int dimWorld = GridVariables::GridGeometry::GridView::dimensionworld;
44 using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
45 using ElementFluxVarsCache = typename GridVariables::GridFluxVariablesCache::LocalView;
46 using FVElementGeometry = typename GridVariables::GridGeometry::LocalView;
47 using Element = typename GridVariables::GridGeometry::GridView::template Codim<0>::Entity;
48
49public:
50 using VelocityVector = std::vector<Dune::FieldVector<Scalar, dimWorld>>;
51
55 VelocityOutput() = default;
56
58 virtual ~VelocityOutput() {};
59
61 virtual bool enableOutput() const { return false; }
62
64 virtual std::string phaseName(int phaseIdx) const { return "none"; }
65
67 virtual int numFluidPhases() const { return 0; }
68
71 virtual void calculateVelocity(VelocityVector& velocity,
72 const Element& element,
73 const FVElementGeometry& fvGeometry,
74 const ElementVolumeVariables& elemVolVars,
75 const ElementFluxVarsCache& elemFluxVarsCache,
76 int phaseIdx) const
77 {}
78};
79
80} // end namespace Dumux
81
82#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
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
virtual std::string phaseName(int phaseIdx) const
returns the phase name of a given phase index
Definition: io/velocityoutput.hh:64
VelocityOutput()=default
Default constructor.
virtual bool enableOutput() const
returns whether or not velocity output is enabled
Definition: io/velocityoutput.hh:61
virtual int numFluidPhases() const
returns the number of phases
Definition: io/velocityoutput.hh:67
virtual void calculateVelocity(VelocityVector &velocity, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVarsCache &elemFluxVarsCache, int phaseIdx) const
Definition: io/velocityoutput.hh:71
virtual ~VelocityOutput()
virtual destructor
Definition: io/velocityoutput.hh:58