mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #1803 from blattms/remove-warnings
Remove warnings experienced with g++-8
This commit is contained in:
commit
75e8508e3b
@ -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];
|
||||
|
@ -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<int>& globalToLocal)
|
||||
void applyEditNncToGridTrans_(const std::vector<int>& globalToLocal)
|
||||
{
|
||||
const auto& editNnc = vanguard_.eclState().getInputEDITNNC();
|
||||
if (editNnc.empty())
|
||||
|
@ -161,9 +161,9 @@ namespace Opm
|
||||
}
|
||||
|
||||
template<class faceCellType, class ugridType>
|
||||
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
|
||||
|
@ -109,7 +109,7 @@ namespace Opm {
|
||||
template <typename TypeTag>
|
||||
template <class Restarter>
|
||||
void
|
||||
BlackoilAquiferModel<TypeTag>::serialize(Restarter& res)
|
||||
BlackoilAquiferModel<TypeTag>::serialize(Restarter& /* res */)
|
||||
{
|
||||
// TODO (?)
|
||||
throw std::logic_error("BlackoilAquiferModel::serialize() is not yet implemented");
|
||||
@ -118,7 +118,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
template <class Restarter>
|
||||
void
|
||||
BlackoilAquiferModel<TypeTag>::deserialize(Restarter& res)
|
||||
BlackoilAquiferModel<TypeTag>::deserialize(Restarter& /* res */)
|
||||
{
|
||||
// TODO (?)
|
||||
throw std::logic_error("BlackoilAquiferModel::deserialize() is not yet implemented");
|
||||
|
@ -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 --------
|
||||
|
@ -138,7 +138,7 @@ namespace Opm {
|
||||
/////////////
|
||||
|
||||
template <class Restarter>
|
||||
void deserialize(Restarter& res)
|
||||
void deserialize(Restarter& /* res */)
|
||||
{
|
||||
// TODO (?)
|
||||
}
|
||||
@ -148,13 +148,13 @@ namespace Opm {
|
||||
* to the harddisk.
|
||||
*/
|
||||
template <class Restarter>
|
||||
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();
|
||||
|
@ -38,7 +38,7 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
BlackoilWellModel<TypeTag>::
|
||||
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);
|
||||
|
@ -490,7 +490,7 @@ protected:
|
||||
template <class C, class LinearOperator, class MatrixOperator, class POrComm, class AMG >
|
||||
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<C>( *opA, relax,
|
||||
comm, amg, parameters_, weights_ );
|
||||
|
@ -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<OperatorType&>(*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) {
|
||||
|
@ -259,9 +259,9 @@ namespace Opm
|
||||
template <typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
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<TypeTag>::
|
||||
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<typename TypeTag>
|
||||
void
|
||||
MultisegmentWell<TypeTag>::
|
||||
wellTestingPhysical(Simulator& simulator, const std::vector<double>& 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<double>& /* 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";
|
||||
|
@ -922,7 +922,7 @@ namespace Opm
|
||||
void
|
||||
StandardWellV<TypeTag>::
|
||||
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<TypeTag>::
|
||||
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<typename TypeTag>
|
||||
void
|
||||
StandardWellV<TypeTag>::
|
||||
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<TypeTag>::
|
||||
wellTestingPhysical(Simulator& ebos_simulator, const std::vector<double>& 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");
|
||||
|
@ -867,7 +867,7 @@ namespace Opm
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
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<TypeTag>::
|
||||
updateWellOperability(const Simulator& ebos_simulator,
|
||||
const WellState& well_state,
|
||||
const WellState& /* well_state */,
|
||||
Opm::DeferredLogger& deferred_logger
|
||||
)
|
||||
{
|
||||
@ -1434,7 +1434,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
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<TypeTag>::
|
||||
wellTestingPhysical(Simulator& ebos_simulator, const std::vector<double>& 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)
|
||||
{
|
||||
|
@ -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<int>& cells() const {return well_cells_; }
|
||||
|
@ -186,7 +186,7 @@ namespace Opm
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
const int
|
||||
int
|
||||
WellInterface<TypeTag>::
|
||||
indexOfWell() const
|
||||
{
|
||||
@ -774,7 +774,7 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
WellInterface<TypeTag>::
|
||||
updateWellTestStatePhysical(const WellState& well_state,
|
||||
updateWellTestStatePhysical(const WellState& /* well_state */,
|
||||
const double simulation_time,
|
||||
const bool write_message_to_opmlog,
|
||||
WellTestState& well_test_state,
|
||||
|
@ -103,18 +103,18 @@ namespace Opm
|
||||
{
|
||||
template<class C2F, class FC, class NTG>
|
||||
void WellsManager::createWellsFromSpecs(std::vector<const Well*>& 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<double>& dz,
|
||||
std::vector<double>& /* dz */,
|
||||
std::vector<std::string>& well_names,
|
||||
std::vector<WellData>& well_data,
|
||||
std::map<std::string, int>& well_names_to_index,
|
||||
const PhaseUsage& phaseUsage,
|
||||
const std::map<int,int>& cartesian_to_compressed,
|
||||
const double* permeability,
|
||||
const NTG& ntg,
|
||||
const double* /* permeability */,
|
||||
const NTG& /* ntg */,
|
||||
std::vector<int>& wells_on_proc,
|
||||
const std::unordered_set<std::string>& ignored_wells)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user