Set number of columns in ROCKTAB to three
Throw if unsuppored directional and stress option is used
This commit is contained in:
parent
6ee4e5ce9a
commit
fc7ccd1603
@ -774,6 +774,12 @@ namespace Opm {
|
||||
const auto rocktabKeyword = deck.getKeyword("ROCKTAB");
|
||||
|
||||
bool isDirectional = deck.hasKeyword<ParserKeywords::RKTRMDIR>();
|
||||
if (isDirectional) {
|
||||
const std::string msg = "RKTRMDIR is in the deck. Flow does not support directional rock compaction mulipliers. \n"
|
||||
"Make sure that your ROCKTAB table only has 3 columns";
|
||||
throw std::invalid_argument(msg);
|
||||
}
|
||||
|
||||
bool useStressOption = false;
|
||||
if (deck.hasKeyword<ParserKeywords::ROCKOPTS>()) {
|
||||
const auto rockoptsKeyword = deck.getKeyword<ParserKeywords::ROCKOPTS>();
|
||||
@ -781,6 +787,10 @@ namespace Opm {
|
||||
const auto& item = rockoptsRecord.getItem<ParserKeywords::ROCKOPTS::METHOD>();
|
||||
useStressOption = (item.getTrimmedString(0) == "STRESS");
|
||||
}
|
||||
if (useStressOption) {
|
||||
const std::string msg = "STRESS option is set in ROCKOPTS. Flow does not support stress option in rock compaction mulipliers";
|
||||
throw std::invalid_argument(msg);
|
||||
}
|
||||
|
||||
for (size_t tableIdx = 0; tableIdx < rocktabKeyword.size(); ++tableIdx) {
|
||||
const auto& tableRecord = rocktabKeyword.getRecord( tableIdx );
|
||||
|
@ -891,7 +891,7 @@ RocktabTable::RocktabTable(
|
||||
|
||||
Table::ColumnOrderEnum POOrder;
|
||||
|
||||
if (hasStressOption)
|
||||
if (!hasStressOption)
|
||||
POOrder = Table::STRICTLY_INCREASING;
|
||||
else
|
||||
POOrder = Table::STRICTLY_DECREASING;
|
||||
|
@ -15,8 +15,6 @@
|
||||
"dimension": [
|
||||
"Pressure",
|
||||
"1",
|
||||
"1",
|
||||
"1",
|
||||
"1"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user