use ref constructor for EclipseState

This commit is contained in:
Pål Grønås Drange 2016-08-08 10:04:45 +02:00
parent 30a6d3ea87
commit e7a89ea838
2 changed files with 3 additions and 3 deletions

View File

@ -231,7 +231,7 @@ inline void testAll()
Opm::ParseContext parseContext;
auto deck = parser.parseString(deckString1, parseContext);
auto eclState = std::make_shared<Opm::EclipseState>(deck, parseContext);
auto eclState = std::make_shared<Opm::EclipseState>(*deck, parseContext);
const auto& pvtwKeyword = deck->getKeyword("PVTW");
size_t numPvtRegions = pvtwKeyword.size();

View File

@ -246,7 +246,7 @@ inline void testAll()
typedef typename MaterialLawManager::MaterialLaw MaterialLaw;
const auto deck = parser.parseString(fam1DeckString, parseContext);
const auto eclState = std::make_shared<Opm::EclipseState>(deck, parseContext);
const auto eclState = std::make_shared<Opm::EclipseState>(*deck, parseContext);
const auto eclGrid = eclState->getInputGrid();
size_t n = eclGrid->getCartesianSize();
@ -267,7 +267,7 @@ inline void testAll()
"Discrepancy between the deck and the EclMaterialLawManager");
const auto fam2Deck = parser.parseString(fam2DeckString, parseContext);
const auto fam2EclState = std::make_shared<Opm::EclipseState>(fam2Deck, parseContext);
const auto fam2EclState = std::make_shared<Opm::EclipseState>(*fam2Deck, parseContext);
Opm::EclMaterialLawManager<MaterialTraits> fam2MaterialLawManager;
fam2MaterialLawManager.initFromDeck(fam2Deck, fam2EclState, compressedToCartesianIdx);