Update to shared_ptr-less parser interface.

This commit is contained in:
Jørgen Kvalsvik 2016-10-13 16:03:35 +02:00 committed by Andreas Lauser
parent 6f36076516
commit 3c6fc0288a
2 changed files with 16 additions and 16 deletions

View File

@ -72,8 +72,8 @@ namespace Opm
template<class Grid> template<class Grid>
void initStateEquil(const Grid& grid, void initStateEquil(const Grid& grid,
const BlackoilPropertiesInterface& props, const BlackoilPropertiesInterface& props,
const Opm::DeckConstPtr deck, const Opm::Deck& deck,
const Opm::EclipseStateConstPtr eclipseState, const Opm::EclipseState& eclipseState,
const double gravity, const double gravity,
BlackoilState& state); BlackoilState& state);
@ -213,16 +213,16 @@ namespace Opm
template<class Grid> template<class Grid>
inline inline
std::vector<int> std::vector<int>
equilnum(const Opm::DeckConstPtr deck, equilnum(const Opm::Deck& deck,
const Opm::EclipseStateConstPtr eclipseState, const Opm::EclipseState& eclipseState,
const Grid& G ) const Grid& G )
{ {
std::vector<int> eqlnum; std::vector<int> eqlnum;
if (deck->hasKeyword("EQLNUM")) { if (deck.hasKeyword("EQLNUM")) {
const int nc = UgGridHelpers::numCells(G); const int nc = UgGridHelpers::numCells(G);
eqlnum.resize(nc); eqlnum.resize(nc);
const std::vector<int>& e = const std::vector<int>& e =
eclipseState->get3DProperties().getIntGridProperty("EQLNUM").getData(); eclipseState.get3DProperties().getIntGridProperty("EQLNUM").getData();
const int* gc = UgGridHelpers::globalCell(G); const int* gc = UgGridHelpers::globalCell(G);
for (int cell = 0; cell < nc; ++cell) { for (int cell = 0; cell < nc; ++cell) {
const int deck_pos = (gc == NULL) ? cell : gc[cell]; const int deck_pos = (gc == NULL) ? cell : gc[cell];
@ -243,8 +243,8 @@ namespace Opm
public: public:
template<class Grid> template<class Grid>
InitialStateComputer(BlackoilPropertiesInterface& props, InitialStateComputer(BlackoilPropertiesInterface& props,
const Opm::DeckConstPtr deck, const Opm::Deck& deck,
const Opm::EclipseStateConstPtr eclipseState, const Opm::EclipseState& eclipseState,
const Grid& G , const Grid& G ,
const double grav = unit::gravity) const double grav = unit::gravity)
: pp_(props.numPhases(), : pp_(props.numPhases(),
@ -255,14 +255,14 @@ namespace Opm
rv_(UgGridHelpers::numCells(G)) rv_(UgGridHelpers::numCells(G))
{ {
// Get the equilibration records. // Get the equilibration records.
const std::vector<EquilRecord> rec = getEquil(*eclipseState); const std::vector<EquilRecord> rec = getEquil(eclipseState);
const auto& tables = eclipseState->getTableManager(); const auto& 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 TableContainer& rsvdTables = tables.getRsvdTables(); const TableContainer& rsvdTables = tables.getRsvdTables();
for (size_t i = 0; i < rec.size(); ++i) { for (size_t i = 0; i < rec.size(); ++i) {
if (eqlmap.cells(i).empty()) if (eqlmap.cells(i).empty())
@ -300,7 +300,7 @@ namespace Opm
} }
rv_func_.reserve(rec.size()); rv_func_.reserve(rec.size());
if (deck->hasKeyword("VAPOIL")) { if (deck.hasKeyword("VAPOIL")) {
const TableContainer& rvvdTables = tables.getRvvdTables(); const TableContainer& rvvdTables = tables.getRvvdTables();
for (size_t i = 0; i < rec.size(); ++i) { for (size_t i = 0; i < rec.size(); ++i) {
if (eqlmap.cells(i).empty()) if (eqlmap.cells(i).empty())
@ -342,8 +342,8 @@ namespace Opm
// Check for presence of kw SWATINIT // Check for presence of kw SWATINIT
if (deck->hasKeyword("SWATINIT")) { if (deck.hasKeyword("SWATINIT")) {
const std::vector<double>& swat_init = eclipseState-> const std::vector<double>& swat_init = eclipseState.
get3DProperties().getDoubleGridProperty("SWATINIT").getData(); get3DProperties().getDoubleGridProperty("SWATINIT").getData();
const int nc = UgGridHelpers::numCells(G); const int nc = UgGridHelpers::numCells(G);
swat_init_.resize(nc); swat_init_.resize(nc);

View File

@ -886,8 +886,8 @@ namespace Opm
template<class Grid> template<class Grid>
void initStateEquil(const Grid& grid, void initStateEquil(const Grid& grid,
BlackoilPropertiesFromDeck& props, BlackoilPropertiesFromDeck& props,
const Opm::DeckConstPtr deck, const Opm::Deck& deck,
const Opm::EclipseStateConstPtr eclipseState, const Opm::EclipseState& eclipseState,
const double gravity, const double gravity,
BlackoilState& state) BlackoilState& state)
{ {