changed: get rid of OPM_UNUSED macro usage

prefer anonymous parameters and c++17 [[maybe_unused]]
This commit is contained in:
Arne Morten Kvarving 2021-08-03 09:12:52 +02:00
parent 0eb0d51186
commit 24dba01e99
46 changed files with 173 additions and 173 deletions

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -227,7 +227,7 @@ template <class Scalar, class BaseFluidState>
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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {};
try { val = FluidSystem::template density<FluidState, LhsEval>(fs, paramCache, phaseIdx); } catch (...) {};
try { scalarVal = FluidSystem::template density<FluidState, Scalar>(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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {};
try { val = FluidSystem::template viscosity<FluidState, LhsEval>(fs, paramCache, phaseIdx); } catch (...) {};
try { val = FluidSystem::template enthalpy<FluidState, LhsEval>(fs, paramCache, phaseIdx); } catch (...) {};
try { val = FluidSystem::template heatCapacity<FluidState, LhsEval>(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<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {};
try { val = FluidSystem::template fugacityCoefficient<FluidState, LhsEval>(fs, paramCache, phaseIdx, compIdx); } catch (...) {};
try { scalarVal = FluidSystem::template fugacityCoefficient<FluidState, Scalar>(fs, paramCache, phaseIdx, compIdx); } catch (...) {};
fs.allowComposition(true);
try { auto tmpVal OPM_UNUSED = FluidSystem::diffusionCoefficient(fs, paramCache, phaseIdx, compIdx); static_assert(std::is_same<decltype(tmpVal), RhsEval>::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<decltype(tmpVal), RhsEval>::value, "The default return value must be the scalar used by the fluid state!"); } catch (...) {};
try { val = FluidSystem::template diffusionCoefficient<FluidState, LhsEval>(fs, paramCache, phaseIdx, compIdx); } catch (...) {};
try { scalarVal = FluidSystem::template fugacityCoefficient<FluidState, Scalar>(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)

View File

@ -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
}
}

View File

@ -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"); }
/*!

View File

@ -1613,19 +1613,19 @@ protected:
// third derivative of the hermite basis functions
template <class Evaluation>
Scalar h00_prime3_(const Evaluation& t OPM_UNUSED) const
Scalar h00_prime3_(const Evaluation&) const
{ return 2*3*2; }
template <class Evaluation>
Scalar h10_prime3_(const Evaluation& t OPM_UNUSED) const
Scalar h10_prime3_(const Evaluation&) const
{ return 2*3; }
template <class Evaluation>
Scalar h01_prime3_(const Evaluation& t OPM_UNUSED) const
Scalar h01_prime3_(const Evaluation&) const
{ return -2*3*2; }
template <class Evaluation>
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

View File

@ -301,7 +301,7 @@ public:
* cause a failed assertation.
*/
template <class Evaluation>
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 <class Evaluation>
Evaluation evalThirdDerivative(const Evaluation& x OPM_UNUSED, bool extrapolate OPM_UNUSED = false) const
Evaluation evalThirdDerivative(const Evaluation&, bool = false) const
{ return 0.0; }
/*!

View File

@ -268,7 +268,7 @@ inline quad real(quad val)
inline quad real(const std::complex<quad>& val)
{ return val.real(); }
inline quad imag(quad val OPM_UNUSED)
inline quad imag(quad)
{ return 0.0; }
inline quad imag(const std::complex<quad>& val)

View File

@ -244,8 +244,8 @@ public:
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
template <class Evaluation>
static Evaluation gasHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation gasHeatCapacity(const Evaluation&,
const Evaluation&)
{
return 1005.0;
}

View File

@ -151,8 +151,8 @@ public:
* \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
*/
template <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation liquidHeatCapacity(const Evaluation&,
const Evaluation&)
{
return 120.0/molarMass();
}

View File

@ -91,7 +91,7 @@ public:
*/
template <class Evaluation>
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 <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation liquidHeatCapacity(const Evaluation&,
const Evaluation&)
{
return 240.0/molarMass();
}

View File

@ -176,7 +176,7 @@ public:
*/
template <class Evaluation>
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 <class Evaluation>
static Evaluation gasHeatCapacity(const Evaluation& temperature,
const Evaluation& pressure OPM_UNUSED)
const Evaluation&)
{
// method of Joback
const Scalar cpVapA = 31.15;

View File

@ -105,15 +105,15 @@ public:
*/
template <class Evaluation>
static Evaluation gasEnthalpy(const Evaluation& temperature,
const Evaluation& pressure OPM_UNUSED)
const Evaluation&)
{ return 350.0e3 + temperature*0.85e3; }
/*!
* \copydoc Component::gasHeatCapacity
*/
template <class Evaluation>
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 <class Evaluation>
static Evaluation liquidEnthalpy(const Evaluation& temperature,
const Evaluation& pressure OPM_UNUSED)
const Evaluation&)
{ return temperature*2e3; }
/*!
* \copydoc Component::liquidHeatCapacity
*/
template <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation liquidHeatCapacity(const Evaluation&,
const Evaluation&)
{ return 2e3; /* TODO: UNKNOWN! */ }
/*!

View File

@ -170,8 +170,8 @@ public:
* \copydoc Component::gasHeatCapacity
*/
template <class Evaluation>
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 <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation liquidHeatCapacity(const Evaluation&,
const Evaluation&)
{ return 4.184e3; }
/*!

View File

@ -178,8 +178,8 @@ public:
* \copydoc Component::gasHeatCapacity
*/
template <class Evaluation>
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 <class Evaluation>
static Evaluation liquidHeatCapacity(const Evaluation& temperature OPM_UNUSED,
const Evaluation& pressure OPM_UNUSED)
static Evaluation liquidHeatCapacity(const Evaluation&,
const Evaluation&)
{ return 4.184e3; }
/*!

View File

@ -178,7 +178,7 @@ public:
// create a function evaluation for a "naked" depending variable (i.e., f(x) = x)
template <class RhsValueType>
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 <class RhsValueType>
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.");
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -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 <class RhsValueType>
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 <class RhsValueType>
static Evaluation createConstant(const Evaluation& x OPM_UNUSED, const RhsValueType& value)
static Evaluation createConstant(const Evaluation&, const RhsValueType& value)
{
return Evaluation(value);
}

View File

@ -46,7 +46,7 @@ unsigned getPvtRegionIndex_(typename std::enable_if<HasMember_pvtRegionIndex<Flu
template <class FluidState>
unsigned getPvtRegionIndex_(typename std::enable_if<!HasMember_pvtRegionIndex<FluidState>::value,
const FluidState&>::type fluidState OPM_UNUSED)
const FluidState&>::type)
{ return 0; }
OPM_GENERATE_HAS_MEMBER(invB, /*phaseIdx=*/0) // Creates 'HasMember_invB<T>'.
@ -55,7 +55,7 @@ template <class FluidSystem, class FluidState, class LhsEval>
auto getInvB_(typename std::enable_if<HasMember_invB<FluidState>::value,
const FluidState&>::type fluidState,
unsigned phaseIdx,
unsigned pvtRegionIdx OPM_UNUSED)
unsigned)
-> decltype(decay<LhsEval>(fluidState.invB(phaseIdx)))
{ return decay<LhsEval>(fluidState.invB(phaseIdx)); }
@ -84,7 +84,7 @@ auto getSaltConcentration_(typename std::enable_if<HasMember_saltConcentration<F
template <class FluidState>
auto getSaltConcentration_(typename std::enable_if<!HasMember_saltConcentration<FluidState>::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); }
//////

