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 {
65struct MetisParams {
static constexpr auto value =
"default"; };
67#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
78struct AddCorners {
static constexpr bool value =
false; };
95namespace Action {
class State; }
109 using ParallelWellStruct = std::vector<std::pair<std::string,bool>>;
113 std::unique_ptr<UDQState> udqState_;
114 std::unique_ptr<Action::State> actionState_;
115 std::unique_ptr<SummaryState> summaryState_;
116 std::unique_ptr<WellTestState> wtestState_;
117 std::shared_ptr<EclipseState> eclState_;
118 std::shared_ptr<Schedule> eclSchedule_;
119 std::shared_ptr<SummaryConfig> eclSummaryConfig_;
151 {
return setupTime_; }
168 {
return *eclState_; }
171 {
return *eclState_; }
177 {
return *eclSchedule_; }
180 {
return *eclSchedule_; }
187 {
return *eclSummaryConfig_; }
197 {
return *summaryState_; }
200 {
return *summaryState_; }
208 {
return *actionState_; }
211 {
return *actionState_; }
219 {
return *udqState_; }
222 {
return *udqState_; }
224 std::unique_ptr<WellTestState> transferWTestState() {
225 return std::move(this->wtestState_);
236 {
return caseName_; }
242 {
return edgeWeightsMethod_; }
249#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
250 return numJacobiBlocks_;
260 {
return ownersFirst_; }
289 OpmLog::info(
"The parameter --zoltan-imbalance-tol is deprecated "
290 "and has been renamed to --imbalance-tol, please "
291 "adjust your calls and scripts!");
308 {
return enableDistributedWells_; }
315 {
return enableEclOutput_; }
329 { comm_ = std::move(
comm); }
332 static Parallel::Communication&
comm()
340 template<
class Serializer>
347 void updateOutputDir_(std::string outputDir,
352 bool drsdtconEnabled()
const;
354 std::unordered_map<std::size_t, const NumericalAquiferCell*> allAquiferCells()
const;
358 template<
class Scalar>
359 static void registerParameters_();
364 static std::unique_ptr<Parallel::Communication> comm_;
366 std::string caseName_;
367 std::string fileName_;
368 Dune::EdgeWeightMethod edgeWeightsMethod_;
370#if HAVE_OPENCL || HAVE_ROCSPARSE || HAVE_CUDA
371 int numJacobiBlocks_{0};
393 bool enableDistributedWells_;
394 bool enableEclOutput_;
395 bool allow_splitting_inactive_wells_;
397 std::string ignoredKeywords_;
398 std::optional<int> outputInterval_;
399 bool useMultisegmentWell_;
400 bool enableExperiments_;
402 std::unique_ptr<SummaryState> summaryState_;
403 std::unique_ptr<UDQState> udqState_;
404 std::unique_ptr<Action::State> actionState_;
410 std::unique_ptr<WellTestState> wtestState_;
414 std::shared_ptr<Python> python;
416 std::shared_ptr<EclipseState> eclState_;
417 std::shared_ptr<Schedule> eclSchedule_;
418 std::shared_ptr<SummaryConfig> eclSummaryConfig_;
Definition FlowGenericVanguard.hpp:107
static Parallel::Communication & comm()
Obtain global communicator.
Definition FlowGenericVanguard.hpp:332
int numJacobiBlocks() const
Number of blocks in the Block-Jacobi preconditioner.
Definition FlowGenericVanguard.hpp:247
const Schedule & schedule() const
Return a reference to the object that managages the ECL schedule.
Definition FlowGenericVanguard.hpp:176
double setupTime()
Returns the wall time required to set up the simulator before it was born.
Definition FlowGenericVanguard.hpp:150
static void readDeck(const std::string &filename)
Read a deck.
Definition FlowGenericVanguard.cpp:174
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:186
ParallelWellStruct parallelWells_
Information about wells in parallel.
Definition FlowGenericVanguard.hpp:425
static void setCommunication(std::unique_ptr< Opm::Parallel::Communication > comm)
Set global communication.
Definition FlowGenericVanguard.hpp:328
bool enableDistributedWells() const
Whether perforations of a well might be distributed.
Definition FlowGenericVanguard.hpp:307
static std::string canonicalDeckPath(const std::string &caseName)
Returns the canonical path to a deck file.
Definition FlowGenericVanguard.cpp:191
~FlowGenericVanguard()
Destructor.
Action::State & actionState()
Returns the action state.
Definition FlowGenericVanguard.hpp:207
const EclipseState & eclState() const
Return a reference to the internalized ECL deck.
Definition FlowGenericVanguard.hpp:167
FlowGenericVanguard()
Constructor.
Definition FlowGenericVanguard.cpp:103
void defineSimulationModel(SimulationModelParams &¶ms)
Set the simulation configuration objects.
Definition FlowGenericVanguard.cpp:162
bool enableEclOutput() const
Whether or not to emit result files that are compatible with a commercial reservoir simulator.
Definition FlowGenericVanguard.hpp:314
const std::string & caseName() const
Returns the name of the case.
Definition FlowGenericVanguard.hpp:235
bool ownersFirst() const
Parameter that decide if cells owned by rank are ordered before ghost cells.
Definition FlowGenericVanguard.hpp:259
Dune::EdgeWeightMethod edgeWeightsMethod() const
Parameter deciding the edge-weight strategy of the load balancer.
Definition FlowGenericVanguard.hpp:241
UDQState & udqState()
Returns the udq state.
Definition FlowGenericVanguard.hpp:218
const ParallelWellStruct & parallelWells() const
Retrieve collection (a vector of pairs) of well names and whether or not the corresponding well objec...
Definition FlowGenericVanguard.hpp:324
SummaryState & summaryState()
Returns the summary state.
Definition FlowGenericVanguard.hpp:196
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:111
Definition FlowGenericVanguard.hpp:73
Definition FlowGenericVanguard.hpp:78
Definition FlowGenericVanguard.hpp:50
Definition FlowGenericVanguard.hpp:51
Definition FlowGenericVanguard.hpp:53
Definition FlowGenericVanguard.hpp:54
Definition FlowGenericVanguard.hpp:55
Definition FlowGenericVanguard.hpp:56
Definition FlowGenericVanguard.hpp:57
Definition FlowGenericVanguard.hpp:58
Definition FlowGenericVanguard.hpp:63
Definition FlowGenericVanguard.hpp:61
Definition FlowGenericVanguard.hpp:65
Definition FlowGenericVanguard.hpp:79
Definition FlowGenericVanguard.hpp:71
Definition FlowGenericVanguard.hpp:72
0: simple, 1: Zoltan, 2: METIS, 3: Zoltan with a all cells of a well represented by one vertex in the...
Definition FlowGenericVanguard.hpp:77
Definition FlowGenericVanguard.hpp:81
Definition FlowGenericVanguard.hpp:82
Definition FlowGenericVanguard.hpp:85
Definition FlowGenericVanguard.hpp:89
Definition FlowGenericVanguard.hpp:87