From 1794934f0d83f5e9cf0b55218480dce4cbb8bc45 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 27 Jun 2022 14:47:04 +0200 Subject: [PATCH 1/3] anonymize unused parameters --- opm/simulators/flow/BlackoilModelEbos.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index 3eb5a1fb3..d2706f766 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -1114,7 +1114,7 @@ namespace Opm { template typename std::enable_if::value, bool>::type - isNumericalAquiferCell(const G& grid, const T& elem) + isNumericalAquiferCell(const G&, const T&) { return false; } From 9751b789926c73df741b7556ebcfaf7fe017e12b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 27 Jun 2022 14:47:23 +0200 Subject: [PATCH 2/3] fixed: add virtual dtor to class with virtual members --- opm/simulators/linalg/bda/opencl/Preconditioner.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opm/simulators/linalg/bda/opencl/Preconditioner.hpp b/opm/simulators/linalg/bda/opencl/Preconditioner.hpp index f0af75d25..8c3c1da21 100644 --- a/opm/simulators/linalg/bda/opencl/Preconditioner.hpp +++ b/opm/simulators/linalg/bda/opencl/Preconditioner.hpp @@ -60,6 +60,8 @@ public: static std::unique_ptr create(PreconditionerType type, int verbosity, ILUReorder opencl_ilu_reorder); + virtual ~Preconditioner() = default; + // nested Preconditioners might need to override this virtual void setOpencl(std::shared_ptr& context, std::shared_ptr& queue); From 133856b94381eb4523df729dbb1c1429b0068b1e Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 27 Jun 2022 14:47:56 +0200 Subject: [PATCH 3/3] changed: avoid lambda capture clang warns it's not necessary to use a capture for this. i opted to make it constexpr and avoid the capture with gcc as well. --- opm/simulators/wells/BlackoilWellModelGeneric.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.cpp b/opm/simulators/wells/BlackoilWellModelGeneric.cpp index 011547eb4..294f4834d 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.cpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.cpp @@ -2390,14 +2390,14 @@ guideRateUpdateIsNeeded(const int reportStepIdx) const { }); if (!need_update && this->report_step_starts_) { const auto& events = this->schedule()[reportStepIdx].wellgroup_events(); - const auto effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE + constexpr auto effective_events_mask = ScheduleEvents::WELL_STATUS_CHANGE + ScheduleEvents::INJECTION_TYPE_CHANGED + ScheduleEvents::WELL_SWITCHED_INJECTOR_PRODUCER + ScheduleEvents::NEW_WELL; need_update = std::any_of(this->well_container_generic_.begin(), this->well_container_generic_.end(), - [&events, effective_events_mask](const WellInterfaceGeneric* well) + [&events](const WellInterfaceGeneric* well) { return events.hasEvent(well->name(), effective_events_mask); });