34#include <opm/input/eclipse/Parser/ParserKeyword.hpp>
45 RUNSPEC, GRID, EDIT, PROPS, REGIONS, SOLUTION, SUMMARY, SCHEDULE
62 explicit Parser(
bool addDefault =
true);
64 static std::string stripComments(
const std::string& inputString);
70 const std::vector<Opm::Ecl::SectionType>& sections = {})
const;
77 const std::vector<Opm::Ecl::SectionType>& sections
82 Deck parseString(
const std::string &data,
86 Deck parseString(
const std::string &data)
const;
98 const ParserKeyword& getKeyword(
const std::string& name)
const;
124 const ParserKeyword& getParserKeywordFromDeckName(
const std::string_view& deckKeywordName)
const;
125 std::vector<std::string> getAllDeckNames ()
const;
128 bool loadKeywordFromFile(
const std::filesystem::path& configFile);
130 void loadKeywordsFromDirectory(
const std::filesystem::path& directory ,
bool recursive =
true);
131 void applyUnitsToDeck(
Deck& deck)
const;
169 const std::vector<std::pair<std::string,std::string>> codeKeywords()
const;
172 bool hasWildCardKeyword(
const std::string& keyword)
const;
173 const ParserKeyword* matchingKeyword(
const std::string_view& keyword)
const;
174 void addDefaultKeywords();
177 std::list<ParserKeyword> keyword_storage;
180 std::map< std::string_view, const ParserKeyword* > m_deckParserKeywords;
184 std::map< std::string_view, const ParserKeyword* > m_wildCardKeywords;
186 std::vector<std::pair<std::string,std::string>> code_keywords;
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:55
Definition EclipseState.hpp:63
Definition ErrorGuard.hpp:29
Definition ParseContext.hpp:84
Definition ParserKeyword.hpp:85
The hub of the parsing process.
Definition Parser.hpp:60
static EclipseGrid parseGrid(const std::string &filename, const ParseContext &context, ErrorGuard &errors)
Parses the deck specified in filename.
Definition Parser.cpp:1505
void addParserKeyword(const Json::JsonObject &jsonKeyword)
Method to add ParserKeyword instances, these holding type and size information about the keywords and...
Definition Parser.cpp:1680
bool isBaseRecognizedKeyword(std::string_view deckKeywordName) const
Whether or not string is a valid keyword.
Definition Parser.cpp:1639
bool hasKeyword(const std::string &) const
Returns whether the parser knows about a keyword.
Definition Parser.cpp:1684
static EclipseGrid parseGridData(const std::string &data, const ParseContext &context, ErrorGuard &errors)
Parses the provided deck string.
Definition Parser.cpp:1518
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:1527
size_t size() const
Returns the approximate number of recognized keywords in decks.
Definition Parser.cpp:1613
bool isRecognizedKeyword(std::string_view deckKeywordName) const
Whether or not string is a valid keyword.
Definition Parser.cpp:1629
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30