version 3.10-dev
freeflow/navierstokes/momentum/cvfe/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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_INDICES_HH
13#define DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_INDICES_HH
14
15namespace Dumux {
16
23template <int dimension>
25{
26 static constexpr int dimXIdx = 0;
27 static constexpr int dimYIdx = 1;
28 static constexpr int dimZIdx = 2;
29
30 static constexpr auto dim = dimension;
31
32 static constexpr int momentumXBalanceIdx = 0;
33 static constexpr int momentumYBalanceIdx = 1;
34 static constexpr int momentumZBalanceIdx = 2;
35
36 static constexpr int velocityXIdx = 0;
37 static constexpr int velocityYIdx = 1;
38 static constexpr int velocityZIdx = 2;
39
44 static constexpr int velocity(int dirIdx)
45 {
46 return dirIdx;
47 }
48
53 static constexpr int momentumBalanceIdx(int dirIdx)
54 {
55 return dirIdx;
56 }
57};
58
59} // end namespace Dumux
60
61#endif
Definition: adapt.hh:17
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:25
static constexpr int velocityYIdx
Index of the velocity in a solution vector y-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:37
static constexpr int momentumYBalanceIdx
Index of the momentum balance equation y-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:33
static constexpr int dimXIdx
Index of the x-component of a vector of size dim.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:26
static constexpr int velocity(int dirIdx)
Index of the velocity in a solution vector given a certain direction.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:44
static constexpr int momentumXBalanceIdx
Index of the momentum balance equation x-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:32
static constexpr auto dim
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:30
static constexpr int velocityZIdx
Index of the velocity in a solution vector z-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:38
static constexpr int dimZIdx
Index of the z-component of a vector of size dim.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:28
static constexpr int momentumBalanceIdx(int dirIdx)
Index of the momentum balance equation given the direction.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:53
static constexpr int velocityXIdx
Index of the velocity in a solution vector x-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:36
static constexpr int momentumZBalanceIdx
Index of the momentum balance equation z-component.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:34
static constexpr int dimYIdx
Index of the y-component of a vector of size dim.
Definition: freeflow/navierstokes/momentum/cvfe/indices.hh:27