mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move ParseContext configuration to readDeck
this way we do not need to include InputErrorAction in Main.hpp
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/Action/State.hpp>
|
||||
@@ -574,3 +576,17 @@ void Opm::verifyValidCellGeometry(Parallel::Communication comm,
|
||||
Please check geometry keywords, especially if grid is imported through GDFILE)"
|
||||
};
|
||||
}
|
||||
|
||||
std::unique_ptr<Opm::ParseContext> Opm::setupParseContext(const bool strictParsing)
|
||||
{
|
||||
auto parseContext =
|
||||
std::make_unique<ParseContext>(std::vector<std::pair<std::string , InputErrorAction>>
|
||||
{{ParseContext::PARSE_RANDOM_SLASH, InputErrorAction::IGNORE},
|
||||
{ParseContext::PARSE_MISSING_DIMS_KEYWORD, InputErrorAction::WARN},
|
||||
{ParseContext::SUMMARY_UNKNOWN_WELL, InputErrorAction::WARN},
|
||||
{ParseContext::SUMMARY_UNKNOWN_GROUP, InputErrorAction::WARN}});
|
||||
if (strictParsing)
|
||||
parseContext->update(InputErrorAction::DELAYED_EXIT1);
|
||||
|
||||
return parseContext;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ enum class FileOutputMode {
|
||||
void
|
||||
ensureOutputDirExists(const std::string& cmdline_output_dir);
|
||||
|
||||
std::unique_ptr<ParseContext> setupParseContext(const bool strictParsing);
|
||||
|
||||
// Setup the OpmLog backends
|
||||
FileOutputMode
|
||||
setupLogging(int mpi_rank_,
|
||||
|
||||
Reference in New Issue
Block a user