make ParserItems always defaultable
i.e. remove the defaultSet() method and its friends. this is required to be able to specify defaults in DATA items like grid properties or saturation tables. e.g. SGL 10*0.1 10* 10*0.2 / would not be possible without this. If no meaningful default for an item is defined, float and double items get NaN, int items get -1 and string ones get an empty string. The hope is that if these values get used in the simulation, they will make the result obviously incorrect. (Whether a data point of an item was defaulted can be queried using item->defaultApplied(index).)
This commit is contained in:
@@ -99,7 +99,7 @@ size_t MultiRecordTable::getNumFlatItems_(Opm::DeckRecordConstPtr deckRecord)
|
||||
int result = 0;
|
||||
for (unsigned i = 0; i < deckRecord->size(); ++ i) {
|
||||
Opm::DeckItemConstPtr item(deckRecord->getItem(i));
|
||||
if (i == 0 && !item->wasSetInDeck(0))
|
||||
if (item->size() == 0 || item->defaultApplied(0))
|
||||
return result;
|
||||
result += item->size();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user