34#include <opm/input/eclipse/Parser/ParserKeyword.hpp>
45 RUNSPEC, GRID, EDIT, PROPS, REGIONS, SOLUTION, SUMMARY, SCHEDULE
63 explicit Parser(
bool addDefault =
true);
64 explicit Parser(std::shared_ptr<Python> python,
bool addDefault =
true);
66 static std::string stripComments(
const std::string& inputString);
72 const std::vector<Opm::Ecl::SectionType>& sections = {})
const;
79 const std::vector<Opm::Ecl::SectionType>& sections
84 Deck parseString(
const std::string &data,
88 Deck parseString(
const std::string &data)
const;
100 const ParserKeyword& getKeyword(
const std::string& name)
const;
126 const ParserKeyword& getParserKeywordFromDeckName(
const std::string_view& deckKeywordName)
const;
127 std::vector<std::string> getAllDeckNames ()
const;
130 bool loadKeywordFromFile(
const std::filesystem::path& configFile);
132 void loadKeywordsFromDirectory(
const std::filesystem::path& directory ,
bool recursive =
true);
133 void applyUnitsToDeck(
Deck& deck)
const;
171 const std::vector<std::pair<std::string,std::string>> codeKeywords()
const;
173 bool silent()
const {
return silentMode; }
174 void silent(
bool newSilentMode) { silentMode = newSilentMode; }
176 static constexpr int SILENT_MODE_MIN_DEBUG_VERBOSITY_LEVEL {3};
179 std::shared_ptr<Python> m_python{};
181 bool silentMode {
false};
184 std::list<ParserKeyword> keyword_storage{};
187 std::map<std::string_view, const ParserKeyword*> m_deckParserKeywords{};
191 std::map<std::string_view, const ParserKeyword*> m_wildCardKeywords{};
193 std::vector<std::pair<std::string,std::string>> code_keywords{};
195 bool hasWildCardKeyword(
const std::string& keyword)
const;
197 const ParserKeyword* matchingKeyword(
const std::string_view& keyword)
const;
198 void addDefaultKeywords();
Definition JsonObject.hpp:31
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:62
Definition EclipseState.hpp:66
Definition ErrorGuard.hpp:30
Control parser behaviour in failure conditions.
Definition ParseContext.hpp:115
Definition ParserKeyword.hpp:85
static EclipseGrid parseGrid(const std::string &filename, const ParseContext &context, ErrorGuard &errors)
Parses the deck specified in filename.
Definition Parser.cpp:1643
void addParserKeyword(const Json::JsonObject &jsonKeyword)
Method to add ParserKeyword instances, these holding type and size information about the keywords and...
Definition Parser.cpp:1832
bool isBaseRecognizedKeyword(std::string_view deckKeywordName) const
Whether or not string is a valid keyword.
Definition Parser.cpp:1791
bool hasKeyword(const std::string &) const
Returns whether the parser knows about a keyword.
Definition Parser.cpp:1836
static EclipseGrid parseGridData(const std::string &data, const ParseContext &context, ErrorGuard &errors)
Parses the provided deck string.
Definition Parser.cpp:1656
Deck parseFile(const std::string &dataFile, const ParseContext &, ErrorGuard &errors, const std::vector< Opm::Ecl::SectionType > §ions={}) const
The starting point of the parsing process. The supplied file is parsed, and the resulting Deck is ret...
Definition Parser.cpp:1665
size_t size() const
Returns the approximate number of recognized keywords in decks.
Definition Parser.cpp:1765
bool isRecognizedKeyword(std::string_view deckKeywordName) const
Whether or not string is a valid keyword.
Definition Parser.cpp:1781
Definition Python.hpp:116
Definition RawKeyword.hpp:37
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30