Generalise 'flat table'; implement DENSITY, PVTW

Several tables are identical both in structure *and* parsing, i.e. the
code required to parse them only differ in output type and possibly
number of items to read.

FlatTable is a simple vector-based template that expands into this exact
parsing routine, based on a simple specification of the record.
This commit is contained in:
Jørgen Kvalsvik
2016-12-15 16:08:30 +01:00
parent e12ec3c003
commit 5413b841ef
9 changed files with 154 additions and 92 deletions

View File

@@ -87,6 +87,9 @@ namespace Opm {
if( deck.hasKeyword( "PVTW" ) )
this->m_pvtwTable = PvtwTable( deck.getKeyword( "PVTW" ) );
if( deck.hasKeyword( "DENSITY" ) )
this->m_densityTable = DensityTable( deck.getKeyword( "DENSITY" ) );
initVFPProdTables(deck, m_vfpprodTables);
initVFPInjTables(deck, m_vfpinjTables);
}
@@ -637,6 +640,10 @@ namespace Opm {
return this->m_pvtwTable;
}
const DensityTable& TableManager::getDensityTable() const {
return this->m_densityTable;
}
const TableContainer& TableManager::getMsfnTables() const {
return getTables("MSFN");
}