diff --git a/ebos/eclthresholdpressure.hh b/ebos/eclthresholdpressure.hh index 55d3e8aef..e64463829 100644 --- a/ebos/eclthresholdpressure.hh +++ b/ebos/eclthresholdpressure.hh @@ -172,8 +172,8 @@ public: int cartElem1Idx = vanguard.cartesianIndex(elem1Idx); int cartElem2Idx = vanguard.cartesianIndex(elem2Idx); - assert(0 <= cartElem1Idx && cartElemFaultIdx_.size() > cartElem1Idx); - assert(0 <= cartElem2Idx && cartElemFaultIdx_.size() > cartElem2Idx); + assert(0 <= cartElem1Idx && cartElemFaultIdx_.size() > 0U + cartElem1Idx); + assert(0 <= cartElem2Idx && cartElemFaultIdx_.size() > 0U + cartElem2Idx); int fault1Idx = cartElemFaultIdx_[cartElem1Idx]; int fault2Idx = cartElemFaultIdx_[cartElem2Idx]; diff --git a/ebos/ecltransmissibility.hh b/ebos/ecltransmissibility.hh index f4551d780..f9cb1663d 100644 --- a/ebos/ecltransmissibility.hh +++ b/ebos/ecltransmissibility.hh @@ -390,7 +390,7 @@ public: int cartElemIdx = vanguard_.cartesianIndexMapper().cartesianIndex(elemIdx); globalToLocal[cartElemIdx] = elemIdx; } - applyEditNncToGridTrans_(elemMapper, globalToLocal); + applyEditNncToGridTrans_(globalToLocal); applyNncToGridTrans_(globalToLocal); //remove very small non-neighbouring transmissibilities @@ -703,8 +703,7 @@ private: } /// \brief Multiplies the grid transmissibilities according to EDITNNC. - void applyEditNncToGridTrans_(const ElementMapper& elementMapper, - const std::vector& globalToLocal) + void applyEditNncToGridTrans_(const std::vector& globalToLocal) { const auto& editNnc = vanguard_.eclState().getInputEDITNNC(); if (editNnc.empty()) diff --git a/opm/autodiff/AquiferInterface.hpp b/opm/autodiff/AquiferInterface.hpp index 345fd12ec..48d35e1fc 100644 --- a/opm/autodiff/AquiferInterface.hpp +++ b/opm/autodiff/AquiferInterface.hpp @@ -161,9 +161,9 @@ namespace Opm } template - inline const double getFaceArea(const faceCellType& faceCells, const ugridType& ugrid, - const int faceIdx, const int idx, - const Aquancon::AquanconOutput& connection) const + inline double getFaceArea(const faceCellType& faceCells, const ugridType& ugrid, + const int faceIdx, const int idx, + const Aquancon::AquanconOutput& connection) const { // Check now if the face is outside of the reservoir, or if it adjoins an inactive cell // Do not make the connection if the product of the two cellIdx > 0. This is because the diff --git a/opm/autodiff/BlackoilAquiferModel_impl.hpp b/opm/autodiff/BlackoilAquiferModel_impl.hpp index 4d74bfccd..90f5dee89 100644 --- a/opm/autodiff/BlackoilAquiferModel_impl.hpp +++ b/opm/autodiff/BlackoilAquiferModel_impl.hpp @@ -109,7 +109,7 @@ namespace Opm { template template void - BlackoilAquiferModel::serialize(Restarter& res) + BlackoilAquiferModel::serialize(Restarter& /* res */) { // TODO (?) throw std::logic_error("BlackoilAquiferModel::serialize() is not yet implemented"); @@ -118,7 +118,7 @@ namespace Opm { template template void - BlackoilAquiferModel::deserialize(Restarter& res) + BlackoilAquiferModel::deserialize(Restarter& /* res */) { // TODO (?) throw std::logic_error("BlackoilAquiferModel::deserialize() is not yet implemented"); diff --git a/opm/autodiff/BlackoilModelEbos.hpp b/opm/autodiff/BlackoilModelEbos.hpp index b4241cc3f..69049822c 100644 --- a/opm/autodiff/BlackoilModelEbos.hpp +++ b/opm/autodiff/BlackoilModelEbos.hpp @@ -360,7 +360,7 @@ namespace Opm { /// Called once after each time step. /// In this class, this function does nothing. /// \param[in] timer simulation timer - void afterStep(const SimulatorTimerInterface& OPM_UNUSED timer) + void afterStep(const SimulatorTimerInterface& timer OPM_UNUSED) { ebosSimulator_.problem().endTimeStep(); } @@ -369,7 +369,7 @@ namespace Opm { /// \param[in] reservoir_state reservoir state variables /// \param[in, out] well_state well state variables /// \param[in] initial_assembly pass true if this is the first call to assemble() in this timestep - SimulatorReport assembleReservoir(const SimulatorTimerInterface& timer, + SimulatorReport assembleReservoir(const SimulatorTimerInterface& /* timer */, const int iterationIdx) { // -------- Mass balance equations -------- diff --git a/opm/autodiff/BlackoilWellModel.hpp b/opm/autodiff/BlackoilWellModel.hpp index cd506669e..bb98bd4c0 100644 --- a/opm/autodiff/BlackoilWellModel.hpp +++ b/opm/autodiff/BlackoilWellModel.hpp @@ -138,7 +138,7 @@ namespace Opm { ///////////// template - void deserialize(Restarter& res) + void deserialize(Restarter& /* res */) { // TODO (?) } @@ -148,13 +148,13 @@ namespace Opm { * to the harddisk. */ template - void serialize(Restarter& res) + void serialize(Restarter& /* res*/) { // TODO (?) } - void beginEpisode(const Opm::EclipseState& eclState, - const Opm::Schedule& schedule, + void beginEpisode(const Opm::EclipseState& /* eclState */, + const Opm::Schedule& /* schedule */, bool isRestart) { size_t episodeIdx = ebosSimulator_.episodeIndex(); diff --git a/opm/autodiff/BlackoilWellModel_impl.hpp b/opm/autodiff/BlackoilWellModel_impl.hpp index 86a6d0602..c13370a1d 100644 --- a/opm/autodiff/BlackoilWellModel_impl.hpp +++ b/opm/autodiff/BlackoilWellModel_impl.hpp @@ -38,7 +38,7 @@ namespace Opm { template void BlackoilWellModel:: - init(const Opm::EclipseState& eclState, const Opm::Schedule& schedule) + init(const Opm::EclipseState& eclState, const Opm::Schedule& /* schedule */) { gravity_ = ebosSimulator_.problem().gravity()[2]; @@ -1737,7 +1737,7 @@ namespace Opm { const auto& segments = well.segments; // \Note: eventually we need to hanlde the situations that some segments are shut - assert(int(segment_set.size()) == segments.size()); + assert( 1u + segment_set.size() == segments.size()); for (const auto& segment : segments) { const int segment_index = segment_set.segmentNumberToIndex(segment.first); diff --git a/opm/autodiff/ISTLSolverEbos.hpp b/opm/autodiff/ISTLSolverEbos.hpp index 68b80ee08..80891171d 100644 --- a/opm/autodiff/ISTLSolverEbos.hpp +++ b/opm/autodiff/ISTLSolverEbos.hpp @@ -490,7 +490,7 @@ protected: template void constructAMGPrecond(LinearOperator& /* linearOperator */, const POrComm& comm, std::unique_ptr< AMG >& amg, std::unique_ptr< MatrixOperator >& opA, const double relax, - const MILU_VARIANT milu ) const + const MILU_VARIANT /* milu */ ) const { ISTLUtility::template createAMGPreconditionerPointer( *opA, relax, comm, amg, parameters_, weights_ ); diff --git a/opm/autodiff/ISTLSolverEbosCpr.hpp b/opm/autodiff/ISTLSolverEbosCpr.hpp index c98b007e6..1c49641b5 100644 --- a/opm/autodiff/ISTLSolverEbosCpr.hpp +++ b/opm/autodiff/ISTLSolverEbosCpr.hpp @@ -215,9 +215,6 @@ namespace Opm const double relax = this->parameters_.ilu_relaxation_; const MILU_VARIANT ilu_milu = this->parameters_.ilu_milu_; - using Matrix = typename MatrixAdapter::matrix_type; - const int verbosity = ( this->parameters_.cpr_solver_verbose_ && - comm.communicator().rank()==0 ) ? 1 : 0; // TODO: revise choice of parameters // int coarsenTarget = 4000; @@ -250,7 +247,6 @@ namespace Opm auto& opARef = reinterpret_cast(*opA_); int newton_iteration = this->simulator_.model().newtonMethod().numIterations(); - double dt = this->simulator_.timeStepSize(); bool update_preconditioner = false; if (this->parameters_.cpr_reuse_setup_ < 1) { diff --git a/opm/autodiff/MultisegmentWell_impl.hpp b/opm/autodiff/MultisegmentWell_impl.hpp index 51cdefcc1..3994e4935 100644 --- a/opm/autodiff/MultisegmentWell_impl.hpp +++ b/opm/autodiff/MultisegmentWell_impl.hpp @@ -259,9 +259,9 @@ namespace Opm template void MultisegmentWell:: - updateWellStateWithTarget(const Simulator& ebos_simulator, + updateWellStateWithTarget(const Simulator& /* ebos_simulator */, WellState& well_state, - Opm::DeferredLogger& deferred_logger) const + Opm::DeferredLogger& /* deferred_logger */) const { // Updating well state bas on well control // Target values are used as initial conditions for BHP, THP, and SURFACE_RATE @@ -768,7 +768,7 @@ namespace Opm MultisegmentWell:: updateWellState(const BVectorWell& dwells, WellState& well_state, - Opm::DeferredLogger& deferred_logger, + Opm::DeferredLogger& /* deferred_logger */, const double relaxation_factor) const { const double dFLimit = param_.dwell_fraction_max_; @@ -2017,9 +2017,9 @@ namespace Opm template void MultisegmentWell:: - wellTestingPhysical(Simulator& simulator, const std::vector& B_avg, - const double simulation_time, const int report_step, - WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) + wellTestingPhysical(Simulator& /* simulator */, const std::vector& /* B_avg */, + const double /* simulation_time */, const int /* report_step */, + WellState& /* well_state */, WellTestState& /* welltest_state */, Opm::DeferredLogger& deferred_logger) { const std::string msg = "Support of well testing for physical limits for multisegment wells is not " "implemented yet, wellTestingPhysical() for " + name() + " will do nothing"; diff --git a/opm/autodiff/StandardWellV_impl.hpp b/opm/autodiff/StandardWellV_impl.hpp index b322ae1c7..3c037881e 100644 --- a/opm/autodiff/StandardWellV_impl.hpp +++ b/opm/autodiff/StandardWellV_impl.hpp @@ -922,7 +922,7 @@ namespace Opm void StandardWellV:: updatePrimaryVariablesNewton(const BVectorWell& dwells, - const WellState& well_state) const + const WellState& /* well_state */) const { const double dFLimit = param_.dwell_fraction_max_; @@ -1433,7 +1433,7 @@ namespace Opm void StandardWellV:: updateWellOperability(const Simulator& ebos_simulator, - const WellState& well_state, + const WellState& /* well_state */, Opm::DeferredLogger& deferred_logger) { this->operability_status_.reset(); @@ -1509,7 +1509,7 @@ namespace Opm template void StandardWellV:: - checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger) + checkOperabilityUnderTHPLimitProducer(const Simulator& /* ebos_simulator */, Opm::DeferredLogger& deferred_logger) { const double obtain_bhp = calculateBHPWithTHPTargetIPR(deferred_logger); @@ -2892,7 +2892,7 @@ namespace Opm void StandardWellV:: wellTestingPhysical(Simulator& ebos_simulator, const std::vector& B_avg, - const double simulation_time, const int report_step, + const double /* simulation_time */ , const int /* report_step */, WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) { deferred_logger.debug(" well " + name() + " is being tested for physical limits"); diff --git a/opm/autodiff/StandardWell_impl.hpp b/opm/autodiff/StandardWell_impl.hpp index bc391085e..9b5e60d1d 100644 --- a/opm/autodiff/StandardWell_impl.hpp +++ b/opm/autodiff/StandardWell_impl.hpp @@ -867,7 +867,7 @@ namespace Opm void StandardWell:: updatePrimaryVariablesNewton(const BVectorWell& dwells, - const WellState& well_state) const + const WellState& /* well_state */) const { const double dFLimit = param_.dwell_fraction_max_; @@ -1357,7 +1357,7 @@ namespace Opm void StandardWell:: updateWellOperability(const Simulator& ebos_simulator, - const WellState& well_state, + const WellState& /* well_state */, Opm::DeferredLogger& deferred_logger ) { @@ -1434,7 +1434,7 @@ namespace Opm template void StandardWell:: - checkOperabilityUnderTHPLimitProducer(const Simulator& ebos_simulator, Opm::DeferredLogger& deferred_logger) + checkOperabilityUnderTHPLimitProducer(const Simulator& /* ebos_simulator */, Opm::DeferredLogger& deferred_logger) { const double obtain_bhp = calculateBHPWithTHPTargetIPR(deferred_logger); @@ -2782,7 +2782,7 @@ namespace Opm void StandardWell:: wellTestingPhysical(Simulator& ebos_simulator, const std::vector& B_avg, - const double simulation_time, const int report_step, + const double /* simulation_time */, const int /* report_step */, WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) { diff --git a/opm/autodiff/WellInterface.hpp b/opm/autodiff/WellInterface.hpp index 186fba2be..9f67c9aa7 100644 --- a/opm/autodiff/WellInterface.hpp +++ b/opm/autodiff/WellInterface.hpp @@ -127,7 +127,7 @@ namespace Opm const std::string& name() const; /// Index of well in the wells struct and wellState - const int indexOfWell() const; + int indexOfWell() const; /// Well cells. const std::vector& cells() const {return well_cells_; } diff --git a/opm/autodiff/WellInterface_impl.hpp b/opm/autodiff/WellInterface_impl.hpp index d8a53c5c4..5a0b844e3 100644 --- a/opm/autodiff/WellInterface_impl.hpp +++ b/opm/autodiff/WellInterface_impl.hpp @@ -186,7 +186,7 @@ namespace Opm } template - const int + int WellInterface:: indexOfWell() const { @@ -774,7 +774,7 @@ namespace Opm template void WellInterface:: - updateWellTestStatePhysical(const WellState& well_state, + updateWellTestStatePhysical(const WellState& /* well_state */, const double simulation_time, const bool write_message_to_opmlog, WellTestState& well_test_state, diff --git a/opm/core/wells/WellsManager_impl.hpp b/opm/core/wells/WellsManager_impl.hpp index 8296c40cd..e81646404 100644 --- a/opm/core/wells/WellsManager_impl.hpp +++ b/opm/core/wells/WellsManager_impl.hpp @@ -103,18 +103,18 @@ namespace Opm { template void WellsManager::createWellsFromSpecs(std::vector& wells, size_t timeStep, - const C2F& c2f, + const C2F& /* c2f */, const int* cart_dims, - FC begin_face_centroids, + FC /* begin_face_centroids */, int dimensions, - std::vector& dz, + std::vector& /* dz */, std::vector& well_names, std::vector& well_data, std::map& well_names_to_index, const PhaseUsage& phaseUsage, const std::map& cartesian_to_compressed, - const double* permeability, - const NTG& ntg, + const double* /* permeability */, + const NTG& /* ntg */, std::vector& wells_on_proc, const std::unordered_set& ignored_wells) { diff --git a/tests/test_ecl_output.cc b/tests/test_ecl_output.cc index 1ac3e920f..064ff74e2 100644 --- a/tests/test_ecl_output.cc +++ b/tests/test_ecl_output.cc @@ -211,14 +211,14 @@ void test_readWriteWells() * the connection keys (active indices) and well names correspond to the * input deck. All other entries in the well structures are arbitrary. */ - w1.connections.push_back( { 88, rc1, 30.45, 123.45, 0.0, 0.0, 0.0 } ); - w1.connections.push_back( { 288, rc2, 33.19, 67.89, 0.0, 0.0, 0.0 } ); + w1.connections.push_back( { 88, rc1, 30.45, 123.45, 0.0, 0.0, 0.0, 0.0 } ); + w1.connections.push_back( { 288, rc2, 33.19, 67.89, 0.0, 0.0, 0.0, 0.0 } ); w2.rates = r2; w2.bhp = 2.34; w2.temperature = 4.56; w2.control = 2; - w2.connections.push_back( { 188, rc3, 36.22, 19.28, 0.0, 0.0, 0.0 } ); + w2.connections.push_back( { 188, rc3, 36.22, 19.28, 0.0, 0.0, 0.0, 0.0 } ); Opm::data::Wells wellRates;