Using TableManager to get tables.

This commit is contained in:
Joakim Hove 2015-09-01 12:58:09 +02:00 committed by Andreas Lauser
parent bc4116fd39
commit dd42660a00

View File

@ -281,14 +281,14 @@ namespace Opm
{ {
// Get the equilibration records. // Get the equilibration records.
const std::vector<EquilRecord> rec = getEquil(deck); const std::vector<EquilRecord> rec = getEquil(deck);
std::shared_ptr<const TableManager> tables = eclipseState->getTableManager();
// Create (inverse) region mapping. // Create (inverse) region mapping.
const RegionMapping<> eqlmap(equilnum(deck, eclipseState, G)); const RegionMapping<> eqlmap(equilnum(deck, eclipseState, G));
// Create Rs functions. // Create Rs functions.
rs_func_.reserve(rec.size()); rs_func_.reserve(rec.size());
if (deck->hasKeyword("DISGAS")) { if (deck->hasKeyword("DISGAS")) {
const std::vector<RsvdTable>& rsvdTables = eclipseState->getRsvdTables(); const std::vector<RsvdTable>& rsvdTables = tables->getRsvdTables();
for (size_t i = 0; i < rec.size(); ++i) { for (size_t i = 0; i < rec.size(); ++i) {
const int cell = *(eqlmap.cells(i).begin()); const int cell = *(eqlmap.cells(i).begin());
if (rec[i].live_oil_table_index > 0) { if (rec[i].live_oil_table_index > 0) {
@ -320,7 +320,7 @@ namespace Opm
rv_func_.reserve(rec.size()); rv_func_.reserve(rec.size());
if (deck->hasKeyword("VAPOIL")) { if (deck->hasKeyword("VAPOIL")) {
const std::vector<RvvdTable>& rvvdTables = eclipseState->getRvvdTables(); const std::vector<RvvdTable>& rvvdTables = tables->getRvvdTables();
for (size_t i = 0; i < rec.size(); ++i) { for (size_t i = 0; i < rec.size(); ++i) {
const int cell = *(eqlmap.cells(i).begin()); const int cell = *(eqlmap.cells(i).begin());
if (rec[i].wet_gas_table_index > 0) { if (rec[i].wet_gas_table_index > 0) {