From ba271df93711389a5e063487b3d1d0d55a39b6c8 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 5 Apr 2018 19:51:34 +0200
Subject: [PATCH] [components] Export Scalar type is base class

---
 dumux/material/components/base.hh | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/dumux/material/components/base.hh b/dumux/material/components/base.hh
index 8605839dab..48213dd5b5 100644
--- a/dumux/material/components/base.hh
+++ b/dumux/material/components/base.hh
@@ -39,11 +39,16 @@
 namespace Dumux {
 namespace Components {
 
-template <class Scalar, class Implementation>
+template <class ScalarType, class Component>
 class Base
 {
 public:
-    static const bool isTabulated = false;
+
+    //! export the scalar type used by the component
+    using Scalar = ScalarType;
+
+    //! if the component relies on tabulated values
+    static constexpr bool isTabulated = false;
 
     /*!
      * \brief A default routine for initialization, not needed for components and must not be called.
@@ -65,7 +70,7 @@ public:
      * \brief A human readable name for the component.
      * \note Mandatory for all components
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static std::string name()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: name()");
@@ -75,7 +80,7 @@ public:
     /*!
      * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component.
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static constexpr Scalar molarMass()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: molarMass()");
@@ -85,7 +90,7 @@ public:
     /*!
      * \brief Returns the critical temperature in \f$\mathrm{[K]}\f$ of the component.
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static constexpr Scalar criticalTemperature()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: criticalTemperature()");
@@ -95,7 +100,7 @@ public:
     /*!
      * \brief Returns the critical pressure in \f$\mathrm{[Pa]}\f$ of the component.
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static constexpr Scalar criticalPressure()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: criticalPressure()");
@@ -105,7 +110,7 @@ public:
     /*!
      * \brief Returns the temperature in \f$\mathrm{[K]}\f$ at the component's triple point.
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static constexpr Scalar tripleTemperature()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: tripleTemperature()");
@@ -115,7 +120,7 @@ public:
     /*!
      * \brief Returns the pressure in \f$\mathrm{[Pa]}\f$ at the component's triple point.
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static constexpr Scalar triplePressure()
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: triplePressure()");
@@ -128,7 +133,7 @@ public:
      *
      * \param T temperature of the component in \f$\mathrm{[K]}\f$
      */
-    template<class C = Implementation>
+    template<class C = Component>
     static Scalar vaporPressure(Scalar t)
     {
         static_assert(AlwaysFalse<C>::value, "Mandatory function not implemented: vaporPressure(t)");
-- 
GitLab