diff --git a/opm/models/blackoil/blackoilintensivequantities.hh b/opm/models/blackoil/blackoilintensivequantities.hh index 5395fb7b0..9fe1a221c 100644 --- a/opm/models/blackoil/blackoilintensivequantities.hh +++ b/opm/models/blackoil/blackoilintensivequantities.hh @@ -223,7 +223,7 @@ public: asImp_().solventPreSatFuncUpdate_(elemCtx, dofIdx, timeIdx); // now we compute all phase pressures - Evaluation pC[numPhases]; + std::array pC; const auto& materialParams = problem.materialLawParams(globalSpaceIdx); MaterialLaw::capillaryPressures(pC, materialParams, fluidState_); diff --git a/opm/models/blackoil/blackoilprimaryvariables.hh b/opm/models/blackoil/blackoilprimaryvariables.hh index f7062e619..5cb26f10f 100644 --- a/opm/models/blackoil/blackoilprimaryvariables.hh +++ b/opm/models/blackoil/blackoilprimaryvariables.hh @@ -502,7 +502,7 @@ public: if(Sw < -eps && So3 > 0.0 && Sg > 0.0 && FluidSystem::enableVaporizedWater()) { Scalar po = (*this)[Indices::pressureSwitchIdx]; Scalar T = asImp_().temperature_(); - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, So3, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams); Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]); @@ -518,7 +518,7 @@ public: if(Sw < -eps && So3 <-eps && Sg > 0.0 && FluidSystem::enableVaporizedWater() && FluidSystem::enableVaporizedOil()) { Scalar po = (*this)[Indices::pressureSwitchIdx]; Scalar T = asImp_().temperature_(); - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, /*So*/ 0.0, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams); Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]); @@ -584,7 +584,7 @@ public: // we only have the oil pressure readily available, but we need the gas // pressure, i.e. we must determine capillary pressure - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, /*So=*/0.0, Sg2 + solventSaturation_(), Sw, matParams); Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]); @@ -666,7 +666,7 @@ public: Sg = (*this)[Indices::compositionSwitchIdx]; Scalar So = 1.0 - Sg - solventSaturation_(); - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, So, Sg + solventSaturation_(), /*Sw=*/ 0.0, matParams); Scalar pg = po + (pC[gasPhaseIdx] - pC[oilPhaseIdx]); @@ -737,7 +737,7 @@ public: // switch to phase equilibrium mode because the oil phase appears. here // we also need the capillary pressures to calculate the oil phase // pressure using the gas phase pressure - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, /*So=*/0.0, @@ -767,7 +767,7 @@ public: // switch to phase equilibrium mode because the hydrocarbon gas phase // disappears. here we need the capillary pressures to calculate the oil // phase pressure using the gas phase pressure - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, /*So=*/0.0, @@ -817,7 +817,7 @@ public: // switch to phase equilibrium mode because the oil phase appears. here // we also need the capillary pressures to calculate the oil phase // pressure using the gas phase pressure - Scalar pC[numPhases] = { 0.0 }; + std::array pC = { 0.0 }; const MaterialLawParams& matParams = problem.materialLawParams(globalDofIdx); computeCapillaryPressures_(pC, /*So=*/0.0, diff --git a/opm/models/blackoil/blackoilsolventmodules.hh b/opm/models/blackoil/blackoilsolventmodules.hh index 39cbe7204..d2d15c4ac 100644 --- a/opm/models/blackoil/blackoilsolventmodules.hh +++ b/opm/models/blackoil/blackoilsolventmodules.hh @@ -924,7 +924,7 @@ public: const auto& problem = elemCtx.problem(); const PrimaryVariables& priVars = elemCtx.primaryVars(dofIdx, timeIdx); Evaluation pgMisc = 0.0; - Evaluation pC[numPhases]; + std::array pC; const auto& materialParams = problem.materialLawParams(elemCtx, dofIdx, timeIdx); MaterialLaw::capillaryPressures(pC, materialParams, fs);