eliminate 'constexpr'

use 'const' instead to make old compilers happy. the disadvantage is
that you cannot use the normal methods for template specialization,
but this currently should not be a major drawback.
This commit is contained in:
Andreas Lauser
2013-06-06 11:21:02 +02:00
parent ab457223b8
commit c66ee6de33
32 changed files with 212 additions and 220 deletions

View File

@@ -52,15 +52,15 @@ inline Scalar henryIAPWS(Scalar E,
Scalar Tr = temperature/H2O::criticalTemperature();
Scalar tau = 1 - Tr;
static constexpr Scalar c[6] = {
static const Scalar c[6] = {
1.99274064, 1.09965342, -0.510839303,
-1.75493479,-45.5170352, -6.7469445e5
};
static constexpr Scalar d[6] = {
static const Scalar d[6] = {
1/3.0, 2/3.0, 5/3.0,
16/3.0, 43/3.0, 110/3.0
};
static constexpr Scalar q = -0.023767;
static const Scalar q = -0.023767;
Scalar f = 0;
for (int i = 0; i < 6; ++i) {

View File

@@ -54,19 +54,19 @@ public:
*
* Taken from constrelair.hh.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return 0.02896; /* [kg/mol] */ }
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of \f$AIR\f$.
*/
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return 132.531 ; /* [K] */ }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of \f$AIR\f$.
*/
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return 37.86e5; /* [Pa] */ }
/*!
@@ -84,13 +84,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!

View File

@@ -145,13 +145,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static const bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static const bool gasIsIdeal()
{ return false; }
/*!

View File

@@ -52,7 +52,7 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of TCE.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return 131.39e-3; /* [kg/mol] */ };
/*!
@@ -67,13 +67,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!
@@ -92,7 +92,7 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!
@@ -101,7 +101,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static constexpr Scalar liquidDensity(Scalar temperature, Scalar pressure)
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
{ return 1460.0; /* [kg/m^3] */ }
/*!
@@ -110,7 +110,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static const Scalar liquidViscosity(Scalar temperature, Scalar pressure)
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
{ return 5.7e-4; /* [Pa s] */ };
/*!
@@ -119,7 +119,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static const Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
{ return 120.0/molarMass() * temperature; /* [J/kg] */ }
/*!
@@ -130,7 +130,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static const Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
{ return 0.3; }
};

View File

@@ -73,43 +73,43 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of water.
*/
static constexpr Scalar molarMass()
static const Scalar molarMass()
{ return Common::molarMass; }
/*!
* \brief The acentric factor \f$\mathrm{[-]}\f$ of water.
*/
static constexpr Scalar acentricFactor()
static const Scalar acentricFactor()
{ return Common::acentricFactor; }
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of water
*/
static constexpr Scalar criticalTemperature()
static const Scalar criticalTemperature()
{ return Common::criticalTemperature; }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of water.
*/
static constexpr Scalar criticalPressure()
static const Scalar criticalPressure()
{ return Common::criticalPressure; }
/*!
* \brief Returns the molar volume \f$\mathrm{[m^3/mol]}\f$ of water at the critical point
*/
static constexpr Scalar criticalMolarVolume()
static const Scalar criticalMolarVolume()
{ return Common::criticalMolarVolume; }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at water's triple point.
*/
static constexpr Scalar tripleTemperature()
static const Scalar tripleTemperature()
{ return Common::tripleTemperature; }
/*!
* \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at water's triple point.
*/
static constexpr Scalar triplePressure()
static const Scalar triplePressure()
{ return Common::triplePressure; }
/*!
@@ -516,13 +516,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static const bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
static constexpr bool liquidIsCompressible()
static const bool liquidIsCompressible()
{ return true; }
/*!
@@ -600,7 +600,7 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static const bool gasIsIdeal()
{ return false; }
/*!

View File

@@ -153,29 +153,29 @@ public:
*/
static Scalar thermalConductivityIAPWS(Scalar T, Scalar rho)
{
static constexpr Scalar thcond_tstar = 647.26 ;
static constexpr Scalar thcond_rhostar = 317.7 ;
/*static constexpr Scalar thcond_kstar = 1.0 ;*/
static const Scalar thcond_tstar = 647.26 ;
static const Scalar thcond_rhostar = 317.7 ;
/*static const Scalar thcond_kstar = 1.0 ;*/
static constexpr Scalar thcond_b0 = -0.397070 ;
static constexpr Scalar thcond_b1 = 0.400302 ;
static constexpr Scalar thcond_b2 = 1.060000 ;
static constexpr Scalar thcond_B1 = -0.171587 ;
static constexpr Scalar thcond_B2 = 2.392190 ;
static const Scalar thcond_b0 = -0.397070 ;
static const Scalar thcond_b1 = 0.400302 ;
static const Scalar thcond_b2 = 1.060000 ;
static const Scalar thcond_B1 = -0.171587 ;
static const Scalar thcond_B2 = 2.392190 ;
static constexpr Scalar thcond_c1 = 0.642857 ;
static constexpr Scalar thcond_c2 = -4.11717 ;
static constexpr Scalar thcond_c3 = -6.17937 ;
static constexpr Scalar thcond_c4 = 0.00308976 ;
static constexpr Scalar thcond_c5 = 0.0822994 ;
static constexpr Scalar thcond_c6 = 10.0932 ;
static const Scalar thcond_c1 = 0.642857 ;
static const Scalar thcond_c2 = -4.11717 ;
static const Scalar thcond_c3 = -6.17937 ;
static const Scalar thcond_c4 = 0.00308976 ;
static const Scalar thcond_c5 = 0.0822994 ;
static const Scalar thcond_c6 = 10.0932 ;
static constexpr Scalar thcond_d1 = 0.0701309 ;
static constexpr Scalar thcond_d2 = 0.0118520 ;
static constexpr Scalar thcond_d3 = 0.00169937 ;
static constexpr Scalar thcond_d4 = -1.0200 ;
static constexpr int thcond_a_count = 4;
static constexpr Scalar thcond_a[thcond_a_count] = {
static const Scalar thcond_d1 = 0.0701309 ;
static const Scalar thcond_d2 = 0.0118520 ;
static const Scalar thcond_d3 = 0.00169937 ;
static const Scalar thcond_d4 = -1.0200 ;
static const int thcond_a_count = 4;
static const Scalar thcond_a[thcond_a_count] = {
0.0102811
,0.0299621
,0.0156146

View File

@@ -287,7 +287,7 @@ public:
private:
static Scalar n(int i)
{
static constexpr Scalar n[34] = {
static const Scalar n[34] = {
0.14632971213167, -0.84548187169114, -0.37563603672040e1,
0.33855169168385e1, -0.95791963387872, 0.15772038513228,
-0.16616417199501e-1, 0.81214629983568e-3, 0.28319080123804e-3,

View File

@@ -323,7 +323,7 @@ public:
private:
static Scalar n_g(int i)
{
static constexpr Scalar n[9] = {
static const Scalar n[9] = {
-0.96927686500217e1, 0.10086655968018e2, -0.56087911283020e-2,
0.71452738081455e-1, -0.40710498223928, 0.14240819171444e1,
-0.43839511319450e1, -0.28408632460772, 0.21268463753307e-1
@@ -333,7 +333,7 @@ private:
static Scalar n_r(int i)
{
static constexpr Scalar n[43] = {
static const Scalar n[43] = {
-0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1,
-0.57581259083432e-1, -0.50325278727930e-1, -0.33032641670203e-4,
-0.18948987516315e-3, -0.39392777243355e-2, -0.43797295650573e-1,

View File

@@ -56,7 +56,7 @@ public:
*/
static Scalar saturationPressure(Scalar temperature)
{
static constexpr Scalar n[10] = {
static const Scalar n[10] = {
0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
-0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,

View File

@@ -48,7 +48,7 @@ public:
/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!
@@ -57,7 +57,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static constexpr Scalar liquidDensity(Scalar temperature, Scalar pressure)
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
{ return 890; }
/*!
@@ -66,7 +66,7 @@ public:
* \param temperature temperature of component in \f$\mathrm{[K]}\f$
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
static constexpr Scalar liquidViscosity(Scalar temperature, Scalar pressure)
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
{ return 8e-3; };
};

View File

@@ -52,25 +52,25 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of mesitylene
*/
constexpr static Scalar molarMass()
static Scalar molarMass()
{ return 0.120; }
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of mesitylene
*/
constexpr static Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return 637.3; }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of mesitylene
*/
constexpr static Scalar criticalPressure()
static Scalar criticalPressure()
{ return 31.3e5; }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at mesitylene's boiling point (1 atm).
*/
constexpr static Scalar boilingTemperature()
static Scalar boilingTemperature()
{ return 437.9; }
/*!
@@ -140,9 +140,9 @@ public:
temperature = std::min(temperature, criticalTemperature()); // regularization
temperature = std::max(temperature, 0.0); // regularization
constexpr Scalar T_crit = criticalTemperature();
constexpr Scalar Tr1 = boilingTemperature()/criticalTemperature();
constexpr Scalar p_crit = criticalPressure();
const Scalar T_crit = criticalTemperature();
const Scalar Tr1 = boilingTemperature()/criticalTemperature();
const Scalar p_crit = criticalPressure();
// Chen method, eq. 7-11.4 (at boiling)
const Scalar DH_v_boil =
@@ -198,19 +198,19 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!

View File

@@ -56,31 +56,31 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular nitrogen.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return 28.0134e-3;}
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of molecular nitrogen
*/
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return 126.192; /* [K] */ }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of molecular nitrogen.
*/
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return 3.39858e6; /* [N/m^2] */ }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at molecular nitrogen's triple point.
*/
static constexpr Scalar tripleTemperature()
static Scalar tripleTemperature()
{ return 63.151; /* [K] */ }
/*!
* \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at molecular nitrogen's triple point.
*/
static constexpr Scalar triplePressure()
static Scalar triplePressure()
{ return 12.523e3; /* [N/m^2] */ }
/*!
@@ -136,13 +136,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!

View File

@@ -85,13 +85,13 @@ public:
/*!
* \copydoc Component::gasIsCompressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \copydoc Component::gasIsIdeal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!

View File

@@ -63,31 +63,31 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of water.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return 18e-3; }
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of water.
*/
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return 647.096; /* [K] */ }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of water.
*/
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return 22.064e6; /* [N/m^2] */ }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at water's triple point.
*/
static constexpr Scalar tripleTemperature()
static Scalar tripleTemperature()
{ return 273.16; /* [K] */ }
/*!
* \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at water's triple point.
*/
static constexpr Scalar triplePressure()
static Scalar triplePressure()
{ return 611.657; /* [N/m^2] */ }
/*!
@@ -109,7 +109,7 @@ public:
if (T < tripleTemperature())
return 0; // water is solid: We don't take sublimation into account
static constexpr Scalar n[10] = {
static const Scalar n[10] = {
0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
-0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,
@@ -207,13 +207,13 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \brief Returns true iff the liquid phase is assumed to be compressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!
@@ -231,7 +231,7 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!

View File

@@ -230,31 +230,31 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the component.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return RawComponent::molarMass(); }
/*!
* \brief Returns the critical temperature in \f$\mathrm{[K]}\f$ of the component.
*/
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return RawComponent::criticalTemperature(); }
/*!
* \brief Returns the critical pressure in \f$\mathrm{[Pa]}\f$ of the component.
*/
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return RawComponent::criticalPressure(); }
/*!
* \brief Returns the temperature in \f$\mathrm{[K]}\f$ at the component's triple point.
*/
static constexpr Scalar tripleTemperature()
static Scalar tripleTemperature()
{ return RawComponent::tripleTemperature(); }
/*!
* \brief Returns the pressure in \f$\mathrm{[Pa]}\f$ at the component's triple point.
*/
static constexpr Scalar triplePressure()
static Scalar triplePressure()
{ return RawComponent::triplePressure(); }
/*!
@@ -411,7 +411,7 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be compressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return RawComponent::gasIsCompressible(); }
/*!
@@ -423,7 +423,7 @@ public:
/*!
* \brief Returns true iff the gas phase is assumed to be ideal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return RawComponent::gasIsIdeal(); }

View File

@@ -87,13 +87,13 @@ public:
/*!
* \copydoc Component::liquidIsCompressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!
* \copydoc Component::gasIsCompressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return false; }
/*!

View File

@@ -54,27 +54,21 @@ public:
/*!
* \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of xylene
*/
constexpr static Scalar molarMass()
static Scalar molarMass()
{ return 0.106; }
/*!
* \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of xylene
*/
constexpr static Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return 617.1; }
/*!
* \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of xylene
*/
constexpr static Scalar criticalPressure()
static Scalar criticalPressure()
{ return 35.4e5; }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at xylene's boiling point (1 atm).
*/
constexpr static Scalar boilingTemperature()
{ return 412.3; }
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at xylene's triple point.
*/
@@ -184,9 +178,9 @@ public:
temperature = std::min(temperature, criticalTemperature()); // regularization
temperature = std::max(temperature, 0.0); // regularization
constexpr Scalar T_crit = criticalTemperature();
constexpr Scalar Tr1 = boilingTemperature()/criticalTemperature();
constexpr Scalar p_crit = criticalPressure();
const Scalar T_crit = criticalTemperature();
const Scalar Tr1 = boilingTemperature()/criticalTemperature();
const Scalar p_crit = criticalPressure();
// Chen method, eq. 7-11.4 (at boiling)
const Scalar DH_v_boil = Consts::R * T_crit * Tr1
@@ -269,19 +263,19 @@ public:
/*!
* \copydoc Component::gasIsCompressible
*/
static constexpr bool gasIsCompressible()
static bool gasIsCompressible()
{ return true; }
/*!
* \copydoc Component::gasIsIdeal
*/
static constexpr bool gasIsIdeal()
static bool gasIsIdeal()
{ return true; }
/*!
* \copydoc Component::liquidIsCompressible
*/
static constexpr bool liquidIsCompressible()
static bool liquidIsCompressible()
{ return false; }
/*!

View File

@@ -231,7 +231,7 @@ protected:
}
// assemble jacobian matrix of the constraints for the composition
static constexpr Scalar eps = std::numeric_limits<Scalar>::epsilon()*1e6;
static const Scalar eps = std::numeric_limits<Scalar>::epsilon()*1e6;
for (int i = 0; i < numComponents; ++ i) {
////////
// approximately calculate partial derivatives of the

View File

@@ -63,15 +63,15 @@ namespace Opm {
template <class Scalar, class FluidSystem>
class ImmiscibleFlash
{
static constexpr int numPhases = FluidSystem::numPhases;
static constexpr int numComponents = FluidSystem::numComponents;
static const int numPhases = FluidSystem::numPhases;
static const int numComponents = FluidSystem::numComponents;
static_assert(numPhases == numComponents,
"Immiscibility assumes that the number of phases"
" is equal to the number of components");
typedef typename FluidSystem::ParameterCache ParameterCache;
static constexpr int numEq = numPhases;
static const int numEq = numPhases;
typedef Dune::FieldMatrix<Scalar, numEq, numEq> Matrix;
typedef Dune::FieldVector<Scalar, numEq> Vector;

View File

@@ -114,8 +114,8 @@ private:
template <class Scalar, class FluidSystem>
class MiscibleMultiPhaseComposition
{
static constexpr int numPhases = FluidSystem::numPhases;
static constexpr int numComponents = FluidSystem::numComponents;
static const int numPhases = FluidSystem::numPhases;
static const int numComponents = FluidSystem::numComponents;
static_assert(numPhases <= numComponents,
"This solver requires that the number fluid phases is smaller or equal "
@@ -180,7 +180,7 @@ public:
// create the linear system of equations which defines the
// mole fractions
static constexpr int numEq = numComponents*numPhases;
static const int numEq = numComponents*numPhases;
Dune::FieldMatrix<Scalar, numEq, numEq> M(0.0);
Dune::FieldVector<Scalar, numEq> x(0.0);
Dune::FieldVector<Scalar, numEq> b(0.0);

View File

@@ -83,7 +83,7 @@ class NcpFlash
typedef typename FluidSystem::ParameterCache ParameterCache;
static constexpr int numEq = numPhases*(numComponents + 1);
static const int numEq = numPhases*(numComponents + 1);
typedef Dune::FieldMatrix<Scalar, numEq, numEq> Matrix;
typedef Dune::FieldVector<Scalar, numEq> Vector;

View File

@@ -66,7 +66,7 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numPhases
static constexpr int numPhases = 1;
static const int numPhases = 1;
//! \copydoc BaseFluidSystem::phaseName
static const char *phaseName(int phaseIdx)
@@ -77,7 +77,7 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -85,7 +85,7 @@ public:
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -94,7 +94,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -103,7 +103,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -116,7 +116,7 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numComponents
static constexpr int numComponents = 1;
static const int numComponents = 1;
//! \copydoc BaseFluidSystem::componentName
static const char *componentName(int compIdx)
@@ -127,7 +127,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static const Scalar molarMass(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
@@ -139,7 +139,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalTemperature(int compIdx)
static const Scalar criticalTemperature(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
@@ -151,7 +151,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalPressure(int compIdx)
static const Scalar criticalPressure(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
@@ -163,7 +163,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar acentricFactor(int compIdx)
static const Scalar acentricFactor(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);

View File

@@ -72,12 +72,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numPhases
static constexpr int numPhases = 2;
static const int numPhases = 2;
//! Index of the wetting phase
static constexpr int wPhaseIdx = 0;
static const int wPhaseIdx = 0;
//! Index of the non-wetting phase
static constexpr int nPhaseIdx = 1;
static const int nPhaseIdx = 1;
//! \copydoc BaseFluidSystem::phaseName
static const char *phaseName(int phaseIdx)
@@ -92,7 +92,7 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return
@@ -102,7 +102,7 @@ public:
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -113,7 +113,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -125,7 +125,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -138,12 +138,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numComponents
static constexpr int numComponents = 2;
static const int numComponents = 2;
//! Index of the wetting phase's component
static constexpr int wCompIdx = 0;
static const int wCompIdx = 0;
//! Index of the non-wetting phase's component
static constexpr int nCompIdx = 1;
static const int nCompIdx = 1;
//! \copydoc BaseFluidSystem::componentName
static const char *componentName(int compIdx)
@@ -156,7 +156,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
@@ -170,7 +170,7 @@ public:
/*!
* \brief Critical temperature of a component [K].
*/
static constexpr Scalar criticalTemperature(int compIdx)
static Scalar criticalTemperature(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
// let the fluids decide
@@ -183,7 +183,7 @@ public:
/*!
* \brief Critical pressure of a component [Pa].
*/
static constexpr Scalar criticalPressure(int compIdx)
static Scalar criticalPressure(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
// let the fluids decide
@@ -196,7 +196,7 @@ public:
/*!
* \brief The acentric factor of a component [].
*/
static constexpr Scalar acentricFactor(int compIdx)
static Scalar acentricFactor(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
// let the fluids decide

View File

@@ -286,7 +286,7 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(const int phaseIdx)
static bool isLiquid(const int phaseIdx)
{
// assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
@@ -320,7 +320,7 @@ public:
{ return molarMass_[compIdx]; }
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
// fugacity coefficients are only pressure dependent -> we
// have an ideal mixture
@@ -328,11 +328,11 @@ public:
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{ return true; /* all phases are compressible */ }
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{ return false; }
/****************************************

View File

@@ -48,49 +48,49 @@ public:
/*!
* \brief Returs whether the fluid is a liquid
*/
static constexpr bool isLiquid()
static bool isLiquid()
{ return false; }
/*!
* \brief Returns true iff the fluid is assumed to be compressible
*/
static constexpr bool isCompressible()
static bool isCompressible()
{ return Component::gasIsCompressible(); }
/*!
* \brief Returns true iff the fluid is assumed to be an ideal gas
*/
static constexpr bool isIdealGas()
static bool isIdealGas()
{ return Component::gasIsIdeal(); }
/*!
* \brief The mass in [kg] of one mole of the component.
*/
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return Component::molarMass(); }
/*!
* \brief Returns the critical temperature of the component
*/
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return Component::criticalTemperature(); }
/*!
* \brief Returns the critical pressure of the component
*/
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return Component::criticalPressure(); }
/*!
* \brief Returns the temperature at the component's triple point.
*/
static constexpr Scalar tripleTemperature()
static Scalar tripleTemperature()
{ return Component::tripleTemperature(); }
/*!
* \brief Returns the pressure at the component's triple point.
*/
static constexpr Scalar triplePressure()
static Scalar triplePressure()
{ return Component::triplePressure(); }
/*!

View File

@@ -71,12 +71,12 @@ public:
typedef Opm::Air<Scalar> Air;
//! \copydoc BaseFluidSystem::numPhases
static constexpr int numPhases = 2;
static const int numPhases = 2;
//! The index of the liquid phase
static constexpr int lPhaseIdx = 0;
static const int lPhaseIdx = 0;
//! The index of the gas phase
static constexpr int gPhaseIdx = 1;
static const int gPhaseIdx = 1;
//! \copydoc BaseFluidSystem::phaseName
static const char *phaseName(int phaseIdx)
@@ -89,14 +89,14 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return (phaseIdx == gPhaseIdx)
@@ -108,7 +108,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
return
(phaseIdx == gPhaseIdx)
@@ -117,7 +117,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// we assume Henry's and Rault's laws for the water phase and
@@ -131,12 +131,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numComponents
static constexpr int numComponents = 2;
static const int numComponents = 2;
//! The index of the water component
static constexpr int H2OIdx = 0;
static const int H2OIdx = 0;
//! The index of the air component
static constexpr int AirIdx = 1;
static const int AirIdx = 1;
//! \copydoc BaseFluidSystem::componentName
static const char *componentName(int compIdx)
@@ -150,7 +150,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -166,7 +166,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalTemperature(int compIdx)
static Scalar criticalTemperature(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -181,7 +181,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalPressure(int compIdx)
static Scalar criticalPressure(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -196,7 +196,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar acentricFactor(int compIdx)
static Scalar acentricFactor(int compIdx)
{
return
(compIdx == H2OIdx)

View File

@@ -128,18 +128,18 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{ return phaseIdx == gPhaseIdx && H2O::gasIsIdeal() && Air::gasIsIdeal() && NAPL::gasIsIdeal(); }
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// gases are always compressible
@@ -151,7 +151,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// we assume Henry's and Rault's laws for the water phase and
@@ -183,7 +183,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
return
(compIdx == H2OIdx)

View File

@@ -87,18 +87,18 @@ public:
{ }
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{ return phaseIdx == gPhaseIdx && H2O::gasIsIdeal() && Air::gasIsIdeal() && NAPL::gasIsIdeal(); }
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -109,7 +109,7 @@ public:
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
return
(phaseIdx == gPhaseIdx)
@@ -145,7 +145,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
return
(compIdx == H2OIdx)

View File

@@ -68,12 +68,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numPhases
static constexpr int numPhases = 2;
static const int numPhases = 2;
//! Index of the liquid phase
static constexpr int lPhaseIdx = 0;
static const int lPhaseIdx = 0;
//! Index of the gas phase
static constexpr int gPhaseIdx = 1;
static const int gPhaseIdx = 1;
//! \copydoc BaseFluidSystem::phaseName
static const char *phaseName(int phaseIdx)
@@ -88,14 +88,14 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// gases are always compressible
@@ -106,7 +106,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
@@ -117,7 +117,7 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// we assume Henry's and Rault's laws for the water phase and
@@ -131,12 +131,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numComponents
static constexpr int numComponents = 2;
static const int numComponents = 2;
//! The component index of water
static constexpr int H2OIdx = 0;
static const int H2OIdx = 0;
//! The component index of molecular nitrogen
static constexpr int N2Idx = 1;
static const int N2Idx = 1;
//! The component for pure water
typedef TabulatedH2O H2O;
@@ -159,7 +159,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
return (compIdx == H2OIdx)
@@ -174,7 +174,7 @@ public:
*
* \copydetails Doxygen::compIdxParam
*/
static constexpr Scalar criticalTemperature(int compIdx)
static Scalar criticalTemperature(int compIdx)
{
return (compIdx == H2OIdx)
? H2O::criticalTemperature()
@@ -188,7 +188,7 @@ public:
*
* \copydetails Doxygen::compIdxParam
*/
static constexpr Scalar criticalPressure(int compIdx)
static Scalar criticalPressure(int compIdx)
{
return (compIdx == H2OIdx)
? H2O::criticalPressure()
@@ -202,7 +202,7 @@ public:
*
* \copydetails Doxygen::compIdxParam
*/
static constexpr Scalar acentricFactor(int compIdx)
static Scalar acentricFactor(int compIdx)
{
return (compIdx == H2OIdx)
? H2O::acentricFactor()

View File

@@ -69,10 +69,10 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numPhases
static constexpr int numPhases = 1;
static const int numPhases = 1;
//! Index of the liquid phase
static constexpr int lPhaseIdx = 0;
static const int lPhaseIdx = 0;
//! \copydoc BaseFluidSystem::phaseName
static const char *phaseName(int phaseIdx)
@@ -83,14 +83,14 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(phaseIdx == lPhaseIdx);
return true; //only water phase present
}
//! \copydoc BaseFluidSystem::isCompressible
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// the water component decides for the liquid phase...
@@ -98,14 +98,14 @@ public:
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return false; // not a gas (only liquid phase present)
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
// we assume Henry's and Rault's laws for the water phase and
@@ -119,12 +119,12 @@ public:
****************************************/
//! \copydoc BaseFluidSystem::numComponents
static constexpr int numComponents = 2;
static const int numComponents = 2;
//! The index of the water component
static constexpr int H2OIdx = 0;
static const int H2OIdx = 0;
//! The index of the component for molecular nitrogen
static constexpr int N2Idx = 1;
static const int N2Idx = 1;
//! The type of the component for pure water
typedef TabulatedH2O H2O;
@@ -147,7 +147,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
return (compIdx == H2OIdx)
@@ -162,7 +162,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalTemperature(int compIdx)
static Scalar criticalTemperature(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
return (compIdx == H2OIdx)
@@ -177,7 +177,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar criticalPressure(int compIdx)
static Scalar criticalPressure(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
return (compIdx == H2OIdx)
@@ -192,7 +192,7 @@ public:
*
* \param compIdx The index of the component to consider
*/
static constexpr Scalar acentricFactor(int compIdx)
static Scalar acentricFactor(int compIdx)
{
//assert(0 <= compIdx && compIdx < numComponents);
return (compIdx == H2OIdx)

View File

@@ -42,35 +42,35 @@ public:
{ return Component::name(); }
//! \copydoc GasPhase::isLiquid
static constexpr bool isLiquid()
static bool isLiquid()
{ return true; }
//! \copydoc GasPhase::isCompressible
static constexpr bool isCompressible()
static bool isCompressible()
{ return Component::liquidIsCompressible(); }
//! \copydoc GasPhase::isIdealGas
static constexpr bool isIdealGas()
static bool isIdealGas()
{ return false; /* we're a liquid! */ }
//! \copydoc GasPhase::molarMass
static constexpr Scalar molarMass()
static Scalar molarMass()
{ return Component::molarMass(); }
//! \copydoc GasPhase::criticalTemperature
static constexpr Scalar criticalTemperature()
static Scalar criticalTemperature()
{ return Component::criticalTemperature(); }
//! \copydoc GasPhase::criticalPressure
static constexpr Scalar criticalPressure()
static Scalar criticalPressure()
{ return Component::criticalPressure(); }
//! \copydoc GasPhase::tripleTemperature
static constexpr Scalar tripleTemperature()
static Scalar tripleTemperature()
{ return Component::tripleTemperature(); }
//! \copydoc GasPhase::triplePressure
static constexpr Scalar triplePressure()
static Scalar triplePressure()
{ return Component::triplePressure(); }
//! \copydoc GasPhase::vaporPressure

View File

@@ -92,7 +92,7 @@ public:
}
//! \copydoc BaseFluidSystem::isLiquid
static constexpr bool isLiquid(int phaseIdx)
static bool isLiquid(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx != gPhaseIdx;
@@ -103,21 +103,21 @@ public:
*
* In the SPE-5 problems all fluids are compressible...
*/
static constexpr bool isCompressible(int phaseIdx)
static bool isCompressible(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return true;
}
//! \copydoc BaseFluidSystem::isIdealGas
static constexpr bool isIdealGas(int phaseIdx)
static bool isIdealGas(int phaseIdx)
{
//assert(0 <= phaseIdx && phaseIdx < numPhases);
return false; // gas is not ideal here!
}
//! \copydoc BaseFluidSystem::isIdealMixture
static constexpr bool isIdealMixture(int phaseIdx)
static bool isIdealMixture(int phaseIdx)
{
// always use the reference oil for the fugacity coefficents,
// so they cannot be dependent on composition and they the
@@ -158,7 +158,7 @@ public:
}
//! \copydoc BaseFluidSystem::molarMass
static constexpr Scalar molarMass(int compIdx)
static Scalar molarMass(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -181,7 +181,7 @@ public:
/*!
* \brief Critical temperature of a component [K].
*/
static constexpr Scalar criticalTemperature(int compIdx)
static Scalar criticalTemperature(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -204,7 +204,7 @@ public:
/*!
* \brief Critical pressure of a component [Pa].
*/
static constexpr Scalar criticalPressure(int compIdx)
static Scalar criticalPressure(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -250,7 +250,7 @@ public:
/*!
* \brief The acentric factor of a component [].
*/
static constexpr Scalar acentricFactor(int compIdx)
static Scalar acentricFactor(int compIdx)
{
return
(compIdx == H2OIdx)
@@ -277,8 +277,6 @@ public:
*/
static Scalar interactionCoefficient(int comp1Idx, int comp2Idx)
{
// TODO: make this a constexpr method !?
int i = std::min(comp1Idx, comp2Idx);
int j = std::max(comp1Idx, comp2Idx);
if (i == C1Idx && (j == C15Idx || j == C20Idx))