Remove C++ Code and Place Conditions in JSON Files
Remove the C++ code checks and instead place the logic in the keyword JSON files. This is a cleaner approach. Note we force that only one of the keywords is allowed in the deck to avoid confusion on what cut-off is actually being applied.
This commit is contained in:
parent
a5cfafe4de
commit
4fe559ba3c
@ -344,14 +344,6 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
|
||||
m_pinchGapMode = PinchMode::PinchModeFromString(pinchGapString);
|
||||
}
|
||||
|
||||
if (deck.hasKeyword<ParserKeywords::MINPV>() && deck.hasKeyword<ParserKeywords::MINPVFIL>()) {
|
||||
throw std::invalid_argument("Can not have both MINPV and MINPVFIL in the deck.");
|
||||
} else if(deck.hasKeyword<ParserKeywords::MINPV>() && deck.hasKeyword<ParserKeywords::MINPORV>()) {
|
||||
throw std::invalid_argument("Can not have both MINPV and MINPORV in the deck.");
|
||||
} else if(deck.hasKeyword<ParserKeywords::MINPORV>() && deck.hasKeyword<ParserKeywords::MINPVFIL>()) {
|
||||
throw std::invalid_argument("Can not have both MINPORV and MINPVFIL in the deck.");
|
||||
}
|
||||
|
||||
m_minpvVector.resize(getCartesianSize(), 0.0);
|
||||
if (deck.hasKeyword<ParserKeywords::MINPV>()) {
|
||||
const auto& record = deck.get<ParserKeywords::MINPV>( ).back().getRecord(0);
|
||||
|
@ -3,6 +3,7 @@
|
||||
"sections": [
|
||||
"GRID"
|
||||
],
|
||||
"prohibits" : ["MINPV", "MINPVFIL"],
|
||||
"size": 1,
|
||||
"items": [
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
"sections": [
|
||||
"GRID"
|
||||
],
|
||||
"prohibits" : ["MINPORV", "MINPVFIL"],
|
||||
"size": 1,
|
||||
"items": [
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
"sections": [
|
||||
"GRID"
|
||||
],
|
||||
"prohibits" : ["MINPV", "MINPORV"],
|
||||
"size": 1,
|
||||
"items": [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user