keep a vector of WellInterfaceGeneric* in BlackoilWellModelGeneric

these points to the same objects as well_container_
This commit is contained in:
Arne Morten Kvarving
2021-06-07 12:15:36 +02:00
parent 059140f2ee
commit cf6a3801fb
2 changed files with 11 additions and 3 deletions

View File

@@ -36,10 +36,11 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp>
#include <opm/simulators/wells/PerforationData.hpp>
#include <opm/simulators/wells/WGState.hpp>
#include <opm/simulators/wells/WellProdIndexCalculator.hpp>
#include <opm/simulators/wells/ParallelWellInfo.hpp>
#include <opm/simulators/wells/PerforationData.hpp>
#include <opm/simulators/wells/WellInterfaceGeneric.hpp>
#include <opm/simulators/wells/WellProdIndexCalculator.hpp>
#include <opm/simulators/wells/WGState.hpp>
namespace Opm {
@@ -320,6 +321,9 @@ protected:
std::vector<std::vector<PerforationData>> well_perf_data_;
std::function<bool(const Well&)> not_on_process_{};
// a vector of all the wells.
std::vector<WellInterfaceGeneric*> well_container_generic_{};
std::vector<ParallelWellInfo> parallel_well_info_;
std::vector<ParallelWellInfo*> local_parallel_well_info_;

View File

@@ -751,6 +751,10 @@ namespace Opm {
global_deferredLogger.logMessages();
}
well_container_generic_.clear();
for (auto& w : well_container)
well_container_generic_.push_back(w.get());
return well_container;
}