Silence unused argument warnings with OPM_UNUSED.

This commit is contained in:
Atgeirr Flø Rasmussen
2016-12-30 10:03:14 +01:00
parent 8c6e6dc410
commit 5724244b4f
6 changed files with 33 additions and 33 deletions

View File

@@ -63,42 +63,42 @@ public:
{ } { }
template <bool prepareValues = true, bool prepareGradients = true> template <bool prepareValues = true, bool prepareGradients = true>
void prepare(const ElementContext& elemCtx, unsigned timeIdx) void prepare(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED timeIdx)
{ } { }
template <class QuantityCallback, class QuantityType = Scalar> template <class QuantityCallback, class QuantityType = Scalar>
QuantityType calculateValue(const ElementContext& elemCtx, QuantityType calculateValue(const ElementContext& OPM_UNUSED elemCtx,
unsigned fapIdx, unsigned OPM_UNUSED fapIdx,
const QuantityCallback& quantityCallback) const const QuantityCallback& OPM_UNUSED quantityCallback) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic values are not supported by the ECL black-oil simulator"); "Generic values are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
void calculateGradient(DimVector& quantityGrad, void calculateGradient(DimVector& OPM_UNUSED quantityGrad,
const ElementContext& elemCtx, const ElementContext& OPM_UNUSED elemCtx,
unsigned fapIdx, unsigned OPM_UNUSED fapIdx,
const QuantityCallback& quantityCallback) const const QuantityCallback& OPM_UNUSED quantityCallback) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic gradients are not supported by the ECL black-oil simulator"); "Generic gradients are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
Scalar calculateBoundaryValue(const ElementContext& elemCtx, Scalar calculateBoundaryValue(const ElementContext& OPM_UNUSED elemCtx,
unsigned fapIdx, unsigned OPM_UNUSED fapIdx,
const QuantityCallback& quantityCallback) const QuantityCallback& OPM_UNUSED quantityCallback)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic boundary values are not supported by the ECL black-oil simulator"); "Generic boundary values are not supported by the ECL black-oil simulator");
} }
template <class QuantityCallback> template <class QuantityCallback>
void calculateBoundaryGradient(DimVector& quantityGrad, void calculateBoundaryGradient(DimVector& OPM_UNUSED quantityGrad,
const ElementContext& elemCtx, const ElementContext& OPM_UNUSED elemCtx,
unsigned fapIdx, unsigned OPM_UNUSED fapIdx,
const QuantityCallback& quantityCallback) const const QuantityCallback& OPM_UNUSED quantityCallback) const
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Generic boundary gradients are not supported by the ECL black-oil simulator"); "Generic boundary gradients are not supported by the ECL black-oil simulator");

View File

