3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
freeflow/navierstokes/indices.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_NAVIERSTOKES_INDICES_HH
25#define DUMUX_NAVIERSTOKES_INDICES_HH
26
27namespace Dumux {
28
35template <int dimension>
37{
38 static constexpr int dimXIdx = 0;
39 static constexpr int dimYIdx = 1;
40 static constexpr int dimZIdx = 2;
41
42 static constexpr int conti0EqIdx = dimension;
43 static constexpr int pressureIdx = conti0EqIdx;
44
45 static constexpr auto dim = dimension;
46
47 static constexpr int momentumXBalanceIdx = 0;
48 static constexpr int momentumYBalanceIdx = 1;
49 static constexpr int momentumZBalanceIdx = 2;
50
51 static constexpr int velocityXIdx = 0;
52 static constexpr int velocityYIdx = 1;
53 static constexpr int velocityZIdx = 2;
54
60 static constexpr int velocity(int dirIdx)
61 {
62 return dirIdx;
63 }
64};
65
66} // end namespace Dumux
67
68#endif
Definition: adapt.hh:29
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:37
static constexpr int momentumXBalanceIdx
Index of the momentum balance equation.
Definition: freeflow/navierstokes/indices.hh:47
static constexpr int dimXIdx
Index of the x-component of a vector of size dim.
Definition: freeflow/navierstokes/indices.hh:38
static constexpr int pressureIdx
Index of the pressure in a solution vector.
Definition: freeflow/navierstokes/indices.hh:43
static constexpr int velocityYIdx
Index of the velocity in a solution vector.
Definition: freeflow/navierstokes/indices.hh:52
static constexpr auto dim
Definition: freeflow/navierstokes/indices.hh:45
static constexpr int dimYIdx
Index of the y-component of a vector of size dim.
Definition: freeflow/navierstokes/indices.hh:39
static constexpr int momentumZBalanceIdx
Index of the momentum balance equation.
Definition: freeflow/navierstokes/indices.hh:49
static constexpr int velocity(int dirIdx)
Index of the velocity in a solution vector given a certain direction.
Definition: freeflow/navierstokes/indices.hh:60
static constexpr int conti0EqIdx
Index of the total mass balance equation.
Definition: freeflow/navierstokes/indices.hh:42
static constexpr int velocityZIdx
Index of the velocity in a solution vector.
Definition: freeflow/navierstokes/indices.hh:53
static constexpr int dimZIdx
Index of the z-component of a vector of size dim.
Definition: freeflow/navierstokes/indices.hh:40
static constexpr int momentumYBalanceIdx
Index of the momentum balance equation.
Definition: freeflow/navierstokes/indices.hh:48
static constexpr int velocityXIdx
Index of the velocity in a solution vector.
Definition: freeflow/navierstokes/indices.hh:51