mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use std::unordered_set.
This commit is contained in:
parent
064f512893
commit
3e01b42d55
@ -21,7 +21,7 @@
|
|||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||||
#include <opm/autodiff/MissingFeatures.hpp>
|
#include <opm/autodiff/MissingFeatures.hpp>
|
||||||
#include <vector>
|
#include <unordered_set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ namespace Opm {
|
|||||||
// These keywords are supported by opm-parser, but are not supported
|
// These keywords are supported by opm-parser, but are not supported
|
||||||
// by flow. For some of them, only part of the options are supported.
|
// by flow. For some of them, only part of the options are supported.
|
||||||
// The list is used to output messages only.
|
// The list is used to output messages only.
|
||||||
std::vector<std::string> unsupported_keywords = {
|
std::unordered_set<std::string> unsupported_keywords = {
|
||||||
"ACTDIMS", "ADSALNOD", "API", "AQUCON", "AQUDIMS", "AQUNUM"
|
"ACTDIMS", "ADSALNOD", "API", "AQUCON", "AQUDIMS", "AQUNUM"
|
||||||
"BLOCK_PROBE", "COMPLUMP", "COMPSEGS", "CONNECTION", "CPR",
|
"BLOCK_PROBE", "COMPLUMP", "COMPSEGS", "CONNECTION", "CPR",
|
||||||
"DATE", "ECHO", "EDITNNC", "ENDINC", "ENDNUM", "ENDPOINT_SPECIFIERS",
|
"DATE", "ECHO", "EDITNNC", "ENDINC", "ENDNUM", "ENDPOINT_SPECIFIERS",
|
||||||
@ -60,10 +60,8 @@ namespace Opm {
|
|||||||
if (checkDeck(deck, parser)) {
|
if (checkDeck(deck, parser)) {
|
||||||
for (size_t idx = 0; idx < deck->size(); ++idx) {
|
for (size_t idx = 0; idx < deck->size(); ++idx) {
|
||||||
const auto& keyword = deck->getKeyword(idx);
|
const auto& keyword = deck->getKeyword(idx);
|
||||||
std::vector<std::string>::const_iterator it;
|
std::unordered_set<std::string>::const_iterator it;
|
||||||
it = std::find(unsupported_keywords.begin(),
|
it = unsupported_keywords.find(keyword.name());
|
||||||
unsupported_keywords.end(),
|
|
||||||
keyword.name());
|
|
||||||
if (it != unsupported_keywords.end()) {
|
if (it != unsupported_keywords.end()) {
|
||||||
std::string msg = "Keyword '" + keyword.name() + "' is not supported by flow.\n"
|
std::string msg = "Keyword '" + keyword.name() + "' is not supported by flow.\n"
|
||||||
+ "In file " + keyword.getFileName() + ", line " + std::to_string(keyword.getLineNumber()) + "\n";
|
+ "In file " + keyword.getFileName() + ", line " + std::to_string(keyword.getLineNumber()) + "\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user