Calling initDimension for table collections and data keywords like PERMX.
This commit is contained in:
@@ -133,7 +133,7 @@ namespace Opm {
|
||||
initData(jsonConfig);
|
||||
|
||||
if (isTableCollection())
|
||||
addTableItems();
|
||||
addTableItems(jsonConfig.get_item("num_tables"));
|
||||
|
||||
if ((m_fixedSize == 0 && m_keywordSizeType == FIXED) || (m_action != INTERNALIZE))
|
||||
return;
|
||||
@@ -257,8 +257,9 @@ namespace Opm {
|
||||
throw std::invalid_argument("The items: object must be an array");
|
||||
}
|
||||
|
||||
void ParserKeyword::addTableItems() {
|
||||
ParserDoubleItemConstPtr item = ParserDoubleItemConstPtr(new ParserDoubleItem("TABLEROW", ALL, 0));
|
||||
void ParserKeyword::addTableItems(const Json::JsonObject tableConfig) {
|
||||
ParserDoubleItemPtr item = ParserDoubleItemPtr(new ParserDoubleItem("TABLEROW", ALL, 0));
|
||||
initItemDimension( item , tableConfig );
|
||||
addItem(item);
|
||||
}
|
||||
|
||||
@@ -318,6 +319,7 @@ namespace Opm {
|
||||
double defaultValue = dataConfig.get_double("default");
|
||||
item->setDefault(defaultValue);
|
||||
}
|
||||
initItemDimension( item , dataConfig );
|
||||
addDataItem(item);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Opm {
|
||||
void initSizeKeyword(const Json::JsonObject& sizeObject);
|
||||
void commonInit(const std::string& name, ParserKeywordSizeEnum sizeType , ParserKeywordActionEnum action);
|
||||
void addItems( const Json::JsonObject& jsonConfig);
|
||||
void addTableItems();
|
||||
void addTableItems(const Json::JsonObject tableConfig);
|
||||
static void initItemDimension( ParserDoubleItemPtr item, const Json::JsonObject itemConfig);
|
||||
};
|
||||
typedef std::shared_ptr<ParserKeyword> ParserKeywordPtr;
|
||||
|
||||
Reference in New Issue
Block a user