From 24dba01e99ef1d7d376f6ef3f2991cacba4e9f5b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 3 Aug 2021 09:12:52 +0200 Subject: [PATCH] changed: get rid of OPM_UNUSED macro usage prefer anonymous parameters and c++17 [[maybe_unused]] --- bin/genEvalSpecializations.py | 14 +++++++------- opm/material/checkFluidSystem.hpp | 18 +++++++++--------- opm/material/common/ConditionalStorage.hpp | 6 +++--- opm/material/common/MathToolbox.hpp | 8 ++++---- opm/material/common/Spline.hpp | 8 ++++---- opm/material/common/Tabulated1DFunction.hpp | 4 ++-- opm/material/common/quad.hpp | 2 +- opm/material/components/Air.hpp | 4 ++-- opm/material/components/Dnapl.hpp | 4 ++-- opm/material/components/Lnapl.hpp | 6 +++--- opm/material/components/N2.hpp | 4 ++-- opm/material/components/SimpleCO2.hpp | 12 ++++++------ opm/material/components/SimpleH2O.hpp | 8 ++++---- opm/material/components/SimpleHuDuanH2O.hpp | 8 ++++---- opm/material/densead/DynamicEvaluation.hpp | 4 ++-- opm/material/densead/Evaluation.hpp | 10 +++++----- opm/material/densead/Evaluation1.hpp | 10 +++++----- opm/material/densead/Evaluation10.hpp | 10 +++++----- opm/material/densead/Evaluation11.hpp | 10 +++++----- opm/material/densead/Evaluation12.hpp | 10 +++++----- opm/material/densead/Evaluation2.hpp | 10 +++++----- opm/material/densead/Evaluation3.hpp | 10 +++++----- opm/material/densead/Evaluation4.hpp | 10 +++++----- opm/material/densead/Evaluation5.hpp | 10 +++++----- opm/material/densead/Evaluation6.hpp | 10 +++++----- opm/material/densead/Evaluation7.hpp | 10 +++++----- opm/material/densead/Evaluation8.hpp | 10 +++++----- opm/material/densead/Evaluation9.hpp | 10 +++++----- .../fluidstates/BlackOilFluidState.hpp | 10 +++++----- .../fluidsystems/BlackOilFluidSystem.hpp | 12 ++++++------ .../fluidsystems/blackoilpvt/Co2GasPvt.hpp | 4 ++-- .../ConstantCompressibilityBrinePvt.hpp | 6 +++--- .../ConstantCompressibilityOilPvt.hpp | 8 ++++---- .../ConstantCompressibilityWaterPvt.hpp | 6 +++--- .../fluidsystems/blackoilpvt/DeadOilPvt.hpp | 8 ++++---- .../fluidsystems/blackoilpvt/DryGasPvt.hpp | 8 ++++---- .../fluidsystems/blackoilpvt/GasPvtThermal.hpp | 4 ++-- .../fluidsystems/blackoilpvt/LiveOilPvt.hpp | 10 +++++----- .../fluidsystems/blackoilpvt/OilPvtThermal.hpp | 4 ++-- .../fluidsystems/blackoilpvt/SolventPvt.hpp | 4 ++-- .../blackoilpvt/WaterPvtThermal.hpp | 2 +- .../fluidsystems/blackoilpvt/WetGasPvt.hpp | 10 +++++----- opm/material/thermal/EclThcLaw.hpp | 2 +- .../thermal/FluidThermalConductionLaw.hpp | 2 +- opm/material/thermal/NullSolidEnergyLaw.hpp | 2 +- .../thermal/NullThermalConductionLaw.hpp | 4 ++-- 46 files changed, 173 insertions(+), 173 deletions(-) diff --git a/bin/genEvalSpecializations.py b/bin/genEvalSpecializations.py index 1d5878481..282a9a309 100755 --- a/bin/genEvalSpecializations.py +++ b/bin/genEvalSpecializations.py @@ -306,7 +306,7 @@ public: static Evaluation createBlank(const Evaluation& x) { return Evaluation(x.size()); } {% else %}\ - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } {% endif %}\ @@ -315,7 +315,7 @@ public: static Evaluation createConstantZero(const Evaluation& x) { return Evaluation(x.size(), 0.0); } {% else %}\ - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } {% endif %}\ @@ -324,14 +324,14 @@ public: static Evaluation createConstantOne(const Evaluation& x) { return Evaluation(x.size(), 1.); } {% else %}\ - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } {% endif %}\ // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) {% if numDerivs < 0 %}\ template - static Evaluation createVariable(const RhsValueType& value OPM_UNUSED, int varPos OPM_UNUSED) + static Evaluation createVariable(const RhsValueType&, int) { throw std::logic_error("Dynamically sized evaluations require that the number of " "derivatives is specified when creating an evaluation"); @@ -374,7 +374,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -395,7 +395,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const RhsValueType& value OPM_UNUSED) + static Evaluation createConstant(const RhsValueType&) { throw std::logic_error("Dynamically-sized evaluation objects require to specify the number of derivatives."); } @@ -430,7 +430,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/checkFluidSystem.hpp b/opm/material/checkFluidSystem.hpp index 766ccb574..ee1be9ec0 100644 --- a/opm/material/checkFluidSystem.hpp +++ b/opm/material/checkFluidSystem.hpp @@ -227,7 +227,7 @@ template void checkFluidState(const BaseFluidState& fs) { // fluid states must be copy-able - BaseFluidState OPM_UNUSED tmpFs(fs); + [[maybe_unused]] BaseFluidState tmpFs(fs); tmpFs = fs; // a fluid state must provide a checkDefined() method @@ -331,16 +331,16 @@ void checkFluidSystem() fs.allowPressure(FluidSystem::isCompressible(phaseIdx)); fs.allowComposition(true); fs.allowDensity(false); - try { auto tmpVal OPM_UNUSED = FluidSystem::density(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::density(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; try { val = FluidSystem::template density(fs, paramCache, phaseIdx); } catch (...) {}; try { scalarVal = FluidSystem::template density(fs, paramCache, phaseIdx); } catch (...) {}; fs.allowPressure(true); fs.allowDensity(true); - try { auto tmpVal OPM_UNUSED = FluidSystem::viscosity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; - try { auto tmpVal OPM_UNUSED = FluidSystem::enthalpy(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; - try { auto tmpVal OPM_UNUSED = FluidSystem::heatCapacity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; - try { auto tmpVal OPM_UNUSED= FluidSystem::thermalConductivity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::viscosity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::enthalpy(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::heatCapacity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::thermalConductivity(fs, paramCache, phaseIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; try { val = FluidSystem::template viscosity(fs, paramCache, phaseIdx); } catch (...) {}; try { val = FluidSystem::template enthalpy(fs, paramCache, phaseIdx); } catch (...) {}; try { val = FluidSystem::template heatCapacity(fs, paramCache, phaseIdx); } catch (...) {}; @@ -352,11 +352,11 @@ void checkFluidSystem() for (unsigned compIdx = 0; compIdx < numComponents; ++ compIdx) { fs.allowComposition(!FluidSystem::isIdealMixture(phaseIdx)); - try { auto tmpVal OPM_UNUSED = FluidSystem::fugacityCoefficient(fs, paramCache, phaseIdx, compIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::fugacityCoefficient(fs, paramCache, phaseIdx, compIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; try { val = FluidSystem::template fugacityCoefficient(fs, paramCache, phaseIdx, compIdx); } catch (...) {}; try { scalarVal = FluidSystem::template fugacityCoefficient(fs, paramCache, phaseIdx, compIdx); } catch (...) {}; fs.allowComposition(true); - try { auto tmpVal OPM_UNUSED = FluidSystem::diffusionCoefficient(fs, paramCache, phaseIdx, compIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; + try { [[maybe_unused]] auto tmpVal = FluidSystem::diffusionCoefficient(fs, paramCache, phaseIdx, compIdx); static_assert(std::is_same::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {}; try { val = FluidSystem::template diffusionCoefficient(fs, paramCache, phaseIdx, compIdx); } catch (...) {}; try { scalarVal = FluidSystem::template fugacityCoefficient(fs, paramCache, phaseIdx, compIdx); } catch (...) {}; } @@ -364,7 +364,7 @@ void checkFluidSystem() // test for phaseName(), isLiquid() and isIdealGas() for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) { - std::string name OPM_UNUSED = FluidSystem::phaseName(phaseIdx); + [[maybe_unused]] std::string name = FluidSystem::phaseName(phaseIdx); bool bVal = FluidSystem::isLiquid(phaseIdx); bVal = FluidSystem::isIdealGas(phaseIdx); bVal = !bVal; // get rid of GCC warning (only occurs with paranoid warning flags) diff --git a/opm/material/common/ConditionalStorage.hpp b/opm/material/common/ConditionalStorage.hpp index a3b486ac9..d4515cba8 100644 --- a/opm/material/common/ConditionalStorage.hpp +++ b/opm/material/common/ConditionalStorage.hpp @@ -110,7 +110,7 @@ public: { // ensure that T has a default constructor without actually calling it if (false) { - T OPM_UNUSED dummy; // <- if the compiler bails out here, T does not have a default constructor + [[maybe_unused]] T dummy; // <- if the compiler bails out here, T does not have a default constructor } } @@ -118,7 +118,7 @@ public: { // ensure that T has a default constructor without actually calling it if (false) { - T OPM_UNUSED dummy(v); // <- if the compiler bails out here, T does not have a copy constructor + [[maybe_unused]] T dummy(v); // <- if the compiler bails out here, T does not have a copy constructor } } @@ -133,7 +133,7 @@ public: // ensure that the arguments are valid without actually calling the constructor // of T if (false) { - T OPM_UNUSED dummy(args...); // <- if the compiler bails out here, T does not have the requested constructor + [[maybe_unused]] T dummy(args...); // <- if the compiler bails out here, T does not have the requested constructor } } diff --git a/opm/material/common/MathToolbox.hpp b/opm/material/common/MathToolbox.hpp index 877bd2d0e..94f4635cf 100644 --- a/opm/material/common/MathToolbox.hpp +++ b/opm/material/common/MathToolbox.hpp @@ -100,7 +100,7 @@ public: * This basically boils down to creating an uninitialized object of sufficient size. * This is method only non-trivial for dynamically-sized Evaluation objects. */ - static Scalar createBlank(Scalar value OPM_UNUSED) + static Scalar createBlank(Scalar) { return Scalar(); } /*! @@ -136,7 +136,7 @@ public: * function. In general, this returns an evaluation object for which all derivatives * are zero. */ - static Scalar createConstant(Scalar x OPM_UNUSED, Scalar value) + static Scalar createConstant(Scalar, Scalar value) { return value; } /*! @@ -146,7 +146,7 @@ public: * regard to x. For scalars (which do not consider derivatives), this method does * nothing. */ - static Scalar createVariable(Scalar value OPM_UNUSED, unsigned varIdx OPM_UNUSED) + static Scalar createVariable(Scalar, unsigned) { throw std::logic_error("Plain floating point objects cannot represent variables"); } /*! @@ -157,7 +157,7 @@ public: * regard to x. For scalars (which do not consider derivatives), this method does * nothing. */ - static Scalar createVariable(Scalar x OPM_UNUSED, Scalar value OPM_UNUSED, unsigned varIdx OPM_UNUSED) + static Scalar createVariable(Scalar, Scalar, unsigned) { throw std::logic_error("Plain floating point objects cannot represent variables"); } /*! diff --git a/opm/material/common/Spline.hpp b/opm/material/common/Spline.hpp index f58a210ee..0f4906829 100644 --- a/opm/material/common/Spline.hpp +++ b/opm/material/common/Spline.hpp @@ -1613,19 +1613,19 @@ protected: // third derivative of the hermite basis functions template - Scalar h00_prime3_(const Evaluation& t OPM_UNUSED) const + Scalar h00_prime3_(const Evaluation&) const { return 2*3*2; } template - Scalar h10_prime3_(const Evaluation& t OPM_UNUSED) const + Scalar h10_prime3_(const Evaluation&) const { return 2*3; } template - Scalar h01_prime3_(const Evaluation& t OPM_UNUSED) const + Scalar h01_prime3_(const Evaluation&) const { return -2*3*2; } template - Scalar h11_prime3_(const Evaluation& t OPM_UNUSED) const + Scalar h11_prime3_(const Evaluation&) const { return 2*3; } // returns the monotonicality of an interval of a spline segment diff --git a/opm/material/common/Tabulated1DFunction.hpp b/opm/material/common/Tabulated1DFunction.hpp index 2af012283..1cfc56037 100644 --- a/opm/material/common/Tabulated1DFunction.hpp +++ b/opm/material/common/Tabulated1DFunction.hpp @@ -301,7 +301,7 @@ public: * cause a failed assertation. */ template - Evaluation evalSecondDerivative(const Evaluation& x OPM_UNUSED, bool extrapolate OPM_UNUSED = false) const + Evaluation evalSecondDerivative(const Evaluation&, bool = false) const { return 0.0; } /*! @@ -319,7 +319,7 @@ public: * cause a failed assertation. */ template - Evaluation evalThirdDerivative(const Evaluation& x OPM_UNUSED, bool extrapolate OPM_UNUSED = false) const + Evaluation evalThirdDerivative(const Evaluation&, bool = false) const { return 0.0; } /*! diff --git a/opm/material/common/quad.hpp b/opm/material/common/quad.hpp index 1a2d82101..8d5cff531 100644 --- a/opm/material/common/quad.hpp +++ b/opm/material/common/quad.hpp @@ -268,7 +268,7 @@ inline quad real(quad val) inline quad real(const std::complex& val) { return val.real(); } -inline quad imag(quad val OPM_UNUSED) +inline quad imag(quad) { return 0.0; } inline quad imag(const std::complex& val) diff --git a/opm/material/components/Air.hpp b/opm/material/components/Air.hpp index f4ee0a9d8..acf5eb138 100644 --- a/opm/material/components/Air.hpp +++ b/opm/material/components/Air.hpp @@ -244,8 +244,8 @@ public: * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ template - static Evaluation gasHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation gasHeatCapacity(const Evaluation&, + const Evaluation&) { return 1005.0; } diff --git a/opm/material/components/Dnapl.hpp b/opm/material/components/Dnapl.hpp index 276a6dedb..c3315455a 100644 --- a/opm/material/components/Dnapl.hpp +++ b/opm/material/components/Dnapl.hpp @@ -151,8 +151,8 @@ public: * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ template - static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation liquidHeatCapacity(const Evaluation&, + const Evaluation&) { return 120.0/molarMass(); } diff --git a/opm/material/components/Lnapl.hpp b/opm/material/components/Lnapl.hpp index 8fe714d21..3defef554 100644 --- a/opm/material/components/Lnapl.hpp +++ b/opm/material/components/Lnapl.hpp @@ -91,7 +91,7 @@ public: */ template static Evaluation liquidEnthalpy(const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) + const Evaluation&) { return 240.0/molarMass() * temperature; // [J/kg] } @@ -105,8 +105,8 @@ public: * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ */ template - static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation liquidHeatCapacity(const Evaluation&, + const Evaluation&) { return 240.0/molarMass(); } diff --git a/opm/material/components/N2.hpp b/opm/material/components/N2.hpp index 9cd3ac6f7..27e2c98b2 100644 --- a/opm/material/components/N2.hpp +++ b/opm/material/components/N2.hpp @@ -176,7 +176,7 @@ public: */ template static Evaluation gasEnthalpy(const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) + const Evaluation&) { // method of Joback const Scalar cpVapA = 31.15; @@ -226,7 +226,7 @@ public: */ template static Evaluation gasHeatCapacity(const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) + const Evaluation&) { // method of Joback const Scalar cpVapA = 31.15; diff --git a/opm/material/components/SimpleCO2.hpp b/opm/material/components/SimpleCO2.hpp index 8d7bc4293..0982a565f 100644 --- a/opm/material/components/SimpleCO2.hpp +++ b/opm/material/components/SimpleCO2.hpp @@ -105,15 +105,15 @@ public: */ template static Evaluation gasEnthalpy(const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) + const Evaluation&) { return 350.0e3 + temperature*0.85e3; } /*! * \copydoc Component::gasHeatCapacity */ template - static Evaluation gasHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation gasHeatCapacity(const Evaluation&, + const Evaluation&) { return 0.85e3; } /*! @@ -121,15 +121,15 @@ public: */ template static Evaluation liquidEnthalpy(const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) + const Evaluation&) { return temperature*2e3; } /*! * \copydoc Component::liquidHeatCapacity */ template - static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation liquidHeatCapacity(const Evaluation&, + const Evaluation&) { return 2e3; /* TODO: UNKNOWN! */ } /*! diff --git a/opm/material/components/SimpleH2O.hpp b/opm/material/components/SimpleH2O.hpp index b60c7cd6d..3fb0049ce 100644 --- a/opm/material/components/SimpleH2O.hpp +++ b/opm/material/components/SimpleH2O.hpp @@ -170,8 +170,8 @@ public: * \copydoc Component::gasHeatCapacity */ template - static Evaluation gasHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation gasHeatCapacity(const Evaluation&, + const Evaluation&) { return 1.976e3; } /*! @@ -189,8 +189,8 @@ public: * \copydoc Component::liquidHeatCapacity */ template - static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation liquidHeatCapacity(const Evaluation&, + const Evaluation&) { return 4.184e3; } /*! diff --git a/opm/material/components/SimpleHuDuanH2O.hpp b/opm/material/components/SimpleHuDuanH2O.hpp index 7f5613ab2..384a1e6b4 100644 --- a/opm/material/components/SimpleHuDuanH2O.hpp +++ b/opm/material/components/SimpleHuDuanH2O.hpp @@ -178,8 +178,8 @@ public: * \copydoc Component::gasHeatCapacity */ template - static Evaluation gasHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation gasHeatCapacity(const Evaluation&, + const Evaluation&) { return 1.976e3; } /*! @@ -197,8 +197,8 @@ public: * \copydoc Component::liquidHeatCapacity */ template - static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) + static Evaluation liquidHeatCapacity(const Evaluation&, + const Evaluation&) { return 4.184e3; } /*! diff --git a/opm/material/densead/DynamicEvaluation.hpp b/opm/material/densead/DynamicEvaluation.hpp index 2cd89c6fe..1d3eb7780 100644 --- a/opm/material/densead/DynamicEvaluation.hpp +++ b/opm/material/densead/DynamicEvaluation.hpp @@ -178,7 +178,7 @@ public: // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) template - static Evaluation createVariable(const RhsValueType& value OPM_UNUSED, int varPos OPM_UNUSED) + static Evaluation createVariable(const RhsValueType&, int) { throw std::logic_error("Dynamically sized evaluations require that the number of " "derivatives is specified when creating an evaluation"); @@ -212,7 +212,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const RhsValueType& value OPM_UNUSED) + static Evaluation createConstant(const RhsValueType&) { throw std::logic_error("Dynamically-sized evaluation objects require to specify the number of derivatives."); } diff --git a/opm/material/densead/Evaluation.hpp b/opm/material/densead/Evaluation.hpp index 9cffaf5f3..85d308341 100644 --- a/opm/material/densead/Evaluation.hpp +++ b/opm/material/densead/Evaluation.hpp @@ -150,15 +150,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -183,7 +183,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -213,7 +213,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation1.hpp b/opm/material/densead/Evaluation1.hpp index 77b49b557..38b1c110f 100644 --- a/opm/material/densead/Evaluation1.hpp +++ b/opm/material/densead/Evaluation1.hpp @@ -141,15 +141,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -174,7 +174,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -204,7 +204,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation10.hpp b/opm/material/densead/Evaluation10.hpp index 051623505..8ceffb7c7 100644 --- a/opm/material/densead/Evaluation10.hpp +++ b/opm/material/densead/Evaluation10.hpp @@ -150,15 +150,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -183,7 +183,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -213,7 +213,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation11.hpp b/opm/material/densead/Evaluation11.hpp index 8a1fda3e1..e50a61ac5 100644 --- a/opm/material/densead/Evaluation11.hpp +++ b/opm/material/densead/Evaluation11.hpp @@ -151,15 +151,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -184,7 +184,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -214,7 +214,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation12.hpp b/opm/material/densead/Evaluation12.hpp index c52ebeecd..695075f79 100644 --- a/opm/material/densead/Evaluation12.hpp +++ b/opm/material/densead/Evaluation12.hpp @@ -152,15 +152,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -185,7 +185,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -215,7 +215,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation2.hpp b/opm/material/densead/Evaluation2.hpp index 4c489df20..332bf5279 100644 --- a/opm/material/densead/Evaluation2.hpp +++ b/opm/material/densead/Evaluation2.hpp @@ -142,15 +142,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -175,7 +175,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -205,7 +205,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation3.hpp b/opm/material/densead/Evaluation3.hpp index dc0803420..ad02d14f1 100644 --- a/opm/material/densead/Evaluation3.hpp +++ b/opm/material/densead/Evaluation3.hpp @@ -143,15 +143,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -176,7 +176,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -206,7 +206,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation4.hpp b/opm/material/densead/Evaluation4.hpp index 9ca129509..84012718a 100644 --- a/opm/material/densead/Evaluation4.hpp +++ b/opm/material/densead/Evaluation4.hpp @@ -144,15 +144,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -177,7 +177,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -207,7 +207,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation5.hpp b/opm/material/densead/Evaluation5.hpp index a8d04e38e..546891b91 100644 --- a/opm/material/densead/Evaluation5.hpp +++ b/opm/material/densead/Evaluation5.hpp @@ -145,15 +145,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -178,7 +178,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -208,7 +208,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation6.hpp b/opm/material/densead/Evaluation6.hpp index bf1dc20a0..94bedb7ab 100644 --- a/opm/material/densead/Evaluation6.hpp +++ b/opm/material/densead/Evaluation6.hpp @@ -146,15 +146,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -179,7 +179,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -209,7 +209,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation7.hpp b/opm/material/densead/Evaluation7.hpp index 5822372f4..660098c8a 100644 --- a/opm/material/densead/Evaluation7.hpp +++ b/opm/material/densead/Evaluation7.hpp @@ -147,15 +147,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -180,7 +180,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -210,7 +210,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation8.hpp b/opm/material/densead/Evaluation8.hpp index 360faf6cc..0e2efa67f 100644 --- a/opm/material/densead/Evaluation8.hpp +++ b/opm/material/densead/Evaluation8.hpp @@ -148,15 +148,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -181,7 +181,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -211,7 +211,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/densead/Evaluation9.hpp b/opm/material/densead/Evaluation9.hpp index 2e4fe030a..1976412f9 100644 --- a/opm/material/densead/Evaluation9.hpp +++ b/opm/material/densead/Evaluation9.hpp @@ -149,15 +149,15 @@ public: // is equivalent to creating an uninitialized object using the default // constructor, while for dynamic evaluations, it creates an Evaluation // object which exhibits the same number of derivatives as the argument. - static Evaluation createBlank(const Evaluation& x OPM_UNUSED) + static Evaluation createBlank(const Evaluation&) { return Evaluation(); } // create an Evaluation with value and all the derivatives to be zero - static Evaluation createConstantZero(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantZero(const Evaluation&) { return Evaluation(0.); } // create an Evaluation with value to be one and all the derivatives to be zero - static Evaluation createConstantOne(const Evaluation& x OPM_UNUSED) + static Evaluation createConstantOne(const Evaluation&) { return Evaluation(1.); } // create a function evaluation for a "naked" depending variable (i.e., f(x) = x) @@ -182,7 +182,7 @@ public: } template - static Evaluation createVariable(const Evaluation& x OPM_UNUSED, const RhsValueType& value, int varPos) + static Evaluation createVariable(const Evaluation&, const RhsValueType& value, int varPos) { // copy function value and set all derivatives to 0, except for the variable // which is represented by the value (which is set to 1.0) @@ -212,7 +212,7 @@ public: // "evaluate" a constant function (i.e. a function that does not depend on the set of // relevant variables, f(x) = c). template - static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value) + static Evaluation createConstant(const Evaluation&, const RhsValueType& value) { return Evaluation(value); } diff --git a/opm/material/fluidstates/BlackOilFluidState.hpp b/opm/material/fluidstates/BlackOilFluidState.hpp index 00df7ba4f..696151dd1 100644 --- a/opm/material/fluidstates/BlackOilFluidState.hpp +++ b/opm/material/fluidstates/BlackOilFluidState.hpp @@ -46,7 +46,7 @@ unsigned getPvtRegionIndex_(typename std::enable_if unsigned getPvtRegionIndex_(typename std::enable_if::value, - const FluidState&>::type fluidState OPM_UNUSED) + const FluidState&>::type) { return 0; } OPM_GENERATE_HAS_MEMBER(invB, /*phaseIdx=*/0) // Creates 'HasMember_invB'. @@ -55,7 +55,7 @@ template auto getInvB_(typename std::enable_if::value, const FluidState&>::type fluidState, unsigned phaseIdx, - unsigned pvtRegionIdx OPM_UNUSED) + unsigned) -> decltype(decay(fluidState.invB(phaseIdx))) { return decay(fluidState.invB(phaseIdx)); } @@ -84,7 +84,7 @@ auto getSaltConcentration_(typename std::enable_if auto getSaltConcentration_(typename std::enable_if::value, - const FluidState&>::type fluidState OPM_UNUSED) + const FluidState&>::type) { return 0.0; } /*! @@ -311,7 +311,7 @@ public: /*! * \brief Return the temperature [K] */ - const Scalar& temperature(unsigned phaseIdx OPM_UNUSED) const + const Scalar& temperature(unsigned) const { if (!enableTemperature && !enableEnergy) { static Scalar tmp(FluidSystem::reservoirTemperature(pvtRegionIdx_)); @@ -409,7 +409,7 @@ public: * If the EnableEnergy property is not set to true, this method will throw an * exception! */ - Scalar internalEnergy(unsigned phaseIdx OPM_UNUSED) const + Scalar internalEnergy(unsigned phaseIdx) const { return (*enthalpy_)[canonicalToStoragePhaseIndex_(phaseIdx)] - pressure(phaseIdx)/density(phaseIdx); } ////// diff --git a/opm/material/fluidsystems/BlackOilFluidSystem.hpp b/opm/material/fluidsystems/BlackOilFluidSystem.hpp index c6c0558f7..0a9c8f7bf 100644 --- a/opm/material/fluidsystems/BlackOilFluidSystem.hpp +++ b/opm/material/fluidsystems/BlackOilFluidSystem.hpp @@ -68,7 +68,7 @@ LhsEval getRs_(typename std::enable_if::value, const F template auto getRs_(typename std::enable_if::value, const FluidState&>::type fluidState, - unsigned regionIdx OPM_UNUSED) + unsigned) -> decltype(decay(fluidState.Rs())) { return decay(fluidState.Rs()); } @@ -83,19 +83,19 @@ LhsEval getRv_(typename std::enable_if::value, const F template auto getRv_(typename std::enable_if::value, const FluidState&>::type fluidState, - unsigned regionIdx OPM_UNUSED) + unsigned) -> decltype(decay(fluidState.Rv())) { return decay(fluidState.Rv()); } template LhsEval getSaltConcentration_(typename std::enable_if::value, - const FluidState&>::type fluidState OPM_UNUSED, - unsigned regionIdx OPM_UNUSED) + const FluidState&>::type, + unsigned) {return 0.0;} template auto getSaltConcentration_(typename std::enable_if::value, const FluidState&>::type fluidState, - unsigned regionIdx OPM_UNUSED) + unsigned) -> decltype(decay(fluidState.saltConcentration())) { return decay(fluidState.saltConcentration()); } @@ -1307,7 +1307,7 @@ public: * * This method is black-oil specific and only makes sense for isothermal simulations. */ - static Scalar reservoirTemperature(unsigned pvtRegionIdx OPM_UNUSED = 0) + static Scalar reservoirTemperature(unsigned = 0) { return reservoirTemperature_; } /*! diff --git a/opm/material/fluidsystems/blackoilpvt/Co2GasPvt.hpp b/opm/material/fluidsystems/blackoilpvt/Co2GasPvt.hpp index aed71f77d..1a3e72b15 100644 --- a/opm/material/fluidsystems/blackoilpvt/Co2GasPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/Co2GasPvt.hpp @@ -129,10 +129,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, + Evaluation internalEnergy(unsigned, const Evaluation& temperature, const Evaluation& pressure, - const Evaluation& Rv OPM_UNUSED) const + const Evaluation&) const { return CO2::gasInternalEnergy(temperature, pressure); } diff --git a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp index 2ce27ffba..bf5e3b83e 100644 --- a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp @@ -154,9 +154,9 @@ public: * \brief Returns the specific enthalpy [J/kg] of water given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of water but the thermal option is not enabled"); } diff --git a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityOilPvt.hpp b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityOilPvt.hpp index 2f412b118..006d558ef 100644 --- a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityOilPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityOilPvt.hpp @@ -174,10 +174,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rs OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of oil but the thermal option is not enabled"); } diff --git a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp index 9ae0c90a1..4a47b270c 100644 --- a/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp @@ -164,9 +164,9 @@ public: * \brief Returns the specific enthalpy [J/kg] of water given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of water but the thermal option is not enabled"); } diff --git a/opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp b/opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp index a14bcd577..c63919f6e 100644 --- a/opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp @@ -181,10 +181,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rs OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of oil but the thermal option is not enabled"); } diff --git a/opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp b/opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp index 425794e30..7debf1124 100644 --- a/opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp @@ -205,10 +205,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rv OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of gas but the thermal option is not enabled"); } diff --git a/opm/material/fluidsystems/blackoilpvt/GasPvtThermal.hpp b/opm/material/fluidsystems/blackoilpvt/GasPvtThermal.hpp index 94fa7d55e..664181dc9 100644 --- a/opm/material/fluidsystems/blackoilpvt/GasPvtThermal.hpp +++ b/opm/material/fluidsystems/blackoilpvt/GasPvtThermal.hpp @@ -222,8 +222,8 @@ public: template Evaluation internalEnergy(unsigned regionIdx, const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rv OPM_UNUSED) const + const Evaluation&, + const Evaluation&) const { if (!enableInternalEnergy_) throw std::runtime_error("Requested the internal energy of oil but it is disabled"); diff --git a/opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp b/opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp index c2d0bcc49..714e30ed0 100644 --- a/opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp @@ -440,10 +440,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rs OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of oil but the thermal option is not enabled"); } @@ -550,7 +550,7 @@ public: */ template Evaluation saturationPressure(unsigned regionIdx, - const Evaluation& temperature OPM_UNUSED, + const Evaluation&, const Evaluation& Rs) const { typedef MathToolbox Toolbox; diff --git a/opm/material/fluidsystems/blackoilpvt/OilPvtThermal.hpp b/opm/material/fluidsystems/blackoilpvt/OilPvtThermal.hpp index 9270582fc..39f4bfc86 100644 --- a/opm/material/fluidsystems/blackoilpvt/OilPvtThermal.hpp +++ b/opm/material/fluidsystems/blackoilpvt/OilPvtThermal.hpp @@ -239,8 +239,8 @@ public: template Evaluation internalEnergy(unsigned regionIdx, const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rs OPM_UNUSED) const + const Evaluation&, + const Evaluation&) const { if (!enableInternalEnergy_) throw std::runtime_error("Requested the internal energy of oil but it is disabled"); diff --git a/opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp b/opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp index 3dcd3acd9..ff3f19037 100644 --- a/opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp @@ -180,7 +180,7 @@ public: */ template Evaluation viscosity(unsigned regionIdx, - const Evaluation& temperature OPM_UNUSED, + const Evaluation&, const Evaluation& pressure) const { const Evaluation& invBg = inverseSolventB_[regionIdx].eval(pressure, /*extrapolate=*/true); @@ -208,7 +208,7 @@ public: */ template Evaluation inverseFormationVolumeFactor(unsigned regionIdx, - const Evaluation& temperature OPM_UNUSED, + const Evaluation&, const Evaluation& pressure) const { return inverseSolventB_[regionIdx].eval(pressure, /*extrapolate=*/true); } diff --git a/opm/material/fluidsystems/blackoilpvt/WaterPvtThermal.hpp b/opm/material/fluidsystems/blackoilpvt/WaterPvtThermal.hpp index f64acfe3d..7834ce4b3 100644 --- a/opm/material/fluidsystems/blackoilpvt/WaterPvtThermal.hpp +++ b/opm/material/fluidsystems/blackoilpvt/WaterPvtThermal.hpp @@ -245,7 +245,7 @@ public: template Evaluation internalEnergy(unsigned regionIdx, const Evaluation& temperature, - const Evaluation& pressure OPM_UNUSED) const + const Evaluation&) const { if (!enableInternalEnergy_) throw std::runtime_error("Requested the internal energy of oil but it is disabled"); diff --git a/opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp b/opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp index 9c5bd4db9..edcea06c6 100644 --- a/opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp +++ b/opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp @@ -471,10 +471,10 @@ public: * \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters. */ template - Evaluation internalEnergy(unsigned regionIdx OPM_UNUSED, - const Evaluation& temperature OPM_UNUSED, - const Evaluation& pressure OPM_UNUSED, - const Evaluation& Rv OPM_UNUSED) const + Evaluation internalEnergy(unsigned, + const Evaluation&, + const Evaluation&, + const Evaluation&) const { throw std::runtime_error("Requested the enthalpy of gas but the thermal option is not enabled"); } @@ -579,7 +579,7 @@ public: */ template Evaluation saturationPressure(unsigned regionIdx, - const Evaluation& temperature OPM_UNUSED, + const Evaluation&, const Evaluation& Rv) const { typedef MathToolbox Toolbox; diff --git a/opm/material/thermal/EclThcLaw.hpp b/opm/material/thermal/EclThcLaw.hpp index abc346f12..fbd738cf0 100644 --- a/opm/material/thermal/EclThcLaw.hpp +++ b/opm/material/thermal/EclThcLaw.hpp @@ -55,7 +55,7 @@ public: */ template static Evaluation thermalConductivity(const Params& params, - const FluidState& fluidState OPM_UNUSED) + const FluidState&) { // The thermal conductivity approach based on the THC* keywords. diff --git a/opm/material/thermal/FluidThermalConductionLaw.hpp b/opm/material/thermal/FluidThermalConductionLaw.hpp index 80c97c606..4e2eebc25 100644 --- a/opm/material/thermal/FluidThermalConductionLaw.hpp +++ b/opm/material/thermal/FluidThermalConductionLaw.hpp @@ -54,7 +54,7 @@ public: * medium. */ template - static Evaluation thermalConductivity(const Params& params OPM_UNUSED, + static Evaluation thermalConductivity(const Params&, const FluidState& fluidState) { typename FluidSystem::template ParameterCache paramCache; diff --git a/opm/material/thermal/NullSolidEnergyLaw.hpp b/opm/material/thermal/NullSolidEnergyLaw.hpp index 80d09c732..4446df098 100644 --- a/opm/material/thermal/NullSolidEnergyLaw.hpp +++ b/opm/material/thermal/NullSolidEnergyLaw.hpp @@ -50,7 +50,7 @@ public: * This solid energy law simply returns 0. */ template - static Evaluation solidInternalEnergy(const Params& params OPM_UNUSED, const FluidState& fluidState OPM_UNUSED) + static Evaluation solidInternalEnergy(const Params&, const FluidState&) { return 0.0; } }; } // namespace Opm diff --git a/opm/material/thermal/NullThermalConductionLaw.hpp b/opm/material/thermal/NullThermalConductionLaw.hpp index 151e32c41..eb82e8811 100644 --- a/opm/material/thermal/NullThermalConductionLaw.hpp +++ b/opm/material/thermal/NullThermalConductionLaw.hpp @@ -53,8 +53,8 @@ public: * If this method is called an exception is thrown at run time. */ template - static Evaluation thermalConductivity(const Params& params OPM_UNUSED, - const FluidState& fluidState OPM_UNUSED) + static Evaluation thermalConductivity(const Params&, + const FluidState&) { return 0.0; } }; } // namespace Opm