My Project
readDeck.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 
7  This file is part of the Open Porous Media project (OPM).
8 
9  OPM is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OPM is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OPM. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef OPM_READDECK_HEADER_INCLUDED
23 #define OPM_READDECK_HEADER_INCLUDED
24 
25 #include <opm/simulators/utils/ParallelCommunication.hpp>
26 
27 #include <memory>
28 #include <optional>
29 #include <string>
30 
31 namespace Opm {
32  class Deck;
33  class EclipseState;
34  class ErrorGuard;
35  class ParseContext;
36  class Python;
37  class Schedule;
38  class SummaryConfig;
39  class UDQState;
40  class WellTestState;
41 } // end namespace Opm
42 
43 namespace Opm {
44 
45 namespace Action {
46 class State;
47 }
48 
49 enum class FileOutputMode {
51  OUTPUT_NONE = 0,
52 
54  OUTPUT_LOG_ONLY = 1,
55 
57  OUTPUT_ALL = 3,
58 };
59 
60 // Setup the OpmLog backends
62 setupLogging(int mpi_rank_,
63  const std::string& deck_filename,
64  const std::string& cmdline_output_dir,
65  const std::string& cmdline_output,
66  bool output_cout_,
67  const std::string& stdout_log_id,
68  const bool allRanksDbgLog);
69 
74 void readDeck(Parallel::Communication comm,
75  const std::string& deckFilename,
76  std::shared_ptr<Deck>& deck,
77  std::shared_ptr<EclipseState>& eclipseState,
78  std::shared_ptr<Schedule>& schedule,
79  std::unique_ptr<UDQState>& udqState,
80  std::unique_ptr<Action::State>& actionState,
81  std::unique_ptr<WellTestState>& wtestState,
82  std::shared_ptr<SummaryConfig>& summaryConfig,
83  std::unique_ptr<ErrorGuard> errorGuard,
84  std::shared_ptr<Python> python,
85  std::unique_ptr<ParseContext> parseContext,
86  bool initFromRestart,
87  bool checkDeck,
88  const std::optional<int>& outputInterval);
89 
90 void verifyValidCellGeometry(Parallel::Communication comm,
91  const EclipseState& eclipseState);
92 } // end namespace Opm
93 
94 #endif // OPM_READDECK_HEADER_INCLUDED
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
FileOutputMode
Definition: readDeck.hpp:49
@ OUTPUT_LOG_ONLY
Output only to log files, no ECLIPSE output.
@ OUTPUT_ALL
Output to all files.
@ OUTPUT_NONE
No file output.
void readDeck(Parallel::Communication comm, const std::string &deckFilename, std::shared_ptr< Deck > &deck, std::shared_ptr< EclipseState > &eclipseState, std::shared_ptr< Schedule > &schedule, std::unique_ptr< UDQState > &udqState, std::unique_ptr< Action::State > &actionState, std::unique_ptr< WellTestState > &wtestState, std::shared_ptr< SummaryConfig > &summaryConfig, std::unique_ptr< ErrorGuard > errorGuard, std::shared_ptr< Python > python, std::unique_ptr< ParseContext > parseContext, bool initFromRestart, bool checkDeck, const std::optional< int > &outputInterval)
Reads the deck and creates all necessary objects if needed.
Definition: readDeck.cpp:476