changed: do not call initParamsForElements in initFromDeck

This commit is contained in:
Arne Morten Kvarving 2020-01-20 15:30:19 +01:00
parent 14eff62913
commit 9af6f1fe4d
2 changed files with 11 additions and 9 deletions

View File

@ -117,8 +117,7 @@ public:
{}
void initFromDeck(const Opm::Deck& deck,
const Opm::EclipseState& eclState,
const std::vector<int>& compressedToCartesianElemIdx)
const Opm::EclipseState& eclState)
{
// get the number of saturation regions and the number of cells in the deck
const size_t numSatRegions = eclState.runspec().tabdims().getNumSatTables();
@ -147,8 +146,6 @@ public:
if (!stoneEtas.empty())
stoneEtas[satRegionIdx] = deck.getKeyword("STONE1EX").getRecord(satRegionIdx).getItem(0).getSIDouble(0);
}
initParamsForElements(eclState, compressedToCartesianElemIdx);
}
void initParamsForElements(const EclipseState& eclState,

View File

@ -453,7 +453,8 @@ inline void testAll()
compressedToCartesianIdx[i] = static_cast<int>(i);
MaterialLawManager materialLawManager;
materialLawManager.initFromDeck(deck, eclState, compressedToCartesianIdx);
materialLawManager.initFromDeck(deck, eclState);
materialLawManager.initParamsForElements(eclState, compressedToCartesianIdx);
if (materialLawManager.enableEndPointScaling())
throw std::logic_error("Discrepancy between the deck and the EclMaterialLawManager");
@ -466,7 +467,8 @@ inline void testAll()
const Opm::EclipseState fam2EclState(fam2Deck);
Opm::EclMaterialLawManager<MaterialTraits> fam2MaterialLawManager;
fam2MaterialLawManager.initFromDeck(fam2Deck, fam2EclState, compressedToCartesianIdx);
fam2MaterialLawManager.initFromDeck(fam2Deck, fam2EclState);
fam2MaterialLawManager.initParamsForElements(fam2EclState, compressedToCartesianIdx);
if (fam2MaterialLawManager.enableEndPointScaling())
throw std::logic_error("Discrepancy between the deck and the EclMaterialLawManager");
@ -478,7 +480,8 @@ inline void testAll()
const Opm::EclipseState hysterEclState(hysterDeck);
Opm::EclMaterialLawManager<MaterialTraits> hysterMaterialLawManager;
hysterMaterialLawManager.initFromDeck(hysterDeck, hysterEclState, compressedToCartesianIdx);
hysterMaterialLawManager.initFromDeck(hysterDeck, hysterEclState);
hysterMaterialLawManager.initParamsForElements(hysterEclState, compressedToCartesianIdx);
if (hysterMaterialLawManager.enableEndPointScaling())
throw std::logic_error("Discrepancy between the deck and the EclMaterialLawManager");
@ -570,13 +573,15 @@ inline void testAll()
const Opm::EclipseState fam1EclState(fam1Deck);
MaterialLawManager fam1materialLawManager;
fam1materialLawManager.initFromDeck(fam1Deck, fam1EclState, compressedToCartesianIdx);
fam1materialLawManager.initFromDeck(fam1Deck, fam1EclState);
fam1materialLawManager.initParamsForElements(fam1EclState, compressedToCartesianIdx);
const auto fam2Deck = parser.parseString(fam2DeckStringGasOil);
const Opm::EclipseState fam2EclState(fam2Deck);
Opm::EclMaterialLawManager<MaterialTraits> fam2MaterialLawManager;
fam2MaterialLawManager.initFromDeck(fam2Deck, fam2EclState, compressedToCartesianIdx);
fam2MaterialLawManager.initFromDeck(fam2Deck, fam2EclState);
fam2MaterialLawManager.initParamsForElements(fam2EclState, compressedToCartesianIdx);
for (unsigned elemIdx = 0; elemIdx < n; ++ elemIdx) {
for (int i = 0; i < 100; ++ i) {