Merge pull request #641 from atgeirr/fix-warnings

Fix warnings
This commit is contained in:
Bård Skaflestad 2014-08-28 16:11:12 +02:00
commit 9784df8024
8 changed files with 24 additions and 28 deletions

View File

@ -113,7 +113,6 @@ try
std::string deck_filename = param.get<std::string>("deck_filename"); std::string deck_filename = param.get<std::string>("deck_filename");
deck = parser->parseFile(deck_filename); deck = parser->parseFile(deck_filename);
EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
eclipseState.reset( new EclipseState(deck)); eclipseState.reset( new EclipseState(deck));
// Grid init // Grid init
grid.reset(new GridManager(deck)); grid.reset(new GridManager(deck));

View File

@ -286,7 +286,6 @@ public:
int nx, int nx,
int ny, int ny,
int nz, int nz,
const int *compressedToCartesianCellIdx,
const PhaseUsage uses) const PhaseUsage uses)
{ {
ecl_rst_file_fwrite_header(restartFileHandle_, ecl_rst_file_fwrite_header(restartFileHandle_,
@ -544,8 +543,7 @@ public:
{ return ertHandle_; } { return ertHandle_; }
protected: protected:
void updateTimeStepWellIndex_(const SimulatorTimer& timer, void updateTimeStepWellIndex_(const std::map<std::string, int>& nameToIdxMap)
const std::map<std::string, int>& nameToIdxMap)
{ {
const std::string& wellName = well_->name(); const std::string& wellName = well_->name();
@ -669,12 +667,12 @@ public:
"SM3/DAY" /* surf. cub. m. per day */) "SM3/DAY" /* surf. cub. m. per day */)
{ } { }
virtual double retrieveValue(const SimulatorTimer& timer, virtual double retrieveValue(const SimulatorTimer& /*timer*/,
const WellState& wellState, const WellState& wellState,
const std::map<std::string, int>& wellNameToIdxMap) const std::map<std::string, int>& wellNameToIdxMap)
{ {
// find the index for the quantity in the wellState // find the index for the quantity in the wellState
this->updateTimeStepWellIndex_(timer, wellNameToIdxMap); this->updateTimeStepWellIndex_(wellNameToIdxMap);
if (this->flatIdx_ < 0) { if (this->flatIdx_ < 0) {
// well not active in current time step // well not active in current time step
return 0.0; return 0.0;
@ -718,7 +716,7 @@ public:
} }
// find the index for the quantity in the wellState // find the index for the quantity in the wellState
this->updateTimeStepWellIndex_(timer, wellNameToIdxMap); this->updateTimeStepWellIndex_(wellNameToIdxMap);
if (this->flatIdx_ < 0) { if (this->flatIdx_ < 0) {
// well not active in current time step // well not active in current time step
return 0.0; return 0.0;
@ -759,12 +757,12 @@ public:
"Pascal") "Pascal")
{ } { }
virtual double retrieveValue(const SimulatorTimer& timer, virtual double retrieveValue(const SimulatorTimer& /*timer*/,
const WellState& wellState, const WellState& wellState,
const std::map<std::string, int>& wellNameToIdxMap) const std::map<std::string, int>& wellNameToIdxMap)
{ {
// find the index for the quantity in the wellState // find the index for the quantity in the wellState
this->updateTimeStepWellIndex_(timer, wellNameToIdxMap); this->updateTimeStepWellIndex_(wellNameToIdxMap);
if (this->flatIdx_ < 0) { if (this->flatIdx_ < 0) {
// well not active in current time step // well not active in current time step
return 0.0; return 0.0;
@ -932,7 +930,6 @@ void EclipseWriter::writeTimeStep(const SimulatorTimer& timer,
cartesianSize_[0], cartesianSize_[0],
cartesianSize_[1], cartesianSize_[1],
cartesianSize_[2], cartesianSize_[2],
compressedToCartesianCellIdx_,
phaseUsage_); phaseUsage_);
EclipseWriterDetails::Solution sol(restartHandle); EclipseWriterDetails::Solution sol(restartHandle);

View File

@ -243,9 +243,9 @@ namespace Opm
/// \param[in] cell Cell index. /// \param[in] cell Cell index.
/// \param[in] pcow P_oil - P_water. /// \param[in] pcow P_oil - P_water.
/// \param[in/out] swat Water saturation. / Possibly modified Water saturation. /// \param[in/out] swat Water saturation. / Possibly modified Water saturation.
void BlackoilPropertiesBasic::swatInitScaling(const int cell, void BlackoilPropertiesBasic::swatInitScaling(const int /*cell*/,
const double pcow, const double /*pcow*/,
double & swat) double& /*swat*/)
{ {
OPM_THROW(std::runtime_error, "BlackoilPropertiesBasic::swatInitScaling() -- not implemented."); OPM_THROW(std::runtime_error, "BlackoilPropertiesBasic::swatInitScaling() -- not implemented.");
} }

View File

@ -217,7 +217,7 @@ namespace Opm
} }
void PvtDead::rsSat(const int n, void PvtDead::rsSat(const int n,
const int* pvtTableIdx, const int* /*pvtTableIdx*/,
const double* /*p*/, const double* /*p*/,
double* output_rsSat, double* output_rsSat,
double* output_drsSatdp) const double* output_drsSatdp) const
@ -227,7 +227,7 @@ namespace Opm
} }
void PvtDead::rvSat(const int n, void PvtDead::rvSat(const int n,
const int* pvtTableIdx, const int* /*pvtTableIdx*/,
const double* /*p*/, const double* /*p*/,
double* output_rvSat, double* output_rvSat,
double* output_drvSatdp) const double* output_drvSatdp) const
@ -237,7 +237,7 @@ namespace Opm
} }
void PvtDead::R(const int n, void PvtDead::R(const int n,
const int* pvtTableIdx, const int* /*pvtTableIdx*/,
const double* /*p*/, const double* /*p*/,
const double* /*z*/, const double* /*z*/,
double* output_R) const double* output_R) const
@ -246,7 +246,7 @@ namespace Opm
} }
void PvtDead::dRdp(const int n, void PvtDead::dRdp(const int n,
const int* pvtTableIdx, const int* /*pvtTableIdx*/,
const double* /*p*/, const double* /*p*/,
const double* /*z*/, const double* /*z*/,
double* output_R, double* output_R,

View File

@ -217,7 +217,7 @@ namespace Opm
} }
void PvtLiveGas::rsSat(const int n, void PvtLiveGas::rsSat(const int n,
const int* pvtRegionIdx, const int* /*pvtRegionIdx*/,
const double* /*p*/, const double* /*p*/,
double* output_rsSat, double* output_rsSat,
double* output_drsSatdp) const double* output_drsSatdp) const

View File

@ -266,7 +266,7 @@ namespace Opm
} }
void PvtLiveOil::rvSat(const int n, void PvtLiveOil::rvSat(const int n,
const int* pvtTableIdx, const int* /*pvtTableIdx*/,
const double* /*p*/, const double* /*p*/,
double* output_rvSat, double* output_rvSat,
double* output_drvSatdp) const double* output_drvSatdp) const

