From 1fcd5b5b17b233281ab6b1c0b17b2635922375c0 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Thu, 5 Apr 2018 19:59:16 +0200 Subject: [PATCH] [components] Derive Air component from base and gas --- dumux/material/components/air.hh | 3 ++- test/material/components/CMakeLists.txt | 3 ++- test/material/components/test_componenttraits.cc | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dumux/material/components/air.hh b/dumux/material/components/air.hh index 6b49313dc1..ae0264b97b 100644 --- a/dumux/material/components/air.hh +++ b/dumux/material/components/air.hh @@ -40,7 +40,8 @@ namespace Components { * \tparam Scalar The type used for scalar values */ template <class Scalar> -class Air : public Component<Scalar, Air<Scalar> > +class Air : public Components::Base<Scalar, Air<Scalar> >, + public Components::Gas<Scalar, Air<Scalar> > { using IdealGas = Dumux::IdealGas<Scalar>; diff --git a/test/material/components/CMakeLists.txt b/test/material/components/CMakeLists.txt index 80508e7a4d..3ca8fcc7aa 100644 --- a/test/material/components/CMakeLists.txt +++ b/test/material/components/CMakeLists.txt @@ -1,4 +1,5 @@ -dune_add_test(SOURCES test_componenttraits.cc) +dune_add_test(SOURCES test_componenttraits.cc + COMPILE_ONLY) add_executable(plot_component plotproperties.cc) diff --git a/test/material/components/test_componenttraits.cc b/test/material/components/test_componenttraits.cc index af88dd2ec0..976370946a 100644 --- a/test/material/components/test_componenttraits.cc +++ b/test/material/components/test_componenttraits.cc @@ -35,6 +35,7 @@ int main(int argc, char *argv[]) using Traits = ComponentTraits<Components::Air<double>>; static_assert(Traits::hasGasState, "Air component is reported to have no gas state?!"); - // static_assert(!Traits::hasSolidState, "Air component is reported to implement a solid state?!"); + static_assert(!Traits::hasSolidState, "Air component is reported to implement a solid state?!"); + static_assert(!Traits::hasLiquidState, "Air component is reported to implement a liquid state?!"); static_assert(std::is_same<double, Traits::Scalar>::value, "Scalar type not correctly reported!"); } -- GitLab