adapt the the table related API changes of opm-parser

This commit is contained in:
Andreas Lauser 2014-09-17 13:42:13 +02:00
parent 57460a71b2
commit e8a08749f5

View File

@ -42,11 +42,7 @@
// must be available // must be available
#include <dune/grid/CpGrid.hpp> #include <dune/grid/CpGrid.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp> #include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Utility/SgofTable.hpp> #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Utility/SwofTable.hpp>
#include <opm/parser/eclipse/Utility/PvtoTable.hpp>
#include <opm/parser/eclipse/Utility/PvtwTable.hpp>
#include <opm/parser/eclipse/Utility/PvdgTable.hpp>
#include <dune/common/version.hh> #include <dune/common/version.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
@ -597,14 +593,14 @@ private:
//////////////////////////////// ////////////////////////////////
// fluid parameters // fluid parameters
Opm::DeckKeywordConstPtr swofKeyword = deck->getKeyword("SWOF"); const auto& swofTables = eclipseState->getSwofTables();
Opm::DeckKeywordConstPtr sgofKeyword = deck->getKeyword("SGOF"); const auto& sgofTables = eclipseState->getSgofTables();
// the number of tables for the SWOF and the SGOF keywords // the number of tables for the SWOF and the SGOF keywords
// must be identical // must be identical
assert(Opm::SwofTable::numTables(swofKeyword) == Opm::SgofTable::numTables(sgofKeyword)); assert(swofTables.size() == sgofTables.size());
size_t numSatfuncTables = Opm::SwofTable::numTables(swofKeyword); size_t numSatfuncTables = swofTables.size();
materialParams_.resize(numSatfuncTables); materialParams_.resize(numSatfuncTables);
typedef typename MaterialLawParams::GasOilParams GasOilParams; typedef typename MaterialLawParams::GasOilParams GasOilParams;
@ -615,8 +611,8 @@ private:
OilWaterParams owParams; OilWaterParams owParams;
GasOilParams goParams; GasOilParams goParams;
Opm::SwofTable swofTable(swofKeyword, tableIdx); const auto& swofTable = swofTables[tableIdx];
Opm::SgofTable sgofTable(sgofKeyword, tableIdx); const auto& sgofTable = sgofTables[tableIdx];
const auto &SwColumn = swofTable.getSwColumn(); const auto &SwColumn = swofTable.getSwColumn();
owParams.setKrwSamples(SwColumn, swofTable.getKrwColumn()); owParams.setKrwSamples(SwColumn, swofTable.getKrwColumn());
@ -667,6 +663,7 @@ private:
void initFluidSystem_() void initFluidSystem_()
{ {
const auto deck = this->simulator().gridManager().deck(); const auto deck = this->simulator().gridManager().deck();
const auto eclipseState = this->simulator().gridManager().eclipseState();
FluidSystem::initBegin(); FluidSystem::initBegin();
@ -682,13 +679,9 @@ private:
// so far, we require the presence of the PVTO, PVTW and PVDG // so far, we require the presence of the PVTO, PVTW and PVDG
// keywords... // keywords...
Opm::PvtoTable pvtoTable(deck->getKeyword("PVTO"), regionIdx); FluidSystem::setPvtoTable(eclipseState->getPvtoTables()[regionIdx], regionIdx);
Opm::PvtwTable pvtwTable(deck->getKeyword("PVTW"), regionIdx); FluidSystem::setPvtw(deck->getKeyword("PVTW"), regionIdx);
Opm::PvdgTable pvdgTable(deck->getKeyword("PVDG"), regionIdx); FluidSystem::setPvdgTable(eclipseState->getPvdgTables()[regionIdx], regionIdx);
FluidSystem::setPvtoTable(pvtoTable, regionIdx);
FluidSystem::setPvtwTable(pvtwTable, regionIdx);
FluidSystem::setPvdgTable(pvdgTable, regionIdx);
} }
FluidSystem::initEnd(); FluidSystem::initEnd();