View File

@ -63,7 +63,7 @@ namespace Opm
template <class SatFuncSet> template <class SatFuncSet>
template<class T> template<class T>
void SaturationPropsFromDeck<SatFuncSet>::init(Opm::DeckConstPtr deck, void SaturationPropsFromDeck<SatFuncSet>::init(Opm::DeckConstPtr deck,
Opm::EclipseStateConstPtr eclState, Opm::EclipseStateConstPtr /*eclState*/,
int number_of_cells, int number_of_cells,
const int* global_cell, const int* global_cell,
const T& begin_cell_centroids, const T& begin_cell_centroids,

View File

@ -155,7 +155,7 @@ void createBlackoilState(int timeStepIdx)
} }
} }
void createWellState(int timeStepIdx) void createWellState(int /*timeStepIdx*/)
{ {
// allocate a new BlackoilState object // allocate a new BlackoilState object
wellState.reset(new Opm::WellState); wellState.reset(new Opm::WellState);
@ -314,8 +314,8 @@ void checkRestartFile(int timeStepIdx)
getErtData(eclKeyword, resultData); getErtData(eclKeyword, resultData);
// convert the data from ERT from Metric to SI units (bar to Pa) // convert the data from ERT from Metric to SI units (bar to Pa)
for (size_t i = 0; i < resultData.size(); ++i) { for (size_t ii = 0; ii < resultData.size(); ++ii) {
resultData[i] *= 1e5; resultData[ii] *= 1e5;
} }
compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4); compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4);
@ -328,9 +328,9 @@ void checkRestartFile(int timeStepIdx)
// extract the water saturation from the black-oil state // extract the water saturation from the black-oil state
sourceData.resize(numCells); sourceData.resize(numCells);
for (size_t i = 0; i < sourceData.size(); ++i) { for (size_t ii = 0; ii < sourceData.size(); ++ii) {
// again, fun with direct index manipulation... // again, fun with direct index manipulation...
sourceData[i] = blackoilState->saturation()[i*numActivePhases + waterPhaseIdx]; sourceData[ii] = blackoilState->saturation()[ii*numActivePhases + waterPhaseIdx];
} }
compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4); compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4);
@ -343,9 +343,9 @@ void checkRestartFile(int timeStepIdx)
// extract the water saturation from the black-oil state // extract the water saturation from the black-oil state
sourceData.resize(numCells); sourceData.resize(numCells);
for (size_t i = 0; i < sourceData.size(); ++i) { for (size_t ii = 0; ii < sourceData.size(); ++ii) {
// again, fun with direct index manipulation... // again, fun with direct index manipulation...
sourceData[i] = blackoilState->saturation()[i*numActivePhases + gasPhaseIdx]; sourceData[ii] = blackoilState->saturation()[ii*numActivePhases + gasPhaseIdx];
} }
compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4); compareErtData(sourceData, resultData, /*percentTolerance=*/1e-4);
@ -356,7 +356,7 @@ void checkRestartFile(int timeStepIdx)
} }
} }
void checkSummaryFile(int timeStepIdx) void checkSummaryFile(int /*timeStepIdx*/)
{ {
// TODO // TODO
} }