My Project
Loading...
Searching...
No Matches
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
31namespace Opm {
32 class EclipseState;
33 class ErrorGuard;
34 class ParseContext;
35 class Python;
36 class Schedule;
37 class SummaryConfig;
38 class UDQState;
39 class WellTestState;
40} // end namespace Opm
41
42namespace Opm {
43
44namespace Action {
45class State;
46}
47
48enum class FileOutputMode {
50 OUTPUT_NONE = 0,
51
54
56 OUTPUT_ALL = 3,
57};
58
59// Ensure that a directory exists, creating it if it does not.
60void
61ensureOutputDirExists(const std::string& cmdline_output_dir);
62
63std::unique_ptr<ParseContext> setupParseContext(const bool exitOnAllErrors);
64
65// Setup the OpmLog backends
67setupLogging(int mpi_rank_,
68 const std::string& deck_filename,
69 const std::string& cmdline_output_dir,
70 const std::string& cmdline_output,
71 bool output_cout_,
72 const std::string& stdout_log_id,
73 const bool allRanksDbgLog);
74
79void readDeck(Parallel::Communication comm,
80 const std::string& deckFilename,
81 std::shared_ptr<EclipseState>& eclipseState,
82 std::shared_ptr<Schedule>& schedule,
83 std::unique_ptr<UDQState>& udqState,
84 std::unique_ptr<Action::State>& actionState,
85 std::unique_ptr<WellTestState>& wtestState,
86 std::shared_ptr<SummaryConfig>& summaryConfig,
87 std::shared_ptr<Python> python,
88 const std::string& parsingStrictness,
89 bool initFromRestart,
90 bool checkDeck,
91 const std::optional<int>& outputInterval);
92
93void verifyValidCellGeometry(Parallel::Communication comm,
94 const EclipseState& eclipseState);
95} // end namespace Opm
96
97#endif // OPM_READDECK_HEADER_INCLUDED
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
void readDeck(Parallel::Communication comm, const std::string &deckFilename, 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::shared_ptr< Python > python, const std::string &parsingStrictness, bool initFromRestart, bool checkDeck, const std::optional< int > &outputInterval)
Reads the deck and creates all necessary objects if needed.
Definition readDeck.cpp:486
FileOutputMode
Definition readDeck.hpp:48
@ OUTPUT_LOG_ONLY
Output only to log files, no ECLIPSE output.
@ OUTPUT_ALL
Output to all files.
@ OUTPUT_NONE
No file output.