21#ifndef OPM_PARSE_CONTEXT_HPP
22#define OPM_PARSE_CONTEXT_HPP
30#include <opm/common/OpmLog/OpmLog.hpp>
32#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
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;
244 const static std::string UNSUPPORTED_INITIAL_THPRES;
251 const static std::string UNSUPPORTED_TERMINATE_IF_BHP;
253 const static std::string UDQ_PARSE_ERROR;
254 const static std::string UDQ_TYPE_ERROR;
263 const static std::string INTERNAL_ERROR_UNINITIALIZED_THPRES;
269 const static std::string PARSE_MISSING_SECTIONS;
278 const static std::string PARSE_WGNAME_SPACE;
284 const static std::string SUMMARY_UNKNOWN_WELL;
285 const static std::string SUMMARY_UNKNOWN_GROUP;
286 const static std::string SUMMARY_UNKNOWN_NODE;
287 const static std::string SUMMARY_UNKNOWN_AQUIFER;
288 const static std::string SUMMARY_UNHANDLED_KEYWORD;
289 const static std::string SUMMARY_UNDEFINED_UDQ;
290 const static std::string SUMMARY_UDQ_MISSING_UNIT;
291 const static std::string SUMMARY_INVALID_FIPNUM;
292 const static std::string SUMMARY_EMPTY_REGION;
293 const static std::string SUMMARY_REGION_TOO_LARGE;
299 const static std::string SCHEDULE_INVALID_NAME;
307 const static std::string ACTIONX_ILLEGAL_KEYWORD;
340 const static std::string RPT_MIXED_STYLE;
342 const static std::string RPT_UNKNOWN_MNEMONIC;
344 const static std::string SCHEDULE_GROUP_ERROR;
345 const static std::string SCHEDULE_IGNORED_GUIDE_RATE;
347 const static std::string SCHEDULE_COMPSEGS_INVALID;
348 const static std::string SCHEDULE_COMPSEGS_NOT_SUPPORTED;
356 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED;
357 const static std::string SIMULATOR_KEYWORD_NOT_SUPPORTED_CRITICAL;
358 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED;
359 const static std::string SIMULATOR_KEYWORD_ITEM_NOT_SUPPORTED_CRITICAL;
364 void envUpdate(
const std::string& envVariable , InputError::Action action );
365 void patternUpdate(
const std::string& pattern , InputError::Action action);
367 std::map<std::string , InputError::Action> m_errorContexts;
368 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