From da22efb6234a84f913868ace4ef81826cb2aa16d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 24 Jan 2025 14:35:52 +0100 Subject: [PATCH] BlackoilWellModelGeneric: move operator== to translation unit --- .../wells/BlackoilWellModelGeneric.cpp | 19 +++++++++++++++++++ .../wells/BlackoilWellModelGeneric.hpp | 18 ++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.cpp b/opm/simulators/wells/BlackoilWellModelGeneric.cpp index ec92e97fa..5324a7aa4 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.cpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.cpp @@ -2090,6 +2090,25 @@ reportGroupSwitching(DeferredLogger& local_deferredLogger) const } } +template +bool BlackoilWellModelGeneric:: +operator==(const BlackoilWellModelGeneric& rhs) const +{ + return this->initial_step_ == rhs.initial_step_ + && this->report_step_starts_ == rhs.report_step_starts_ + && this->last_run_wellpi_ == rhs.last_run_wellpi_ + && this->local_shut_wells_ == rhs.local_shut_wells_ + && this->closed_this_step_ == rhs.closed_this_step_ + && this->node_pressures_ == rhs.node_pressures_ + && this->prev_inj_multipliers_ == rhs.prev_inj_multipliers_ + && this->active_wgstate_ == rhs.active_wgstate_ + && this->last_valid_wgstate_ == rhs.last_valid_wgstate_ + && this->nupcol_wgstate_ == rhs.nupcol_wgstate_ + && this->switched_prod_groups_ == rhs.switched_prod_groups_ + && this->switched_inj_groups_ == rhs.switched_inj_groups_ + && this->closed_offending_wells_ == rhs.closed_offending_wells_; +} + template class BlackoilWellModelGeneric; #if FLOW_INSTANTIATE_FLOAT diff --git a/opm/simulators/wells/BlackoilWellModelGeneric.hpp b/opm/simulators/wells/BlackoilWellModelGeneric.hpp index 1eb7c4437..e490fcfd7 100644 --- a/opm/simulators/wells/BlackoilWellModelGeneric.hpp +++ b/opm/simulators/wells/BlackoilWellModelGeneric.hpp @@ -256,24 +256,10 @@ public: serializer(switched_prod_groups_); serializer(switched_inj_groups_); serializer(closed_offending_wells_); + serializer(gen_gaslift_); } - bool operator==(const BlackoilWellModelGeneric& rhs) const - { - return this->initial_step_ == rhs.initial_step_ && - this->report_step_starts_ == rhs.report_step_starts_ && - this->last_run_wellpi_ == rhs.last_run_wellpi_ && - this->local_shut_wells_ == rhs.local_shut_wells_ && - this->closed_this_step_ == rhs.closed_this_step_ && - this->node_pressures_ == rhs.node_pressures_ && - this->prev_inj_multipliers_ == rhs.prev_inj_multipliers_ && - this->active_wgstate_ == rhs.active_wgstate_ && - this->last_valid_wgstate_ == rhs.last_valid_wgstate_ && - this->nupcol_wgstate_ == rhs.nupcol_wgstate_ && - this->switched_prod_groups_ == rhs.switched_prod_groups_ && - this->switched_inj_groups_ == rhs.switched_inj_groups_ && - this->closed_offending_wells_ == rhs.closed_offending_wells_; - } + bool operator==(const BlackoilWellModelGeneric& rhs) const; const ParallelWellInfo& parallelWellInfo(const std::size_t idx) const