Skip to content

Commit

Permalink
Merge pull request #4231 from akva2/fix_components_debug_build
Browse files Browse the repository at this point in the history
fixed: make isTabulated constexpr and explicit use from base class
  • Loading branch information
bska authored Sep 25, 2024
2 parents 27aa07a + 469883d commit 27a6e80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions opm/material/components/Air.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class Air : public Component<Scalar, Air<Scalar> >
typedef ::Opm::IdealGas<Scalar> IdealGas;

public:
using Component<Scalar, Air<Scalar>>::isTabulated;

/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
Expand Down
2 changes: 1 addition & 1 deletion opm/material/components/Component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Component
public:
typedef ScalarT Scalar;

static const bool isTabulated = false;
static constexpr bool isTabulated = false;

/*!
* \brief A default routine for initialization, not needed for components and must not be called.
Expand Down
2 changes: 2 additions & 0 deletions opm/material/components/H2O.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class H2O : public Component<Scalar, H2O<Scalar> >
static const Scalar Rs; // specific gas constant of water

public:
using Component<Scalar, H2O<Scalar>>::isTabulated;

/*!
* \brief A human readable name for the water.
*/
Expand Down
2 changes: 1 addition & 1 deletion opm/material/components/TabulatedComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TabulatedComponent
public:
typedef ScalarT Scalar;

static const bool isTabulated = true;
static constexpr bool isTabulated = true;

/*!
* \brief Initialize the tables.
Expand Down

0 comments on commit 27a6e80

Please sign in to comment.