Skip processing of filename if external deck already exists.

This commit is contained in:
Michael Sargado
2019-11-01 14:18:47 +01:00
committed by Joakim Hove
parent 0eee2c37e6
commit e1e1efbaaf

View File

@@ -262,6 +262,9 @@ public:
std::string fileName = EWOMS_GET_PARAM(TypeTag, std::string, EclDeckFileName);
edgeWeightsMethod_ = Dune::EdgeWeightMethod(EWOMS_GET_PARAM(TypeTag, int, EdgeWeightsMethod));
// Skip processing of filename if external deck already exists.
if (!externalDeck_)
{
if (fileName == "")
throw std::runtime_error("No input deck file has been specified as a command line argument,"
" or via '--ecl-deck-file-name=CASE.DATA'");
@@ -289,6 +292,7 @@ public:
// transform the result to ALL_UPPERCASE
caseName_ = rawCaseName;
std::transform(caseName_.begin(), caseName_.end(), caseName_.begin(), ::toupper);
}
// create the parser objects for the deck or use their externally specified
// versions (if desired)
@@ -319,7 +323,6 @@ public:
}
else {
assert(externalDeck_);
deck_ = externalDeck_;
}