From dc49fcaf713298ff9ef7139d45f0330c280e99a5 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 7 Aug 2018 17:03:36 +0200 Subject: [PATCH] [components] Make isGasIdeal and isGasCompressible constexpr --- dumux/material/components/air.hh | 4 ++-- dumux/material/components/brine.hh | 4 ++-- dumux/material/components/ch4.hh | 4 ++-- dumux/material/components/h2.hh | 4 ++-- dumux/material/components/heavyoil.hh | 4 ++-- dumux/material/components/mesitylene.hh | 4 ++-- dumux/material/components/n2.hh | 4 ++-- dumux/material/components/simpleh2o.hh | 2 +- dumux/material/components/tabulatedcomponent.hh | 4 ++-- dumux/material/components/trichloroethene.hh | 4 ++-- dumux/material/components/xylene.hh | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dumux/material/components/air.hh b/dumux/material/components/air.hh index 196b3a207e..4758f68dea 100644 --- a/dumux/material/components/air.hh +++ b/dumux/material/components/air.hh @@ -99,13 +99,13 @@ public: /*! * \brief Returns true, the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true, the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/brine.hh b/dumux/material/components/brine.hh index 422bee5dae..ae6df588f7 100644 --- a/dumux/material/components/brine.hh +++ b/dumux/material/components/brine.hh @@ -281,13 +281,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return H2O::gasIsIdeal(); } /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return H2O::gasIsCompressible(); } /*! diff --git a/dumux/material/components/ch4.hh b/dumux/material/components/ch4.hh index 6011d61751..abca67f4dd 100644 --- a/dumux/material/components/ch4.hh +++ b/dumux/material/components/ch4.hh @@ -95,7 +95,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! @@ -122,7 +122,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/h2.hh b/dumux/material/components/h2.hh index f34e752452..9386b03c1f 100644 --- a/dumux/material/components/h2.hh +++ b/dumux/material/components/h2.hh @@ -131,13 +131,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/heavyoil.hh b/dumux/material/components/heavyoil.hh index 141d9b61f7..bdc4aeec9f 100644 --- a/dumux/material/components/heavyoil.hh +++ b/dumux/material/components/heavyoil.hh @@ -384,13 +384,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/mesitylene.hh b/dumux/material/components/mesitylene.hh index ec732d2d10..4486c3d71c 100644 --- a/dumux/material/components/mesitylene.hh +++ b/dumux/material/components/mesitylene.hh @@ -258,13 +258,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/n2.hh b/dumux/material/components/n2.hh index 04a953e6b7..4720451557 100644 --- a/dumux/material/components/n2.hh +++ b/dumux/material/components/n2.hh @@ -146,13 +146,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/simpleh2o.hh b/dumux/material/components/simpleh2o.hh index c6f34a39e2..5e56909c58 100644 --- a/dumux/material/components/simpleh2o.hh +++ b/dumux/material/components/simpleh2o.hh @@ -235,7 +235,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/tabulatedcomponent.hh b/dumux/material/components/tabulatedcomponent.hh index 497ca32364..405244859e 100644 --- a/dumux/material/components/tabulatedcomponent.hh +++ b/dumux/material/components/tabulatedcomponent.hh @@ -413,7 +413,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return RawComponent::gasIsCompressible(); } /*! @@ -425,7 +425,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return RawComponent::gasIsIdeal(); } diff --git a/dumux/material/components/trichloroethene.hh b/dumux/material/components/trichloroethene.hh index d1364126ec..bf30f45ce5 100644 --- a/dumux/material/components/trichloroethene.hh +++ b/dumux/material/components/trichloroethene.hh @@ -108,7 +108,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! @@ -149,7 +149,7 @@ public: /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! diff --git a/dumux/material/components/xylene.hh b/dumux/material/components/xylene.hh index 050612a15a..010be342dd 100644 --- a/dumux/material/components/xylene.hh +++ b/dumux/material/components/xylene.hh @@ -304,13 +304,13 @@ public: /*! * \brief Returns true if the gas phase is assumed to be compressible */ - static bool gasIsCompressible() + static constexpr bool gasIsCompressible() { return true; } /*! * \brief Returns true if the gas phase is assumed to be ideal */ - static bool gasIsIdeal() + static constexpr bool gasIsIdeal() { return true; } /*! -- GitLab