Skip to content
Snippets Groups Projects
Commit 6d5fea5e authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[navierstokes][indices] Rename and fix docu

* NavierStokesCommonIndices -> NavierStokesIndices
parent 3c412d13
No related branches found
No related tags found
2 merge requests!695Doc/freeflow,!617[WIP] Next
......@@ -18,10 +18,11 @@
*****************************************************************************/
/*!
* \file
* \brief Defines the indices for the one-phase isothermal Navier-Stoke model.
* \ingroup NavierStokesModel
* \copydoc Dumux::NavierStokesIndices
*/
#ifndef DUMUX_NAVIERSTOKES_COMMON_INDICES_HH
#define DUMUX_NAVIERSTOKES_COMMON_INDICES_HH
#ifndef DUMUX_NAVIERSTOKES_INDICES_HH
#define DUMUX_NAVIERSTOKES_INDICES_HH
#include <dumux/common/properties.hh>
......@@ -35,7 +36,7 @@ namespace Dumux
* \tparam PVOffset The first index in a primary variable vector.
*/
template <class TypeTag, int PVOffset = 0>
struct NavierStokesCommonIndices
struct NavierStokesIndices
{
static constexpr int dimXIdx = 0; //!< Index of the x-component of a vector of size dim
......@@ -43,7 +44,7 @@ struct NavierStokesCommonIndices
static constexpr int dimZIdx = 2; //!< Index of the z-component of a vector of size dim
static constexpr int massBalanceIdx = PVOffset + 0; //!< Index of the mass balance equation
static constexpr int conti0EqIdx = massBalanceIdx; //!< Index of first (for C-guys: 0th) mass conservation equation
static constexpr int conti0EqIdx = massBalanceIdx; //!< Index of the mass balance equation
static constexpr int pressureIdx = massBalanceIdx; //!< Index of the pressure in a solution vector
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
......@@ -60,7 +61,12 @@ struct NavierStokesCommonIndices
static constexpr int velocityYIdx = momentumBalanceIdx + 1; //!< Index of the velocity in a solution vector
static constexpr int velocityZIdx = momentumBalanceIdx + 2; //!< Index of the velocity in a solution vector
static constexpr int velocity(int dirIdx) //!< Index of the velocity in a solution vector given a certain dimension
/*!
* \brief Index of the velocity in a solution vector given a certain direction.
*
* \param dirIdx The index of the direction.
*/
static constexpr int velocity(int dirIdx)
{
return dirIdx + momentumBalanceIdx;
}
......
......@@ -117,7 +117,7 @@ SET_TYPE_PROP(NavierStokes, FluxVariables, NavierStokesFluxVariables<TypeTag>);
SET_TYPE_PROP(NavierStokes, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>);
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP(NavierStokes, Indices, NavierStokesCommonIndices<TypeTag>);
SET_TYPE_PROP(NavierStokes, Indices, NavierStokesIndices<TypeTag>);
//! The specific vtk output fields
SET_TYPE_PROP(NavierStokes, VtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
......@@ -126,7 +126,7 @@ SET_TYPE_PROP(NavierStokes, VtkOutputFields, NavierStokesVtkOutputFields<TypeTag
// Property values for isothermal model required for the general non-isothermal model
//////////////////////////////////////////////////////////////////
//! The indices required by the isothermal single-phase model
SET_TYPE_PROP(NavierStokesNI, IsothermalIndices, NavierStokesCommonIndices<TypeTag>);
SET_TYPE_PROP(NavierStokesNI, IsothermalIndices, NavierStokesIndices<TypeTag>);
//! The specific isothermal vtk output fields
SET_TYPE_PROP(NavierStokesNI, IsothermalVtkOutputFields, NavierStokesVtkOutputFields<TypeTag>);
......
......@@ -37,10 +37,10 @@ namespace Dumux
* \tparam PVOffset The first index in a primary variable vector.
*/
template <class TypeTag, int PVOffset = 0>
struct NavierStokesNCIndices : public NavierStokesCommonIndices<TypeTag, PVOffset>
struct NavierStokesNCIndices : public NavierStokesIndices<TypeTag, PVOffset>
{
private:
using ParentType = NavierStokesCommonIndices<TypeTag, PVOffset>;
using ParentType = NavierStokesIndices<TypeTag, PVOffset>;
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment