diff --git a/tests/problems/reservoirproblem.hh b/tests/problems/reservoirproblem.hh index bccdd92ae..d68a5c287 100644 --- a/tests/problems/reservoirproblem.hh +++ b/tests/problems/reservoirproblem.hh @@ -334,11 +334,13 @@ public: Opm::GasPvtMultiplexer *gasPvt = new Opm::GasPvtMultiplexer; gasPvt->setApproach(GasPvtApproach::DryGas); - auto& dryGasPvt = gasPvt->template getRealPvt(); - dryGasPvt.setNumRegions(/*numPvtRegion=*/1); - dryGasPvt.setReferenceDensities(/*regionIdx=*/0, rhoRefO, rhoRefG, rhoRefW); - dryGasPvt.setGasFormationVolumeFactor(/*regionIdx=*/0, Bg); - dryGasPvt.setGasViscosity(/*regionIdx=*/0, mug); + gasPvt->visit([&](Opm::DryGasPvt& dryGasPvt) + { + dryGasPvt.setNumRegions(/*numPvtRegion=*/1); + dryGasPvt.setReferenceDensities(/*regionIdx=*/0, rhoRefO, rhoRefG, rhoRefW); + dryGasPvt.setGasFormationVolumeFactor(/*regionIdx=*/0, Bg); + dryGasPvt.setGasViscosity(/*regionIdx=*/0, mug); + }); Opm::OilPvtMultiplexer *oilPvt = new Opm::OilPvtMultiplexer; oilPvt->setApproach(OilPvtApproach::LiveOil);