27#ifndef OPM_FLOW_GENERIC_VANGUARD_HPP
28#define OPM_FLOW_GENERIC_VANGUARD_HPP
30#include <dune/common/parallel/communication.hh>
32#include <opm/common/OpmLog/OpmLog.hpp>
34#include <opm/grid/common/GridEnums.hpp>
36#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
38#include <opm/simulators/utils/ParallelCommunication.hpp>
44#include <unordered_map>
48namespace Opm::Parameters {
62struct MetisParams {
static constexpr auto value =
"default"; };
64#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
87namespace Action {
class State; }
101 using ParallelWellStruct = std::vector<std::pair<std::string,bool>>;
105 std::unique_ptr<UDQState> udqState_;
106 std::unique_ptr<Action::State> actionState_;
107 std::unique_ptr<SummaryState> summaryState_;
108 std::unique_ptr<WellTestState> wtestState_;
109 std::shared_ptr<EclipseState> eclState_;
110 std::shared_ptr<Schedule> eclSchedule_;
111 std::shared_ptr<SummaryConfig> eclSummaryConfig_;
143 {
return setupTime_; }
160 {
return *eclState_; }
163 {
return *eclState_; }
169 {
return *eclSchedule_; }
172 {
return *eclSchedule_; }
179 {
return *eclSummaryConfig_; }
189 {
return *summaryState_; }
192 {
return *summaryState_; }
200 {
return *actionState_; }
203 {
return *actionState_; }
211 {
return *udqState_; }
214 {
return *udqState_; }
216 std::unique_ptr<WellTestState> transferWTestState() {
217 return std::move(this->wtestState_);
228 {
return caseName_; }
234 {
return edgeWeightsMethod_; }
241#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
242 return numJacobiBlocks_;
252 {
return ownersFirst_; }
273 OpmLog::info(
"The parameter --zoltan-imbalance-tol is deprecated and has been renamed to --imbalance-tol, please adjust your calls and scripts!");
290 {
return enableDistributedWells_; }
303 { comm_ = std::move(
comm); }
306 static Parallel::Communication&
comm()
314 template<
class Serializer>
321 void updateOutputDir_(std::string outputDir,
326 bool drsdtconEnabled()
const;
328 std::unordered_map<std::size_t, const NumericalAquiferCell*> allAquiferCells()
const;
332 template<
class Scalar>
333 static void registerParameters_();
338 static std::unique_ptr<Parallel::Communication> comm_;
340 std::string caseName_;
341 std::string fileName_;
342 Dune::EdgeWeightMethod edgeWeightsMethod_;
344#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
345 int numJacobiBlocks_{0};
362 bool enableDistributedWells_;
363 std::string ignoredKeywords_;
364 std::optional<int> outputInterval_;
365 bool useMultisegmentWell_;
366 bool enableExperiments_;
368 std::unique_ptr<SummaryState> summaryState_;
369 std::unique_ptr<UDQState> udqState_;
370 std::unique_ptr<Action::State> actionState_;
376 std::unique_ptr<WellTestState> wtestState_;
380 std::shared_ptr<Python> python;
382 std::shared_ptr<EclipseState> eclState_;
383 std::shared_ptr<Schedule> eclSchedule_;
384 std::shared_ptr<SummaryConfig> eclSummaryConfig_;
Definition FlowGenericVanguard.hpp:99
static Parallel::Communication & comm()
Obtain global communicator.
Definition FlowGenericVanguard.hpp:306
int numJacobiBlocks() const
Number of blocks in the Block-Jacobi preconditioner.
Definition FlowGenericVanguard.hpp:239
const Schedule & schedule() const
Return a reference to the object that managages the ECL schedule.
Definition FlowGenericVanguard.hpp:168
double setupTime()
Returns the wall time required to set up the simulator before it was born.
Definition FlowGenericVanguard.hpp:142
static void readDeck(const std::string &filename)
Read a deck.
Definition FlowGenericVanguard.cpp:139
const SummaryConfig & summaryConfig() const
Return a reference to the object that determines which quantities ought to be put into the ECL summar...
Definition FlowGenericVanguard.hpp:178
ParallelWellStruct parallelWells_
Information about wells in parallel.
Definition FlowGenericVanguard.hpp:391
static void setCommunication(std::unique_ptr< Opm::Parallel::Communication > comm)
Set global communication.
Definition FlowGenericVanguard.hpp:302
bool enableDistributedWells() const
Whether perforations of a well might be distributed.
Definition FlowGenericVanguard.hpp:289
static std::string canonicalDeckPath(const std::string &caseName)
Returns the canonical path to a deck file.
Definition FlowGenericVanguard.cpp:156
~FlowGenericVanguard()
Destructor.
Action::State & actionState()
Returns the action state.
Definition FlowGenericVanguard.hpp:199
const EclipseState & eclState() const
Return a reference to the internalized ECL deck.
Definition FlowGenericVanguard.hpp:159
FlowGenericVanguard()
Constructor.
Definition FlowGenericVanguard.cpp:101
void defineSimulationModel(SimulationModelParams &¶ms)
Set the simulation configuration objects.
Definition FlowGenericVanguard.cpp:127
const std::string & caseName() const
Returns the name of the case.
Definition FlowGenericVanguard.hpp:227
bool ownersFirst() const
Parameter that decide if cells owned by rank are ordered before ghost cells.
Definition FlowGenericVanguard.hpp:251
Dune::EdgeWeightMethod edgeWeightsMethod() const
Parameter deciding the edge-weight strategy of the load balancer.
Definition FlowGenericVanguard.hpp:233
UDQState & udqState()
Returns the udq state.
Definition FlowGenericVanguard.hpp:210
const ParallelWellStruct & parallelWells() const
Returns vector with name and whether the has local perforated cells for all wells.
Definition FlowGenericVanguard.hpp:298
SummaryState & summaryState()
Returns the summary state.
Definition FlowGenericVanguard.hpp:188
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
Definition FlowGenericVanguard.hpp:103
Definition FlowGenericVanguard.hpp:70
Definition FlowGenericVanguard.hpp:50
Definition FlowGenericVanguard.hpp:51
Definition FlowGenericVanguard.hpp:52
Definition FlowGenericVanguard.hpp:53
Definition FlowGenericVanguard.hpp:54
Definition FlowGenericVanguard.hpp:55
Definition FlowGenericVanguard.hpp:60
Definition FlowGenericVanguard.hpp:58
Definition FlowGenericVanguard.hpp:62
Definition FlowGenericVanguard.hpp:68
Definition FlowGenericVanguard.hpp:69
Definition FlowGenericVanguard.hpp:73
Definition FlowGenericVanguard.hpp:75
Definition FlowGenericVanguard.hpp:76
Definition FlowGenericVanguard.hpp:79
Definition FlowGenericVanguard.hpp:81