@@ -91,7 +91,7 @@ class EclTransIntensiveQuantities
{ {
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext; typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
protected: protected:
void update_(const ElementContext& elemCtx, unsigned dofIdx, unsigned timeIdx) void update_(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED dofIdx, unsigned OPM_UNUSED timeIdx)
{ } { }
}; };
@@ -139,7 +139,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
const EvalDimVector& potentialGrad(unsigned phaseIdx) const const EvalDimVector& potentialGrad(unsigned OPM_UNUSED phaseIdx) const
{ {
OPM_THROW(Opm::NotImplemented, OPM_THROW(Opm::NotImplemented,
"The ECL transmissibility module does not provide explicit potential gradients"); "The ECL transmissibility module does not provide explicit potential gradients");
@@ -160,7 +160,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
const EvalDimVector& filterVelocity(unsigned phaseIdx) const const EvalDimVector& filterVelocity(unsigned OPM_UNUSED phaseIdx) const
{ {
OPM_THROW(Opm::NotImplemented, OPM_THROW(Opm::NotImplemented,
"The ECL transmissibility module does not provide explicit filter velocities"); "The ECL transmissibility module does not provide explicit filter velocities");
@@ -348,7 +348,7 @@ protected:
/*! /*!
* \brief Update the volumetric fluxes for all fluid phases on the interior faces of the context * \brief Update the volumetric fluxes for all fluid phases on the interior faces of the context
*/ */
void calculateFluxes_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) void calculateFluxes_(const ElementContext& OPM_UNUSED elemCtx, unsigned OPM_UNUSED scvfIdx, unsigned OPM_UNUSED timeIdx)
{ } { }
// transmissibility [m^3 s] // transmissibility [m^3 s]

View File

@@ -136,7 +136,7 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
// retrieve the solution dependent quantities that are only updated at the // retrieve the solution dependent quantities that are only updated at the
// beginning of a time step from the IntensiveQuantities of the model // beginning of a time step from the IntensiveQuantities of the model
void updateBeginTimestep(const IntensiveQuantities& intQuants) void updateBeginTimestep(const IntensiveQuantities& OPM_UNUSED intQuants)
{} {}
// retrieve the solution dependent quantities from the IntensiveQuantities of the // retrieve the solution dependent quantities from the IntensiveQuantities of the

View File

@@ -775,9 +775,9 @@ public:
*/ */
template <class Context> template <class Context>
void boundary(BoundaryRateVector& values, void boundary(BoundaryRateVector& values,
const Context& context, const Context& OPM_UNUSED context,
unsigned spaceIdx, unsigned OPM_UNUSED spaceIdx,
unsigned timeIdx) const unsigned OPM_UNUSED timeIdx) const
{ values.setNoFlow(); } { values.setNoFlow(); }
/*! /*!

View File

@@ -542,7 +542,7 @@ public:
* to the hard disk. * to the hard disk.
*/ */
template <class Restarter> template <class Restarter>
void serialize(Restarter& res) void serialize(Restarter& OPM_UNUSED res)
{ {
/* do nothing: Everything which we need here is provided by the deck->.. */ /* do nothing: Everything which we need here is provided by the deck->.. */
} }
@@ -554,7 +554,7 @@ public:
* It is the inverse of the serialize() method. * It is the inverse of the serialize() method.
*/ */
template <class Restarter> template <class Restarter>
void deserialize(Restarter& res) void deserialize(Restarter& OPM_UNUSED res)
{ {
// initialize the wells for the current episode // initialize the wells for the current episode
beginEpisode(simulator_.gridManager().eclState(), /*wasRestarted=*/true); beginEpisode(simulator_.gridManager().eclState(), /*wasRestarted=*/true);
@@ -604,7 +604,7 @@ protected:
reportStepIdx); reportStepIdx);
} }
void updateWellTopology_(unsigned reportStepIdx, void updateWellTopology_(unsigned OPM_UNUSED reportStepIdx,
const WellCompletionsMap& wellCompletions, const WellCompletionsMap& wellCompletions,
std::vector<bool>& gridDofIsPenetrated) const std::vector<bool>& gridDofIsPenetrated) const
{ {
@@ -664,7 +664,7 @@ protected:
} }
} }
void computeWellCompletionsMap_(unsigned reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap) void computeWellCompletionsMap_(unsigned OPM_UNUSED reportStepIdx, WellCompletionsMap& cartesianIdxToCompletionMap)
{ {
const auto& eclState = simulator_.gridManager().eclState(); const auto& eclState = simulator_.gridManager().eclState();
const auto& deckSchedule = eclState.getSchedule(); const auto& deckSchedule = eclState.getSchedule();

View File

@@ -168,7 +168,7 @@ public:
/*! /*!
* \brief Called whenever a new time step must be written. * \brief Called whenever a new time step must be written.
*/ */
void beginWrite(double t) void beginWrite(double OPM_UNUSED t)
{ {
if (enableEclOutput_() && reportStepIdx_ == 0 && collectToIORank_.isIORank() ) if (enableEclOutput_() && reportStepIdx_ == 0 && collectToIORank_.isIORank() )
EclWriterHelper<TypeTag, GridManager>::writeHeaders_(*this); EclWriterHelper<TypeTag, GridManager>::writeHeaders_(*this);
@@ -180,7 +180,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachScalarVertexData(ScalarBuffer& buf, std::string name) void attachScalarVertexData(ScalarBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@@ -192,7 +192,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachVectorVertexData(VectorBuffer& buf, std::string name) void attachVectorVertexData(VectorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@@ -201,7 +201,7 @@ public:
/* /*
* \brief Add a vertex-centered tensor field to the output. * \brief Add a vertex-centered tensor field to the output.
*/ */
void attachTensorVertexData(TensorBuffer& buf, std::string name) void attachTensorVertexData(TensorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"The EclWriter can only write element based quantities!"); "The EclWriter can only write element based quantities!");
@@ -225,7 +225,7 @@ public:
* For the EclWriter, this method is a no-op which throws a * For the EclWriter, this method is a no-op which throws a
* std::logic_error exception * std::logic_error exception
*/ */
void attachVectorElementData(VectorBuffer& buf, std::string name) void attachVectorElementData(VectorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Currently, the EclWriter can only write scalar quantities!"); "Currently, the EclWriter can only write scalar quantities!");
@@ -234,7 +234,7 @@ public:
/* /*
* \brief Add a element-centered tensor field to the output. * \brief Add a element-centered tensor field to the output.
*/ */
void attachTensorElementData(TensorBuffer& buf, std::string name) void attachTensorElementData(TensorBuffer& OPM_UNUSED buf, std::string OPM_UNUSED name)
{ {
OPM_THROW(std::logic_error, OPM_THROW(std::logic_error,
"Currently, the EclWriter can only write scalar quantities!"); "Currently, the EclWriter can only write scalar quantities!");