3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
method.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_DISCRETIZATION_METHOD_HH
25#define DUMUX_DISCRETIZATION_METHOD_HH
26
27#include <ostream>
28#include <string>
29
30#include <dumux/common/tag.hh>
31
33
34/*
35 * \brief Cell-centered finite volume scheme with two-point flux approximation
36 */
37struct CCTpfa : public Utility::Tag<CCTpfa> {
38 static std::string name() { return "cctpfa"; }
39};
40
41
42/*
43 * \brief Cell-centered finite volume scheme with multi-point flux approximation
44 */
45struct CCMpfa : public Utility::Tag<CCMpfa> {
46 static std::string name() { return "ccmpfa"; }
47};
48
49
50/*
51 * \brief Control-volume finite element methods
52 * This is a group of discretization methods that share certain properties.
53 * Therefore there is a single meta-tag parametrized in terms of the actual
54 * discretization method in the group. Having a common tag allows to specialize
55 * template agnostic of the underlying discretization type
56 */
57template<class DM>
58struct CVFE : public Utility::Tag<CVFE<DM>> {
59 static std::string name() { return DM::name(); }
60};
61
62namespace CVFEMethods {
63
64struct PQ1 {
65 static std::string name() { return "box"; }
66};
67
68struct CR_RT {
69 static std::string name() { return "fcdiamond"; }
70};
71
72struct PQ1Bubble {
73 static std::string name() { return "pq1bubble"; }
74};
75
76} // end namespace CVFEMethods
77
78
79/*
80 * \brief Vertex-centered finite volume scheme
81 * or control-volume finite element scheme based on a P1 (simplices) or Q1 (quads) basis
82 */
84
85/*
86 * \brief Face-centered finite volume scheme
87 * or control-volume finite element scheme based on
88 * Crouzeix-Raviart (simplices) or Rannacher-Turek (quads) basis
89 */
91
92/*
93 * \brief Vertex- and cell-centered finite volume scheme
94 * or control-volume finite element scheme based on
95 * linear Lagrangian elements with bubble function
96 */
98
99
100/*
101 * \brief Staggered-grid finite volume scheme (old)
102 */
103struct Staggered : public Utility::Tag<Staggered> {
104 static std::string name() { return "staggered"; }
105};
106
107
108/*
109 * \brief Finite element method
110 */
111struct FEM : public Utility::Tag<FEM> {
112 static std::string name() { return "fem"; }
113};
114
115
116/*
117 * \brief Staggered-grid finite volume scheme
118 */
119struct FCStaggered : public Utility::Tag<FCStaggered> {
120 static std::string name() { return "fcstaggered"; }
121};
122
123
124/*
125 * \brief Tag used for defaults not depending on the discretization
126 * or in situations where a discretization tag is needed but none
127 * can be provided (the implementation has to support this of course)
128 */
129struct None : public Utility::Tag<None> {
130 static std::string name() { return "none"; }
131};
132
133
134inline constexpr CCTpfa cctpfa{};
135inline constexpr CCMpfa ccmpfa{};
136inline constexpr Box box{};
137inline constexpr PQ1Bubble pq1bubble{};
138inline constexpr Staggered staggered{};
139inline constexpr FEM fem{};
140inline constexpr FCStaggered fcstaggered{};
141inline constexpr FCDiamond fcdiamond{};
142inline constexpr None none{};
143
144} // end namespace Dumux::DiscretizationMethods
145
146#endif
Helper class to create (named and comparable) tagged types.
Definition: method.hh:32
constexpr CCMpfa ccmpfa
Definition: method.hh:135
constexpr FCDiamond fcdiamond
Definition: method.hh:141
constexpr CCTpfa cctpfa
Definition: method.hh:134
constexpr Box box
Definition: method.hh:136
constexpr Staggered staggered
Definition: method.hh:138
constexpr None none
Definition: method.hh:142
constexpr FEM fem
Definition: method.hh:139
constexpr PQ1Bubble pq1bubble
Definition: method.hh:137
constexpr FCStaggered fcstaggered
Definition: method.hh:140
Helper class to create (named and comparable) tagged types Tags any given type. The tagged type is eq...
Definition: tag.hh:42
Definition: method.hh:37
static std::string name()
Definition: method.hh:38
Definition: method.hh:45
static std::string name()
Definition: method.hh:46
Definition: method.hh:58
static std::string name()
Definition: method.hh:59
static std::string name()
Definition: method.hh:65
static std::string name()
Definition: method.hh:69
static std::string name()
Definition: method.hh:73
static std::string name()
Definition: method.hh:104
Definition: method.hh:111
static std::string name()
Definition: method.hh:112
static std::string name()
Definition: method.hh:120
Definition: method.hh:129
static std::string name()
Definition: method.hh:130