21 #ifndef OPM_PARSE_CONTEXT_HPP
22 #define OPM_PARSE_CONTEXT_HPP
30 #include <opm/common/OpmLog/OpmLog.hpp>
32 #include <opm/parser/eclipse/Parser/InputErrorAction.hpp>
37 class KeywordLocation;
91 explicit ParseContext(InputError::Action default_action);
92 explicit ParseContext(
const std::vector<std::pair<std::string , InputError::Action>>& initial);
94 void handleError(
const std::string& errorKey,
const std::string& msg,
const std::optional<KeywordLocation>& location,
ErrorGuard& errors)
const;
95 void handleUnknownKeyword(
const std::string& keyword,
const std::optional<KeywordLocation>& location,
ErrorGuard& errors)
const;
96 bool hasKey(
const std::string& key)
const;
97 ParseContext withKey(
const std::string& key, InputError::Action action = InputError::WARN)
const;
98 ParseContext& withKey(
const std::string& key, InputError::Action action = InputError::WARN);
99 void updateKey(
const std::string& key , InputError::Action action);
100 void update(InputError::Action action);
101 void update(
const std::string& keyString , InputError::Action action);
102 void ignoreKeyword(
const std::string& keyword);
103 InputError::Action get(
const std::string& key)
const;
104 std::map<std::string,InputError::Action>::const_iterator begin()
const;
105 std::map<std::string,InputError::Action>::const_iterator end()
const;
112 void addKey(
const std::string& key, InputError::Action default_action);
130 const static std::string PARSE_EXTRA_RECORDS;
154 const static std::string PARSE_UNKNOWN_KEYWORD;
160 const static std::string PARSE_RANDOM_TEXT;
167 const static std::string PARSE_RANDOM_SLASH;
182 const static std::string PARSE_MISSING_DIMS_KEYWORD;
192 const static std::string PARSE_EXTRA_DATA;
199 const static std::string PARSE_MISSING_INCLUDE;
207 const static std::string PARSE_INVALID_KEYWORD_COMBINATION;
230 const static std::string PARSE_LONG_KEYWORD;
236 const static std::string UNIT_SYSTEM_MISMATCH;
247 const static std::string UNSUPPORTED_SCHEDULE_GEO_MODIFIER;
255 const static std::string UNSUPPORTED_INITIAL_THPRES;
262 const static std::string UNSUPPORTED_TERMINATE_IF_BHP;
264 const static std::string UDQ_PARSE_ERROR;
265 const static std::string UDQ_TYPE_ERROR;
274 const static std::string INTERNAL_ERROR_UNINITIALIZED_THPRES;
280 const static std::string PARSE_MISSING_SECTIONS;
289 const static std::string PARSE_WGNAME_SPACE;
295 const static std::string SUMMARY_UNKNOWN_WELL;
296 const static std::string SUMMARY_UNKNOWN_GROUP;
297 const static std::string SUMMARY_UNKNOWN_NODE;
298 const static std::string SUMMARY_UNKNOWN_AQUIFER;
299 const static std::string SUMMARY_UNHANDLED_KEYWORD;
300 const static std::string SUMMARY_UNDEFINED_UDQ;
301 const static std::string SUMMARY_UDQ_MISSING_UNIT;
302 const static std::string SUMMARY_INVALID_FIPNUM;
303 const static std::string SUMMARY_EMPTY_REGION;
304 const static std::string SUMMARY_REGION_TOO_LARGE;
310 const static std::string SCHEDULE_INVALID_NAME;
318 const static std::string ACTIONX_ILLEGAL_KEYWORD;
351 const static std::string RPT_MIXED_STYLE;
353 const static std::string RPT_UNKNOWN_MNEMONIC;
355 const static std::string SCHEDULE_GROUP_ERROR;
356 const static std::string SCHEDULE_IGNORED_GUIDE_RATE;
358 const static std::string SCHEDULE_COMPSEGS_INVALID;
359 const static std::string SCHEDULE_COMPSEGS_NOT_SUPPORTED;
367 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED;
368 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED_CRITICAL;
369 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED;
370 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED_CRITICAL;
375 void envUpdate(
const std::string& envVariable , InputError::Action action );
376 void patternUpdate(
const std::string& pattern , InputError::Action action);
378 std::map<std::string , InputError::Action> m_errorContexts;
379 std::set<std::string> ignore_keywords;
Definition: ErrorGuard.hpp:29
Definition: ParseContext.hpp:88
static const std::string RUNSPEC_NUMWELLS_TOO_LARGE
Dynamic number of wells exceeds maximum declared in RUNSPEC keyword WELLDIMS (item 1).
Definition: ParseContext.hpp:211
static const std::string RUNSPEC_CONNS_PER_WELL_TOO_LARGE
Dynamic number of connections per well exceeds maximum declared in RUNSPEC keyword WELLDIMS (item 2).
Definition: ParseContext.hpp:215
static const std::string RUNSPEC_GROUPSIZE_TOO_LARGE
Dynamic group size exceeds maximum number declared in RUNSPEC keyword WELLDIMS (item 4).
Definition: ParseContext.hpp:223
static const std::string RUNSPEC_NUMGROUPS_TOO_LARGE
Dynamic number of groups exceeds maximum number declared in RUNSPEC keyword WELLDIMS (item 3).
Definition: ParseContext.hpp:219
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29