3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
freeflow/shallowwater/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 * 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 2 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_FREEFLOW_SHALLOW_WATER_IO_FIELDS_HH
25#define DUMUX_FREEFLOW_SHALLOW_WATER_IO_FIELDS_HH
26
27#include <dumux/io/name.hh>
28#include <string>
29
30namespace Dumux {
31
37{
38public:
39 template <class OutputModule>
40 static void initOutputModule(OutputModule& out)
41 {
42 using VolumeVariables = typename OutputModule::VolumeVariables;
43
44 out.addVolumeVariable([](const VolumeVariables& v){ return v.waterDepth(); }, "waterDepth");
45 out.addVolumeVariable([](const VolumeVariables& v){ return v.velocity(0); }, "velocityX");
46 out.addVolumeVariable([](const VolumeVariables& v){ return v.velocity(1); }, "velocityY");
47 out.addVolumeVariable([](const VolumeVariables& v){ return v.bedSurface(); }, "bedSurface");
48 out.addVolumeVariable([](const VolumeVariables& v){ return v.bedSurface() + v.waterDepth(); }, "freeSurface");
49 }
50
51 /* Restart is limited for shallow water models since only primary
52 * variables are regarded. Important parameters like the bedSurface,
53 * fricition,.. are missing so far.
54 */
55 template <class ModelTraits>
56 static std::string primaryVariableName(int pvIdx)
57 {
58 std::string name;
59
60 switch(pvIdx){
61 case 0 : name = "waterDepth";
62 case 1 : name = "velocityX";
63 case 2 : name = "velocityY";
64 }
65
66 return name;
67 }
68
69};
70
71} // end namespace Dumux
72
73#endif
A collection of input/output field names for common physical quantities.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Adds vtk output fields for the shallow water model.
Definition: freeflow/shallowwater/iofields.hh:37
static std::string primaryVariableName(int pvIdx)
Definition: freeflow/shallowwater/iofields.hh:56
static void initOutputModule(OutputModule &out)
Definition: freeflow/shallowwater/iofields.hh:40