View File

@ -68,7 +68,7 @@ LhsEval getRs_(typename std::enable_if<!HasMember_Rs<FluidState>::value, const F
template <class FluidSystem, class FluidState, class LhsEval>
auto getRs_(typename std::enable_if<HasMember_Rs<FluidState>::value, const FluidState&>::type fluidState,
unsigned regionIdx OPM_UNUSED)
unsigned)
-> decltype(decay<LhsEval>(fluidState.Rs()))
{ return decay<LhsEval>(fluidState.Rs()); }
@ -83,19 +83,19 @@ LhsEval getRv_(typename std::enable_if<!HasMember_Rv<FluidState>::value, const F
template <class FluidSystem, class FluidState, class LhsEval>
auto getRv_(typename std::enable_if<HasMember_Rv<FluidState>::value, const FluidState&>::type fluidState,
unsigned regionIdx OPM_UNUSED)
unsigned)
-> decltype(decay<LhsEval>(fluidState.Rv()))
{ return decay<LhsEval>(fluidState.Rv()); }
template <class FluidSystem, class FluidState, class LhsEval>
LhsEval getSaltConcentration_(typename std::enable_if<!HasMember_saltConcentration<FluidState>::value,
const FluidState&>::type fluidState OPM_UNUSED,
unsigned regionIdx OPM_UNUSED)
const FluidState&>::type,
unsigned)
{return 0.0;}
template <class FluidSystem, class FluidState, class LhsEval>
auto getSaltConcentration_(typename std::enable_if<HasMember_saltConcentration<FluidState>::value, const FluidState&>::type fluidState,
unsigned regionIdx OPM_UNUSED)
unsigned)
-> decltype(decay<LhsEval>(fluidState.saltConcentration()))
{ return decay<LhsEval>(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_; }
/*!

View File

@ -129,10 +129,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters.
*/
template <class Evaluation>
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);
}

