From 226e4188a3f58f19b2468f375224d1db40306dd5 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 8 May 2018 13:11:27 +0200 Subject: [PATCH] [solidstate] Export solid system type --- dumux/material/solidstates/compositionalsolidstate.hh | 11 ++++++----- dumux/material/solidstates/inertsolidstate.hh | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dumux/material/solidstates/compositionalsolidstate.hh b/dumux/material/solidstates/compositionalsolidstate.hh index 3621afb101..68a7e0b60c 100644 --- a/dumux/material/solidstates/compositionalsolidstate.hh +++ b/dumux/material/solidstates/compositionalsolidstate.hh @@ -26,26 +26,27 @@ #ifndef DUMUX_SOLID_STATE_COMPOSITIONAL_HH #define DUMUX_SOLID_STATE_COMPOSITIONAL_HH -#include "updatesolidvolumefractions.hh" - -namespace Dumux -{ +namespace Dumux { /*! * \ingroup SolidStates * \brief Represents all relevant thermodynamic quantities of a inert * solid system */ -template <class Scalar, class SolidSystem> +template <class Scalar, class SolidSystemType> class CompositionalSolidState { public: + using SolidSystem = SolidSystemType; + enum { numComponents = SolidSystem::numComponents, numInertComponents = SolidSystem::numInertComponents, }; + static constexpr bool isInert() { return SolidSystem::isInert(); } + /*! * \brief The average molar mass \f$\overline M_\alpha\f$ of phase \f$\alpha\f$ in \f$\mathrm{[kg/mol]}\f$ * diff --git a/dumux/material/solidstates/inertsolidstate.hh b/dumux/material/solidstates/inertsolidstate.hh index dee1b2e576..fb86c49c7c 100644 --- a/dumux/material/solidstates/inertsolidstate.hh +++ b/dumux/material/solidstates/inertsolidstate.hh @@ -26,25 +26,25 @@ #ifndef DUMUX_INERT_SOLID_STATE_HH #define DUMUX_INERT_SOLID_STATE_HH -#include "updatesolidvolumefractions.hh" - -namespace Dumux -{ +namespace Dumux { /*! * \ingroup SolidStates * \brief Represents all relevant thermodynamic quantities of a inert * solid system */ -template <class Scalar, class SolidSystem> +template <class Scalar, class SolidSystemType> class InertSolidState { public: + using SolidSystem = SolidSystemType; + enum { numComponents = SolidSystem::numComponents, numInertComponents = SolidSystem::numInertComponents, }; + static constexpr bool isInert() { static_assert(SolidSystem::isInert(), "Only inert solid systems are allowed with the InertSolidState"); -- GitLab