From a81d6662966bcea0721e02df220b6ae6fc49e910 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Sat, 7 Apr 2018 12:41:41 +0200 Subject: [PATCH] [fluidsystems] Assert phase statein 1pgas/liquid fluidsystem --- dumux/material/fluidsystems/1pgas.hh | 3 +++ dumux/material/fluidsystems/1pliquid.hh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dumux/material/fluidsystems/1pgas.hh b/dumux/material/fluidsystems/1pgas.hh index 9da96e6dc3..57425a9111 100644 --- a/dumux/material/fluidsystems/1pgas.hh +++ b/dumux/material/fluidsystems/1pgas.hh @@ -30,6 +30,7 @@ #include <dune/common/exceptions.hh> #include <dumux/material/fluidsystems/base.hh> +#include <dumux/material/components/componenttraits.hh> namespace Dumux { @@ -48,6 +49,8 @@ class OnePGas using ThisType = OnePGas<Scalar, ComponentT>; using Base = BaseFluidSystem<Scalar, ThisType>; + static_assert(ComponentTraits<ComponentT>::hasGasState, "The component does not implement a gas state!"); + public: using Component = ComponentT; using ParameterCache = NullParameterCache; diff --git a/dumux/material/fluidsystems/1pliquid.hh b/dumux/material/fluidsystems/1pliquid.hh index 075f69dde8..96fa18d53d 100644 --- a/dumux/material/fluidsystems/1pliquid.hh +++ b/dumux/material/fluidsystems/1pliquid.hh @@ -30,6 +30,7 @@ #include <dune/common/exceptions.hh> #include <dumux/material/fluidsystems/base.hh> +#include <dumux/material/components/componenttraits.hh> namespace Dumux { @@ -47,6 +48,8 @@ class OnePLiquid using ThisType = OnePLiquid<Scalar, ComponentT>; using Base = BaseFluidSystem<Scalar, ThisType>; + static_assert(ComponentTraits<ComponentT>::hasLiquidState, "The component does not implement a liquid state!"); + public: using Component = ComponentT; using ParameterCache = NullParameterCache; -- GitLab