View File

@ -154,9 +154,9 @@ public:
* \brief Returns the specific enthalpy [J/kg] of water given a set of parameters.
*/
template <class Evaluation>
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");
}

View File

@ -174,10 +174,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters.
*/
template <class Evaluation>
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");
}

View File

@ -164,9 +164,9 @@ public:
* \brief Returns the specific enthalpy [J/kg] of water given a set of parameters.
*/
template <class Evaluation>
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");
}

View File

@ -181,10 +181,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters.
*/
template <class Evaluation>
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");
}

View File

@ -205,10 +205,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters.
*/
template <class Evaluation>
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");
}

View File

@ -222,8 +222,8 @@ public:
template <class Evaluation>
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");

View File

@ -440,10 +440,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of oil given a set of parameters.
*/
template <class Evaluation>
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 <class Evaluation>
Evaluation saturationPressure(unsigned regionIdx,
const Evaluation& temperature OPM_UNUSED,
const Evaluation&,
const Evaluation& Rs) const
{
typedef MathToolbox<Evaluation> Toolbox;

View File

@ -239,8 +239,8 @@ public:
template <class Evaluation>
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");

View File

@ -180,7 +180,7 @@ public:
*/
template <class Evaluation>
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 <class Evaluation>
Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
const Evaluation& temperature OPM_UNUSED,
const Evaluation&,
const Evaluation& pressure) const
{ return inverseSolventB_[regionIdx].eval(pressure, /*extrapolate=*/true); }

View File

@ -245,7 +245,7 @@ public:
template <class Evaluation>
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");

View File

@ -471,10 +471,10 @@ public:
* \brief Returns the specific enthalpy [J/kg] of gas given a set of parameters.
*/
template <class Evaluation>
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 <class Evaluation>
Evaluation saturationPressure(unsigned regionIdx,
const Evaluation& temperature OPM_UNUSED,
const Evaluation&,
const Evaluation& Rv) const
{
typedef MathToolbox<Evaluation> Toolbox;

View File

@ -55,7 +55,7 @@ public:
*/
template <class FluidState, class Evaluation = typename FluidState::Scalar>
static Evaluation thermalConductivity(const Params& params,
const FluidState& fluidState OPM_UNUSED)
const FluidState&)
{
// The thermal conductivity approach based on the THC* keywords.

View File

@ -54,7 +54,7 @@ public:
* medium.
*/
template <class FluidState, class Evaluation = typename FluidState::Scalar>
static Evaluation thermalConductivity(const Params& params OPM_UNUSED,
static Evaluation thermalConductivity(const Params&,
const FluidState& fluidState)
{
typename FluidSystem::template ParameterCache<Evaluation> paramCache;

View File

@ -50,7 +50,7 @@ public:
* This solid energy law simply returns 0.
*/
template <class FluidState, class Evaluation = typename FluidState::Scalar>
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

View File

@ -53,8 +53,8 @@ public:
* If this method is called an exception is thrown at run time.
*/
template <class FluidState, class Evaluation = typename FluidState::Scalar>
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