My Project
Loading...
Searching...
No Matches
Main.hpp
1/*
2 Copyright 2013, 2014, 2015 SINTEF ICT, Applied Mathematics.
3 Copyright 2014 Dr. Blatt - HPC-Simulation-Software & Services
4 Copyright 2015 IRIS AS
5 Copyright 2014 STATOIL ASA.
6 Copyright 2023 Inria
7
8 This file is part of the Open Porous Media project (OPM).
9
10 OPM is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 OPM is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with OPM. If not, see <http://www.gnu.org/licenses/>.
22*/
23#ifndef OPM_MAIN_HEADER_INCLUDED
24#define OPM_MAIN_HEADER_INCLUDED
25
26#include <flow/flow_blackoil.hpp>
27#include <flow/flow_blackoil_legacyassembly.hpp>
28
29#include <flow/flow_gasoil.hpp>
30#include <flow/flow_gasoildiffuse.hpp>
31#include <flow/flow_gasoil_energy.hpp>
32#include <flow/flow_oilwater.hpp>
33#include <flow/flow_gaswater.hpp>
34#include <flow/flow_gaswater_solvent.hpp>
35#include <flow/flow_solvent.hpp>
36#include <flow/flow_solvent_foam.hpp>
37#include <flow/flow_polymer.hpp>
38#include <flow/flow_extbo.hpp>
39#include <flow/flow_foam.hpp>
40#include <flow/flow_brine.hpp>
41#include <flow/flow_brine_saltprecipitation.hpp>
42#include <flow/flow_gaswater_saltprec_vapwat.hpp>
43#include <flow/flow_gaswater_saltprec_energy.hpp>
44#include <flow/flow_brine_precsalt_vapwat.hpp>
45#include <flow/flow_onephase.hpp>
46#include <flow/flow_onephase_energy.hpp>
47#include <flow/flow_oilwater_brine.hpp>
48#include <flow/flow_gaswater_brine.hpp>
49#include <flow/flow_gaswater_energy.hpp>
50#include <flow/flow_gaswater_dissolution.hpp>
51#include <flow/flow_gaswater_dissolution_diffuse.hpp>
52#include <flow/flow_energy.hpp>
53#include <flow/flow_oilwater_polymer.hpp>
54#include <flow/flow_oilwater_polymer_injectivity.hpp>
55#include <flow/flow_micp.hpp>
56
57#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
58
61
62#include <opm/simulators/flow/Banners.hpp>
63#include <opm/simulators/flow/FlowMain.hpp>
64
65#if HAVE_DUNE_FEM
66#include <dune/fem/misc/mpimanager.hh>
67#else
68#include <dune/common/parallel/mpihelper.hh>
69#endif
70
71#if HAVE_MPI
72#include <opm/simulators/utils/ParallelEclipseState.hpp>
73#endif
74
75#if HAVE_DAMARIS
76#include <opm/simulators/utils/DamarisKeywords.hpp>
77#endif
78
79#include <cassert>
80#include <charconv>
81#include <cstdlib>
82#include <filesystem>
83#include <iostream>
84#include <memory>
85#include <stdexcept>
86#include <string>
87#include <string_view>
88#include <type_traits>
89#include <utility>
90
91namespace Opm::Properties {
92
93// this is a dummy type tag that is used to setup the parameters before the actual
94// simulator.
95namespace TTag {
97 using InheritsFrom = std::tuple<FlowProblem>;
98};
99}
100
101} // namespace Opm::Properties
102
103namespace Opm {
104
105namespace Action { class State; }
106class UDQState;
107class WellTestState;
108
109// ----------------- Main program -----------------
110template <class TypeTag>
111int flowMain(int argc, char** argv, bool outputCout, bool outputFiles)
112{
113 // we always want to use the default locale, and thus spare us the trouble
114 // with incorrect locale settings.
115 resetLocale();
116
118 return mainfunc.execute();
119}
120
121// ----------------- Main class -----------------
122// For now, we will either be instantiated from main() in flow.cpp,
123// or from a Python pybind11 module..
124// NOTE (March 2020): When used from a pybind11 module, we do not neccessarily
125// want to run the whole simulation by calling run(), it is also
126// useful to just run one report step at a time. According to these different
127// usage scenarios, we refactored the original run() in flow.cpp into this class.
128class Main
129{
130public:
131 Main(int argc, char** argv, bool ownMPI = true);
132
133 // This constructor can be called from Python
134 Main(const std::string& filename, bool mpi_init = true, bool mpi_finalize = true);
135
136 // This constructor can be called from Python when Python has
137 // already parsed a deck
138 Main(const std::string& filename,
139 std::shared_ptr<EclipseState> eclipseState,
140 std::shared_ptr<Schedule> schedule,
141 std::shared_ptr<SummaryConfig> summaryConfig,
142 bool mpi_init = true,
143 bool mpi_finalize = true);
144
145 ~Main();
146
147 void setArgvArgc_(const std::string& filename);
148
149 void initMPI();
150
151 int runDynamic()
152 {
155 Parameters::reset();
156 if (isSimulationRank_) {
157 return this->dispatchDynamic_();
158 }
159 }
160
161 return exitCode;
162 }
163
164 template <class TypeTag>
165 int runStatic()
166 {
169 if (isSimulationRank_) {
170 return this->dispatchStatic_<TypeTag>();
171 }
172 }
173
174 return exitCode;
175 }
176
179 {
182 return exitCode;
183 }
184
185private:
186 int dispatchDynamic_()
187 {
188 const auto& rspec = this->eclipseState_->runspec();
189 const auto& phases = rspec.phases();
190
191 this->setupVanguard();
192
193 // run the actual simulator
194 //
195 // TODO: make sure that no illegal combinations like thermal and
196 // twophase are requested.
197 const bool thermal = eclipseState_->getSimulationConfig().isThermal();
198
199 // Single-phase case
200 if (rspec.micp()) {
201 return this->runMICP(phases);
202 }
203
204 // water-only case
205 else if (phases.size() == 1 && phases.active(Phase::WATER) && !thermal) {
206 return this->runWaterOnly(phases);
207 }
208
209 // water-only case with energy
210 else if (phases.size() == 2 && phases.active(Phase::WATER) && thermal) {
211 return this->runWaterOnlyEnergy(phases);
212 }
213
214 // Twophase cases
215 else if (phases.size() == 2 && !thermal) {
216 return this->runTwoPhase(phases);
217 }
218
219 // Polymer case
220 else if (phases.active(Phase::POLYMER)) {
221 return this->runPolymer(phases);
222 }
223
224 // Foam case
225 else if (phases.active(Phase::FOAM) && !phases.active(Phase::SOLVENT)) {
226 return this->runFoam();
227 }
228
229 // Solvent case
230 else if (phases.active(Phase::SOLVENT)) {
231 return this->runSolvent(phases);
232 }
233
234 // Brine case
235 else if (phases.active(Phase::BRINE) && !thermal) {
236 return this->runBrine(phases);
237 }
238
239 // Extended BO case
240 else if (phases.active(Phase::ZFRACTION)) {
241 return this->runExtendedBlackOil();
242 }
243
244 // Energy case
245 else if (thermal) {
246 return this->runThermal(phases);
247 }
248
249 // Blackoil case
250 else if (phases.size() == 3) {
251 return this->runBlackOil();
252 }
253
254 else {
255 if (outputCout_) {
256 std::cerr << "No suitable configuration found, valid are "
257 << "Twophase, polymer, foam, brine, solvent, "
258 << "energy, and blackoil.\n";
259 }
260
261 return EXIT_FAILURE;
262 }
263 }
264
265 template <class TypeTag>
266 int dispatchStatic_()
267 {
268 this->setupVanguard();
269 return flowMain<TypeTag>(argc_, argv_, outputCout_, outputFiles_);
270 }
271
272protected:
280 template <class TypeTagEarlyBird>
281 bool initialize_(int& exitCode, bool keepKeywords = false)
282 {
283 Dune::Timer externalSetupTimer;
284 externalSetupTimer.start();
285
286 handleVersionCmdLine_(argc_, argv_, Opm::moduleVersionName());
287
288 // we always want to use the default locale, and thus spare us the trouble
289 // with incorrect locale settings.
290 resetLocale();
291
292 // this is a work-around for a catch 22: we do not know what code path to use without
293 // parsing the deck, but we don't know the deck without having access to the
294 // parameters and this requires to know the type tag to be used. To solve this, we
295 // use a type tag just for parsing the parameters before we instantiate the actual
296 // simulator object. (Which parses the parameters again, but since this is done in an
297 // identical manner it does not matter.)
300
301 PreProblem::setBriefDescription("Flow, an advanced reservoir simulator for ECL-decks provided by the Open Porous Media project.");
303 if (status != 0) {
304 // if setupParameters_ returns a value smaller than 0, there was no error, but
305 // the program should abort. This is the case e.g. for the --help and the
306 // --print-properties parameters.
307#if HAVE_MPI
308 if (status >= 0)
309 MPI_Abort(MPI_COMM_WORLD, status);
310#endif
311 exitCode = (status > 0) ? status : EXIT_SUCCESS;
312 return false; // Whether to run the simulator
313 }
314
315 std::string deckFilename;
316 std::string outputDir;
317 if ( eclipseState_ ) {
318 deckFilename = eclipseState_->getIOConfig().fullBasePath();
319 outputDir = eclipseState_->getIOConfig().getOutputDir();
320 }
321 else {
322 deckFilename = Parameters::Get<Parameters::EclDeckFileName>();
323 outputDir = Parameters::Get<Parameters::OutputDir>();
324 }
325
326#if HAVE_DAMARIS
327 enableDamarisOutput_ = Parameters::Get<Parameters::EnableDamarisOutput>();
328
329 // Reset to false as we cannot use Damaris if there is only one rank.
330 if ((enableDamarisOutput_ == true) && (FlowGenericVanguard::comm().size() == 1)) {
331 std::string msg ;
332 msg = "\nUse of Damaris (command line argument --enable-damaris-output=true) has been disabled for run with only one rank.\n" ;
333 OpmLog::warning(msg);
334 enableDamarisOutput_ = false ;
335 }
336
337 if (enableDamarisOutput_) {
338 // Deal with empty (defaulted) output dir, should be deck dir
339 auto damarisOutputDir = outputDir;
340 if (outputDir.empty()) {
341 auto odir = std::filesystem::path{deckFilename}.parent_path();
342 if (odir.empty()) {
343 damarisOutputDir = ".";
344 } else {
345 damarisOutputDir = odir.generic_string();
346 }
347 }
348 // Damaris server ranks will block here until damaris_stop() is called by client ranks
350 }
351#endif // HAVE_DAMARIS
352
353 // Guard for when the Damaris core(s) return from damaris_start()
354 // which happens when damaris_stop() is called in main simulation
355 if (!isSimulationRank_) {
357 return true;
358 }
359
360 int mpiRank = FlowGenericVanguard::comm().rank();
361 outputCout_ = false;
362 if (mpiRank == 0)
363 outputCout_ = Parameters::Get<Parameters::EnableTerminalOutput>();
364
365 if (deckFilename.empty()) {
366 if (mpiRank == 0) {
367 std::cerr << "No input case given. Try '--help' for a usage description.\n";
368 }
370 return false;
371 }
372
374 try {
375 deckFilename = PreVanguard::canonicalDeckPath(deckFilename);
376 }
377 catch (const std::exception& e) {
378 if ( mpiRank == 0 ) {
379 std::cerr << "Exception received: " << e.what() << ". Try '--help' for a usage description.\n";
380 }
381#if HAVE_MPI
383#endif
385 return false;
386 }
387
388 std::string cmdline_params;
389 if (outputCout_) {
390 printFlowBanner(FlowGenericVanguard::comm().size(),
391 getNumThreads(),
393 std::ostringstream str;
394 Parameters::printValues(str);
395 cmdline_params = str.str();
396 }
397
398 // Create Deck and EclipseState.
399 try {
400 this->readDeck(deckFilename,
401 outputDir,
402 Parameters::Get<Parameters::OutputMode>(),
403 !Parameters::Get<Parameters::SchedRestart>(),
404 Parameters::Get<Parameters::EnableLoggingFalloutWarning>(),
405 Parameters::Get<Parameters::ParsingStrictness>(),
406 Parameters::Get<Parameters::ActionParsingStrictness>(),
407 Parameters::Get<Parameters::InputSkipMode>(),
409 getNumThreads(),
410 Parameters::Get<Parameters::EclOutputInterval>(),
414 setupTime_ = externalSetupTimer.elapsed();
415 }
416 catch (const std::invalid_argument& e)
417 {
418 if (outputCout_) {
419 std::cerr << "Failed to create valid EclipseState object." << std::endl;
420 std::cerr << "Exception caught: " << e.what() << std::endl;
421 }
422#if HAVE_MPI
424#endif
426 return false;
427 }
428
430 return true;
431 }
432
433 void setupVanguard();
434
435private:
436 // This function is an extreme special case, if the program has been invoked
437 // *exactly* as:
438 //
439 // flow --version
440 //
441 // the call is intercepted by this function which will print "flow $version"
442 // on stdout and exit(0).
443 void handleVersionCmdLine_(int argc, char** argv,
444 std::string_view moduleVersionName);
445
446 // This function is a special case, if the program has been invoked
447 // with the argument "--test-split-communicator=true" as the FIRST
448 // argument, it will be removed from the argument list and we set the
449 // test_split_comm_ flag to true.
450 // Note: initializing the parameter system before MPI could make this
451 // use the parameter system instead.
452 void handleTestSplitCommunicatorCmdLine_();
453
454 int runMICP(const Phases& phases)
455 {
456 if (!phases.active(Phase::WATER) || (phases.size() > 2)) {
457 if (outputCout_) {
458 std::cerr << "No valid configuration is found for MICP simulation, "
459 << "the only valid option is water + MICP\n";
460 }
461
462 return EXIT_FAILURE;
463 }
464
465 return flowMICPMain(this->argc_,
466 this->argv_,
467 this->outputCout_,
468 this->outputFiles_);
469 }
470
471 int runTwoPhase(const Phases& phases)
472 {
473 const bool diffusive = eclipseState_->getSimulationConfig().isDiffusive();
474 const bool disgasw = eclipseState_->getSimulationConfig().hasDISGASW();
475 const bool vapwat = eclipseState_->getSimulationConfig().hasVAPWAT();
476
477 // oil-gas
478 if (phases.active( Phase::OIL ) && phases.active( Phase::GAS )) {
479 if (diffusive) {
480 return flowGasOilDiffuseMain(argc_, argv_, outputCout_, outputFiles_);
481 } else {
482 return flowGasOilMain(argc_, argv_, outputCout_, outputFiles_);
483 }
484 }
485
486 // oil-water
487 else if ( phases.active( Phase::OIL ) && phases.active( Phase::WATER ) ) {
488 if (diffusive) {
489 if (outputCout_) {
490 std::cerr << "The DIFFUSE option is not available for the two-phase water/oil model." << std::endl;
491 }
492 return EXIT_FAILURE;
493 }
494 return flowOilWaterMain(argc_, argv_, outputCout_, outputFiles_);
495 }
496
497 // gas-water
498 else if ( phases.active( Phase::GAS ) && phases.active( Phase::WATER ) ) {
499 if (disgasw || vapwat) {
500 if (diffusive) {
501 return flowGasWaterDissolutionDiffuseMain(argc_, argv_, outputCout_, outputFiles_);
502 }
503 return flowGasWaterDissolutionMain(argc_, argv_, outputCout_, outputFiles_);
504 }
505 if (diffusive) {
506 if (outputCout_) {
507 std::cerr << "The DIFFUSE option is not available for the two-phase gas/water model without disgasw or vapwat." << std::endl;
508 }
509 return EXIT_FAILURE;
510 }
511
512 return flowGasWaterMain(argc_, argv_, outputCout_, outputFiles_);
513 }
514 else {
515 if (outputCout_) {
516 std::cerr << "No suitable configuration found, valid are Twophase (oilwater, oilgas and gaswater), polymer, solvent, or blackoil" << std::endl;
517 }
518
519 return EXIT_FAILURE;
520 }
521 }
522
523 int runPolymer(const Phases& phases)
524 {
525 if (! phases.active(Phase::WATER)) {
526 if (outputCout_)
527 std::cerr << "No valid configuration is found for polymer simulation, valid options include "
528 << "oilwater + polymer and blackoil + polymer" << std::endl;
529
530 return EXIT_FAILURE;
531 }
532
533 // Need to track the polymer molecular weight
534 // for the injectivity study
535 if (phases.active(Phase::POLYMW)) {
536 // only oil water two phase for now
537 assert (phases.size() == 4);
538 return flowOilWaterPolymerInjectivityMain(argc_, argv_, outputCout_, outputFiles_);
539 }
540
541 if (phases.size() == 3) { // oil water polymer case
542 return flowOilWaterPolymerMain(argc_, argv_, outputCout_, outputFiles_);
543 }
544 else {
545 return flowPolymerMain(argc_, argv_, outputCout_, outputFiles_);
546 }
547 }
548
549 int runFoam()
550 {
551 return flowFoamMain(argc_, argv_, outputCout_, outputFiles_);
552 }
553
554 int runWaterOnly(const Phases& phases)
555 {
556 if (!phases.active(Phase::WATER) || phases.size() != 1) {
557 if (outputCout_)
558 std::cerr << "No valid configuration is found for water-only simulation, valid options include "
559 << "water, water + thermal" << std::endl;
560
561 return EXIT_FAILURE;
562 }
563
564 return flowWaterOnlyMain(argc_, argv_, outputCout_, outputFiles_);
565 }
566
567 int runWaterOnlyEnergy(const Phases& phases)
568 {
569 if (!phases.active(Phase::WATER) || phases.size() != 2) {
570 if (outputCout_)
571 std::cerr << "No valid configuration is found for water-only simulation, valid options include "
572 << "water, water + thermal" << std::endl;
573
574 return EXIT_FAILURE;
575 }
576
577 return flowWaterOnlyEnergyMain(argc_, argv_, outputCout_, outputFiles_);
578 }
579
580 int runBrine(const Phases& phases)
581 {
582 if (! phases.active(Phase::WATER) || phases.size() == 2) {
583 if (outputCout_)
584 std::cerr << "No valid configuration is found for brine simulation, valid options include "
585 << "oilwater + brine, gaswater + brine and blackoil + brine" << std::endl;
586
587 return EXIT_FAILURE;
588 }
589
590 if (phases.size() == 3) {
591
592 if (phases.active(Phase::OIL)){ // oil water brine case
593 return flowOilWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
594 }
595 if (phases.active(Phase::GAS)){ // gas water brine case
596 if (eclipseState_->getSimulationConfig().hasPRECSALT() &&
597 eclipseState_->getSimulationConfig().hasVAPWAT()) {
598 //case with water vaporization into gas phase and salt precipitation
599 return flowGasWaterSaltprecVapwatMain(argc_, argv_, outputCout_, outputFiles_);
600 }
601 else {
602 return flowGasWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
603 }
604 }
605 }
606 else if (eclipseState_->getSimulationConfig().hasPRECSALT()) {
607 if (eclipseState_->getSimulationConfig().hasVAPWAT()) {
608 //case with water vaporization into gas phase and salt precipitation
609 return flowBrinePrecsaltVapwatMain(argc_, argv_, outputCout_, outputFiles_);
610 }
611 else {
612 return flowBrineSaltPrecipitationMain(argc_, argv_, outputCout_, outputFiles_);
613 }
614 }
615 else {
616 return flowBrineMain(argc_, argv_, outputCout_, outputFiles_);
617 }
618
619 return EXIT_FAILURE;
620 }
621
622 int runSolvent(const Phases& phases)
623 {
624 if (phases.active(Phase::FOAM)) {
625 return flowSolventFoamMain(argc_, argv_, outputCout_, outputFiles_);
626 }
627 // solvent + gas + water
628 if (!phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
629 return flowGasWaterSolventMain(argc_, argv_, outputCout_, outputFiles_);
630 }
631
632 // solvent + gas + water + oil
633 if (phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
634 return flowSolventMain(argc_, argv_, outputCout_, outputFiles_);
635 }
636
637 if (outputCout_)
638 std::cerr << "No valid configuration is found for solvent simulation, valid options include "
639 << "gas + water + solvent and gas + oil + water + solvent" << std::endl;
640
641 return EXIT_FAILURE;
642 }
643
644 int runExtendedBlackOil()
645 {
646 return flowExtboMain(argc_, argv_, outputCout_, outputFiles_);
647 }
648
649 int runThermal(const Phases& phases)
650 {
651 // oil-gas-thermal
652 if (!phases.active( Phase::WATER ) && phases.active( Phase::OIL ) && phases.active( Phase::GAS )) {
653 return flowGasOilEnergyMain(argc_, argv_, outputCout_, outputFiles_);
654 }
655
656 // water-gas-thermal
657 if (!phases.active( Phase::OIL ) && phases.active( Phase::WATER ) && phases.active( Phase::GAS )) {
658
659 if (phases.active(Phase::BRINE)){
660 return flowGasWaterSaltprecEnergyMain(argc_, argv_, outputCout_, outputFiles_);
661 }
662 return flowGasWaterEnergyMain(argc_, argv_, outputCout_, outputFiles_);
663 }
664
665 return flowEnergyMain(argc_, argv_, outputCout_, outputFiles_);
666 }
667
668 int runBlackOil()
669 {
670 const bool diffusive = eclipseState_->getSimulationConfig().isDiffusive();
671 if (diffusive) {
672 // Use the traditional linearizer, as the TpfaLinearizer does not
673 // support the diffusion module yet.
674 return flowBlackoilMain(argc_, argv_, outputCout_, outputFiles_);
675 } else {
676 return flowBlackoilTpfaMain(argc_, argv_, outputCout_, outputFiles_);
677 }
678 }
679
680 void readDeck(const std::string& deckFilename,
681 const std::string& outputDir,
682 const std::string& outputMode,
683 const bool init_from_restart_file,
684 const bool allRanksDbgPrtLog,
685 const std::string& parsingStrictness,
686 const std::string& actionParsingStrictness,
687 const std::string& inputSkipMode,
688 const bool keepKeywords,
689 const std::size_t numThreads,
690 const int output_param,
691 const std::string& parameters,
692 std::string_view moduleVersion,
693 std::string_view compileTimestamp);
694
695 static int getNumThreads()
696 {
697
698 int threads;
699
700#ifdef _OPENMP
701 // This function is called before the parallel OpenMP stuff gets initialized.
702 // That initialization happens after the deck is read and we want this message.
703 // Hence we duplicate the code of setupParallelism to get the number of threads.
704 static bool first_time = true;
705 constexpr int default_threads = 2;
706 const int requested_threads = Parameters::Get<Parameters::ThreadsPerProcess>();
708
709 const char* env_var = getenv("OMP_NUM_THREADS");
710 if (env_var) {
711 int omp_num_threads = -1;
712 auto result = std::from_chars(env_var, env_var + std::strlen(env_var), omp_num_threads);
713 const bool can_output = first_time && FlowGenericVanguard::comm().rank() == 0;
714 if (result.ec == std::errc() && omp_num_threads > 0) {
715 // Set threads to omp_num_threads if it was successfully parsed and is positive
717 if (can_output && requested_threads > 0) {
718 std::cout << "Warning: Environment variable OMP_NUM_THREADS takes precedence over the --threads-per-process cmdline argument."
719 << std::endl;
720 }
721 } else {
722 if (can_output) {
723 std::cout << ("Warning: Invalid value for OMP_NUM_THREADS environment variable.") << std::endl;
724 }
725 }
726 }
727
728 first_time = false;
729#else
730 threads = 1;
731#endif
732 return threads;
733 }
734
735#if HAVE_DAMARIS
736 void setupDamaris(const std::string& outputDir);
737#endif
738
739protected:
740 int argc_{0};
741 char** argv_{nullptr};
742 bool outputCout_{false};
743 bool outputFiles_{false};
744
745private:
746 bool ownMPI_{true};
747 double setupTime_{0.0};
748 std::string deckFilename_{};
749 std::string flowProgName_{};
750 char *saveArgs_[3]{nullptr};
751 std::unique_ptr<UDQState> udqState_{};
752 std::unique_ptr<Action::State> actionState_{};
753 std::unique_ptr<WellTestState> wtestState_{};
754
755 // These variables may be owned by both Python and the simulator
756 std::shared_ptr<EclipseState> eclipseState_{};
757 std::shared_ptr<Schedule> schedule_{};
758 std::shared_ptr<SummaryConfig> summaryConfig_{};
759 bool mpi_init_{true};
760 bool mpi_finalize_{true};
761
762 // To demonstrate run with non_world_comm
763 bool test_split_comm_ = false;
764 bool isSimulationRank_ = true;
765#if HAVE_DAMARIS
766 bool enableDamarisOutput_ = false;
767#endif
768};
769
770} // namespace Opm
771
772#endif // OPM_MAIN_HEADER_INCLUDED
static Parallel::Communication & comm()
Obtain global communicator.
Definition FlowGenericVanguard.hpp:306
Definition FlowMain.hpp:65
Definition Main.hpp:129
int justInitialize()
Used for test_outputdir.
Definition Main.hpp:178
bool initialize_(int &exitCode, bool keepKeywords=false)
Initialize.
Definition Main.hpp:281
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
std::string moduleVersionName()
Return the version name of the module, for example "2015.10" (for a release branch) or "2016....
Definition moduleVersion.cpp:34
std::string compileTimestamp()
Return a string "dd-mm-yyyy at HH::MM::SS hrs" which is the time the binary was compiled.
Definition moduleVersion.cpp:57
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
std::string moduleVersion()
Return a string containing both the name and hash, if N is the name and H is the hash it will be "N (...
Definition moduleVersion.cpp:50
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:235
This file provides the infrastructure to retrieve run-time parameters.
The Opm property system, traits with inheritance.