Skip to content
Snippets Groups Projects
Commit 951fd0a1 authored by Beatrix Becker's avatar Beatrix Becker
Browse files

[nonisothermal] remove TypeTag from indices

parent 2a26c4b4
No related branches found
No related tags found
1 merge request!838Feature/less typetag in indices
...@@ -37,11 +37,11 @@ namespace Dumux ...@@ -37,11 +37,11 @@ namespace Dumux
* \tparam formulation The formulation, either pwsn or pnsw. * \tparam formulation The formulation, either pwsn or pnsw.
* \tparam PVOffset The first index in a primary variable vector. * \tparam PVOffset The first index in a primary variable vector.
*/ */
template <class TypeTag, int PVOffset = 0> template <class IsothermalIndices, int numEquation, int PVOffset = 0>
class EnergyIndices : public GET_PROP_TYPE(TypeTag, IsothermalIndices) class EnergyIndices : public IsothermalIndices
{ {
public: public:
static const int numEq = GET_PROP_VALUE(TypeTag, NumEq); static const int numEq = numEquation;
static const int temperatureIdx = PVOffset + numEq -1; //!< The index for temperature in primary variable vectors. static const int temperatureIdx = PVOffset + numEq -1; //!< The index for temperature in primary variable vectors.
static const int energyEqIdx = PVOffset + numEq -1; //!< The index for energy in equation vectors. static const int energyEqIdx = PVOffset + numEq -1; //!< The index for energy in equation vectors.
......
...@@ -68,7 +68,14 @@ SET_BOOL_PROP(NonIsothermal, EnableEnergyBalance, true); ...@@ -68,7 +68,14 @@ SET_BOOL_PROP(NonIsothermal, EnableEnergyBalance, true);
SET_INT_PROP(NonIsothermal, NumEq, GET_PROP_VALUE(TypeTag, IsothermalNumEq) + 1); SET_INT_PROP(NonIsothermal, NumEq, GET_PROP_VALUE(TypeTag, IsothermalNumEq) + 1);
//! indices for non-isothermal models //! indices for non-isothermal models
SET_TYPE_PROP(NonIsothermal, Indices, EnergyIndices<TypeTag, 0>); SET_PROP(NonIsothermal, Indices)
{
private:
using IsothermalIndices = typename GET_PROP_TYPE(TypeTag, IsothermalIndices);
static constexpr int numEq = GET_PROP_VALUE(TypeTag, NumEq);
public:
using type = EnergyIndices<IsothermalIndices, numEq, 0>;
};
//! indices for non-isothermal models //! indices for non-isothermal models
SET_TYPE_PROP(NonIsothermal, VtkOutputFields, EnergyVtkOutputFields<TypeTag>); SET_TYPE_PROP(NonIsothermal, VtkOutputFields, EnergyVtkOutputFields<TypeTag>);
......
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