diff --git a/dumux/freeflow/navierstokes/momentum/cvfe/indices.hh b/dumux/freeflow/navierstokes/momentum/cvfe/indices.hh new file mode 100644 index 0000000000000000000000000000000000000000..a341de458a71793d696789181ef3b93de16d5c98 --- /dev/null +++ b/dumux/freeflow/navierstokes/momentum/cvfe/indices.hh @@ -0,0 +1,73 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \ingroup NavierStokesModel + * \copydoc Dumux::NavierStokesIndices + */ +#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_INDICES_HH +#define DUMUX_NAVIERSTOKES_MOMENTUM_CVFE_INDICES_HH + +namespace Dumux { + +/*! + * \ingroup NavierStokesModel + * \brief The common indices for the isothermal Navier-Stokes model. + * + * \tparam dimension The dimension of the problem + */ +template <int dimension> +struct NavierStokesMomentumCVFEIndices +{ + static constexpr int dimXIdx = 0; //!< Index of the x-component of a vector of size dim + static constexpr int dimYIdx = 1; //!< Index of the y-component of a vector of size dim + static constexpr int dimZIdx = 2; //!< Index of the z-component of a vector of size dim + + static constexpr auto dim = dimension; + + static constexpr int momentumXBalanceIdx = 0; //!< Index of the momentum balance equation + static constexpr int momentumYBalanceIdx = 1; //!< Index of the momentum balance equation + static constexpr int momentumZBalanceIdx = 2; //!< Index of the momentum balance equation + + static constexpr int velocityXIdx = 0; //!< Index of the velocity in a solution vector + static constexpr int velocityYIdx = 1; //!< Index of the velocity in a solution vector + static constexpr int velocityZIdx = 2; //!< Index of the velocity in a solution vector + + /*! + * \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; + } + + /*! + * \brief Index of the momentum balance equation given the direction + * \param dirIdx The index of the direction. + */ + static constexpr int momentumBalanceIdx(int dirIdx) + { + return dirIdx; + } +}; + +} // end namespace Dumux + +#endif diff --git a/dumux/freeflow/navierstokes/momentum/diamond/indices.hh b/dumux/freeflow/navierstokes/momentum/diamond/indices.hh index be85ca5fbe21acac77bfeb98526d73f76655a20c..b1e5f205584999cef793a105cc839e9cc5b4c674 100644 --- a/dumux/freeflow/navierstokes/momentum/diamond/indices.hh +++ b/dumux/freeflow/navierstokes/momentum/diamond/indices.hh @@ -24,49 +24,14 @@ #ifndef DUMUX_NAVIERSTOKES_MOMENTUM_DIAMOND_INDICES_HH #define DUMUX_NAVIERSTOKES_MOMENTUM_DIAMOND_INDICES_HH -namespace Dumux { - -/*! - * \ingroup NavierStokesModel - * \brief The common indices for the isothermal Navier-Stokes model. - * - * \tparam dimension The dimension of the problem - */ -template <int dimension> -struct NavierStokesMomentumDiamondIndices -{ - static constexpr int dimXIdx = 0; //!< Index of the x-component of a vector of size dim - static constexpr int dimYIdx = 1; //!< Index of the y-component of a vector of size dim - static constexpr int dimZIdx = 2; //!< Index of the z-component of a vector of size dim - - static constexpr auto dim = dimension; - - static constexpr int momentumXBalanceIdx = 0; //!< Index of the momentum balance equation - static constexpr int momentumYBalanceIdx = 1; //!< Index of the momentum balance equation - static constexpr int momentumZBalanceIdx = 2; //!< Index of the momentum balance equation +#warning "This header is deprecated and will be removed after 3.7" - static constexpr int velocityXIdx = 0; //!< Index of the velocity in a solution vector - static constexpr int velocityYIdx = 1; //!< Index of the velocity in a solution vector - static constexpr int velocityZIdx = 2; //!< Index of the velocity in a solution vector +#include <dumux/freeflow/navierstokes/momentum/cvfe/indices.hh> - /*! - * \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; - } +namespace Dumux { - /*! - * \brief Index of the momentum balance equation given the direction - * \param dirIdx The index of the direction. - */ - static constexpr int momentumBalanceIdx(int dirIdx) - { - return dirIdx; - } -}; +template <int dimension> +using NavierStokesMomentumDiamondIndices [[deprecated("Use NavierStokesMomentumCVFEIndices")]] = NavierStokesMomentumCVFEIndices<dimension>; } // end namespace Dumux diff --git a/dumux/freeflow/navierstokes/momentum/diamond/model.hh b/dumux/freeflow/navierstokes/momentum/diamond/model.hh index e4d62806b59741bdde76a449aff3eb30f33d6a18..6f0ed42abc743eca010f3851f270081ea6448ee9 100644 --- a/dumux/freeflow/navierstokes/momentum/diamond/model.hh +++ b/dumux/freeflow/navierstokes/momentum/diamond/model.hh @@ -58,8 +58,7 @@ #include <dumux/freeflow/navierstokes/momentum/cvfe/localresidual.hh> #include <dumux/freeflow/navierstokes/momentum/cvfe/volumevariables.hh> - -#include "indices.hh" +#include <dumux/freeflow/navierstokes/momentum/cvfe/indices.hh> namespace Dumux { @@ -102,7 +101,7 @@ struct NavierStokesMomentumDiamondModelTraits { return TurbulenceModel::none; } //! the indices - using Indices = NavierStokesMomentumDiamondIndices<dim()>; + using Indices = NavierStokesMomentumCVFEIndices<dim()>; }; /*! diff --git a/dumux/freeflow/navierstokes/momentum/pq1bubble/indices.hh b/dumux/freeflow/navierstokes/momentum/pq1bubble/indices.hh index ba2d9c4b5213aafdf432a0b1737a11f8b6bb6d3f..31824b7a0e74aa76fd458787ba78668a716986ca 100644 --- a/dumux/freeflow/navierstokes/momentum/pq1bubble/indices.hh +++ b/dumux/freeflow/navierstokes/momentum/pq1bubble/indices.hh @@ -24,18 +24,15 @@ #ifndef DUMUX_NAVIERSTOKES_MOMENTUM_PQ1BUBBLE_INDICES_HH #define DUMUX_NAVIERSTOKES_MOMENTUM_PQ1BUBBLE_INDICES_HH -#include <dumux/freeflow/navierstokes/momentum/diamond/indices.hh> + +#warning "This header is deprecated and will be removed after 3.7" + +#include <dumux/freeflow/navierstokes/momentum/cvfe/indices.hh> namespace Dumux { -/*! - * \ingroup NavierStokesModel - * \brief The common indices for the isothermal Navier-Stokes model. - * - * \tparam dimension The dimension of the problem - */ template <int dimension> -using NavierStokesMomentumPQ1BubbleIndices = NavierStokesMomentumDiamondIndices<dimension>; +using NavierStokesMomentumPQ1BubbleIndices [[deprecated("Use NavierStokesMomentumCVFEIndices")]] = NavierStokesMomentumCVFEIndices<dimension>; } // end namespace Dumux diff --git a/dumux/freeflow/navierstokes/momentum/pq1bubble/model.hh b/dumux/freeflow/navierstokes/momentum/pq1bubble/model.hh index 1d74c144a5d4aa1718bc3ee2359c9a204217b26d..d5f2bbc080c8c06416a8b0bb1c4334c85018f8d6 100644 --- a/dumux/freeflow/navierstokes/momentum/pq1bubble/model.hh +++ b/dumux/freeflow/navierstokes/momentum/pq1bubble/model.hh @@ -58,8 +58,7 @@ #include <dumux/freeflow/navierstokes/momentum/cvfe/localresidual.hh> #include <dumux/freeflow/navierstokes/momentum/cvfe/volumevariables.hh> - -#include "indices.hh" +#include <dumux/freeflow/navierstokes/momentum/cvfe/indices.hh> namespace Dumux { @@ -102,7 +101,7 @@ struct NavierStokesMomentumPQ1BubbleModelTraits { return TurbulenceModel::none; } //! the indices - using Indices = NavierStokesMomentumPQ1BubbleIndices<dim()>; + using Indices = NavierStokesMomentumCVFEIndices<dim()>; }; /*!