Loading...
Searching...
No Matches
readDeck.hpp
/*
Copyright 2013, 2014, 2015 SINTEF ICT, Applied Mathematics.
Copyright 2014 Dr. Blatt - HPC-Simulation-Software & Services
Copyright 2015 IRIS AS
Copyright 2014 STATOIL ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_READDECK_HEADER_INCLUDED
#define OPM_READDECK_HEADER_INCLUDED
#include <opm/simulators/utils/ParallelCommunication.hpp>
#include <filesystem>
#include <memory>
#include <optional>
#include <string>
namespace Opm {
class EclipseState;
class ErrorGuard;
class ParseContext;
class Python;
class Schedule;
class SummaryConfig;
class UDQState;
class WellTestState;
} // end namespace Opm
namespace Opm {
namespace Action {
class State;
}
enum class FileOutputMode {
OUTPUT_NONE = 0,
OUTPUT_LOG_ONLY = 1,
OUTPUT_ALL = 3,
};
// Ensure that a directory exists, creating it if it does not.
void
ensureOutputDirExists(const std::string& cmdline_output_dir);
// Prepare the result ouptut directory by removing files from previous simulation runs.
void
prepareResultOutputDirectory(const std::string& baseName, const std::filesystem::path& outputDir);
std::unique_ptr<ParseContext> setupParseContext(const bool exitOnAllErrors);
// Setup the OpmLog backends for screen output
void setupStreamLogging(const std::string& stdout_log_id);
// Setup the OpmLog backends
FileOutputMode
setupLogging(Parallel::Communication& comm,
const std::string& deck_filename,
const std::string& cmdline_output_dir,
const std::string& cmdline_output,
bool output_cout_,
const std::string& stdout_log_id,
const bool allRanksDbgLog);
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,
const std::string& actionParsingStrictness,
const std::string& inputSkipMode,
bool initFromRestart,
bool checkDeck,
bool keepKeywords,
const std::optional<int>& outputInterval,
bool slaveMode);
void verifyValidCellGeometry(Parallel::Communication comm,
const EclipseState& eclipseState);
} // end namespace Opm
#endif // OPM_READDECK_HEADER_INCLUDED
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::readDeck
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, const std::string &actionParsingStrictness, const std::string &inputSkipMode, bool initFromRestart, bool checkDeck, bool keepKeywords, const std::optional< int > &outputInterval, bool slaveMode)
Reads the deck and creates all necessary objects if needed.
Definition readDeck.cpp:683
Opm::FileOutputMode
FileOutputMode
Definition readDeck.hpp:49
Opm::FileOutputMode::OUTPUT_LOG_ONLY
@ OUTPUT_LOG_ONLY
Output only to log files, no ECLIPSE output.
Definition readDeck.hpp:54
Opm::FileOutputMode::OUTPUT_ALL
@ OUTPUT_ALL
Output to all files.
Definition readDeck.hpp:57
Opm::FileOutputMode::OUTPUT_NONE
@ OUTPUT_NONE
No file output.
Definition readDeck.hpp:51