diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index c1254cc1f40..d09b5eac9a2 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -723,6 +723,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/models/blackoil/blackoillocalresidualtpfa.hh opm/models/blackoil/blackoilmeanings.hh opm/models/blackoil/blackoilmodel.hh + opm/models/blackoil/blackoilmoduleparams.hh opm/models/blackoil/blackoilnewtonmethod.hpp opm/models/blackoil/blackoilnewtonmethodparams.hpp opm/models/blackoil/blackoilonephaseindices.hh diff --git a/flowexperimental/BlackOilIntensiveQuantitiesGlobalIndex.hpp b/flowexperimental/BlackOilIntensiveQuantitiesGlobalIndex.hpp index abc8c375123..d11c7c5e0b6 100644 --- a/flowexperimental/BlackOilIntensiveQuantitiesGlobalIndex.hpp +++ b/flowexperimental/BlackOilIntensiveQuantitiesGlobalIndex.hpp @@ -524,6 +524,22 @@ class BlackOilIntensiveQuantitiesGlobalIndex throw std::logic_error("permFactor() is not yet implemented for compositional modeling"); } + /*! + * \brief Returns the fluid system used by this intensive quantities. + */ + OPM_HOST_DEVICE auto& getFluidSystem() const + { + return fluidState_.fluidSystem(); + } + + /*! + * \brief Returns a pointer to the fluid system used by this intensive quantities. + */ + OPM_HOST_DEVICE auto getFluidSystemPtr() const + { + return fluidState_.fluidSystemPtr(); + } + private: friend BlackOilSolventIntensiveQuantities; friend BlackOilExtboIntensiveQuantities; diff --git a/opm/models/blackoil/blackoilconvectivemixingmodule.hh b/opm/models/blackoil/blackoilconvectivemixingmodule.hh index 2db3f6cc5b6..77a55aaacec 100644 --- a/opm/models/blackoil/blackoilconvectivemixingmodule.hh +++ b/opm/models/blackoil/blackoilconvectivemixingmodule.hh @@ -40,6 +40,10 @@ #include #include +#include + +#include + #if HAVE_ECL_INPUT #include #endif @@ -48,6 +52,40 @@ namespace Opm { + template class Storage = Opm::VectorWithDefaultAllocator> + struct ConvectiveMixingModuleParam + { + Storage active_; + Storage Xhi_; + Storage Psi_; + }; + +#ifdef HAVE_CUDA +namespace gpuistl +{ + template + ConvectiveMixingModuleParam make_view(ConvectiveMixingModuleParam& params) + { + ConvectiveMixingModuleParam view; + view.active_ = gpuistl::make_view(params.active_); + view.Xhi_ = gpuistl::make_view(params.Xhi_); + view.Psi_ = gpuistl::make_view(params.Psi_); + return view; + } + + template + ConvectiveMixingModuleParam copy_to_gpu(const ConvectiveMixingModuleParam& params) + { + return ConvectiveMixingModuleParam{ + gpuistl::GpuBuffer(params.active_), + gpuistl::GpuBuffer(params.Xhi_), + gpuistl::GpuBuffer(params.Psi_) + }; + } +} + +#endif + /*! * \copydoc Opm::BlackOilConvectiveMixingModule * \brief Provides the convective term in the transport flux for the brine @@ -77,14 +115,12 @@ class BlackOilConvectiveMixingModule using IntensiveQuantities = GetPropType; public: - struct ConvectiveMixingModuleParam - {}; #if HAVE_ECL_INPUT static void beginEpisode(const EclipseState&, const Schedule&, const int, - ConvectiveMixingModuleParam&) + ConvectiveMixingModuleParam&) {} #endif @@ -96,7 +132,7 @@ public: const IntensiveQuantities&, const IntensiveQuantities&, const unsigned int, - const ConvectiveMixingModuleParam&) + const ConvectiveMixingModuleParam&) {} template @@ -118,7 +154,7 @@ public: const Scalar, const Scalar, const Scalar, - const ConvectiveMixingModuleParam&) + const ConvectiveMixingModuleParam&) {} }; @@ -133,6 +169,7 @@ class BlackOilConvectiveMixingModule using IntensiveQuantities = GetPropType; using GridView = GetPropType; using Toolbox = MathToolbox; + using ConvectiveMixingModuleParamT = ConvectiveMixingModuleParam; enum { conti0EqIdx = Indices::conti0EqIdx }; enum { dimWorld = GridView::dimensionworld }; @@ -142,18 +179,11 @@ class BlackOilConvectiveMixingModule static constexpr unsigned contiEnergyEqIdx = Indices::contiEnergyEqIdx; public: - struct ConvectiveMixingModuleParam - { - std::vector active_; - std::vector Xhi_; - std::vector Psi_; - }; - #if HAVE_ECL_INPUT static void beginEpisode(const EclipseState& eclState, const Schedule& schedule, const int episodeIdx, - ConvectiveMixingModuleParam& info) + ConvectiveMixingModuleParamT& info) { // check that Xhi and Psi didn't change std::size_t numRegions = eclState.runspec().tabdims().getNumPVTTables(); @@ -173,27 +203,29 @@ public: } #endif - static void modifyAvgDensity(Evaluation& rhoAvg, + template + OPM_HOST_DEVICE static void modifyAvgDensity(Evaluation& rhoAvg, const IntensiveQuantities& intQuantsIn, const IntensiveQuantities& intQuantsEx, const unsigned phaseIdx, const ConvectiveMixingModuleParam& info) { + const FluidSystem& fsys = intQuantsIn.getFluidSystem(); - if (info.active_.empty()) { + if (info.active_.size() == 0) { return; } if (!info.active_[intQuantsIn.pvtRegionIndex()] || !info.active_[intQuantsEx.pvtRegionIndex()]) { return; } - if (phaseIdx == FluidSystem::gasPhaseIdx) { + if (phaseIdx == fsys.gasPhaseIdx) { return; } const auto& liquidPhaseIdx = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPhaseIdx - : FluidSystem::oilPhaseIdx; + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPhaseIdx + : fsys.oilPhaseIdx; // Compute avg density based on pure water const auto& t_in = intQuantsIn.fluidState().temperature(liquidPhaseIdx); @@ -201,16 +233,16 @@ public: const auto& salt_in = intQuantsIn.fluidState().saltConcentration(); const auto& bLiquidIn = - FluidSystem::phaseIsActive(waterPhaseIdx) - ? FluidSystem::waterPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), + fsys.phaseIsActive(waterPhaseIdx) + ? fsys.waterPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), t_in, p_in, Evaluation(0.0), salt_in) - : FluidSystem::oilPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), + : fsys.oilPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), t_in, p_in, Evaluation(0.0)); const auto& refDensityLiquidIn = - FluidSystem::phaseIsActive(waterPhaseIdx) - ? FluidSystem::waterPvt().waterReferenceDensity(intQuantsIn.pvtRegionIndex()) - : FluidSystem::oilPvt().oilReferenceDensity(intQuantsIn.pvtRegionIndex()); + fsys.phaseIsActive(waterPhaseIdx) + ? fsys.waterPvt().waterReferenceDensity(intQuantsIn.pvtRegionIndex()) + : fsys.oilPvt().oilReferenceDensity(intQuantsIn.pvtRegionIndex()); const auto& rho_in = bLiquidIn * refDensityLiquidIn; @@ -219,16 +251,16 @@ public: const auto salt_ex = Toolbox::value(intQuantsEx.fluidState().saltConcentration()); const auto bLiquidEx = - FluidSystem::phaseIsActive(waterPhaseIdx) - ? FluidSystem::waterPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), + fsys.phaseIsActive(waterPhaseIdx) + ? fsys.waterPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), t_ex, p_ex, Scalar{0.0}, salt_ex) - : FluidSystem::oilPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), + : fsys.oilPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), t_ex, p_ex, Scalar{0.0}); const auto& refDensityLiquidEx = - FluidSystem::phaseIsActive(waterPhaseIdx) - ? FluidSystem::waterPvt().waterReferenceDensity(intQuantsEx.pvtRegionIndex()) - : FluidSystem::oilPvt().oilReferenceDensity(intQuantsEx.pvtRegionIndex()); + fsys.phaseIsActive(waterPhaseIdx) + ? fsys.waterPvt().waterReferenceDensity(intQuantsEx.pvtRegionIndex()) + : fsys.oilPvt().oilReferenceDensity(intQuantsEx.pvtRegionIndex()); const auto rho_ex = bLiquidEx * refDensityLiquidEx; @@ -236,7 +268,7 @@ public: } template - static void addConvectiveMixingFlux(RateVector& flux, + OPM_HOST_DEVICE static void addConvectiveMixingFlux(RateVector& flux, const Context& elemCtx, unsigned scvfIdx, unsigned timeIdx) @@ -275,7 +307,8 @@ public: * \brief Adds the convective mixing mass flux flux to the flux vector over a flux * integration point. */ - static void addConvectiveMixingFlux(RateVector& flux, + template + OPM_HOST_DEVICE static void addConvectiveMixingFlux(RateVectorT& flux, const IntensiveQuantities& intQuantsIn, const IntensiveQuantities& intQuantsEx, const unsigned globalIndexIn, @@ -285,7 +318,9 @@ public: const Scalar faceArea, const ConvectiveMixingModuleParam& info) { - if (info.active_.empty()) { + const FluidSystem& fsys = intQuantsIn.getFluidSystem(); + + if (info.active_.size() == 0) { return; } @@ -294,9 +329,9 @@ public: } const auto& liquidPhaseIdx = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPhaseIdx - : FluidSystem::oilPhaseIdx; + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPhaseIdx + : fsys.oilPhaseIdx; // interiour const auto& t_in = intQuantsIn.fluidState().temperature(liquidPhaseIdx); @@ -305,21 +340,21 @@ public: const auto& salt_in = intQuantsIn.fluidState().saltSaturation(); const auto bLiquidSatIn = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), t_in, p_in, rssat_in, salt_in) - : FluidSystem::oilPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), + : fsys.oilPvt().inverseFormationVolumeFactor(intQuantsIn.pvtRegionIndex(), t_in, p_in, rssat_in); const auto& densityLiquidIn = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPvt().waterReferenceDensity(intQuantsIn.pvtRegionIndex()) - : FluidSystem::oilPvt().oilReferenceDensity(intQuantsIn.pvtRegionIndex()); + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPvt().waterReferenceDensity(intQuantsIn.pvtRegionIndex()) + : fsys.oilPvt().oilReferenceDensity(intQuantsIn.pvtRegionIndex()); const auto rho_in = Opm::getValue(intQuantsIn.fluidState().invB(liquidPhaseIdx)) * densityLiquidIn; const auto rho_sat_in = bLiquidSatIn * (densityLiquidIn + - rssat_in * FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, + rssat_in * fsys.referenceDensity(fsys.gasPhaseIdx, intQuantsIn.pvtRegionIndex())); // exteriour @@ -328,21 +363,21 @@ public: const auto rssat_ex = Opm::getValue(intQuantsEx.saturatedDissolutionFactor()); const auto salt_ex = Opm::getValue(intQuantsEx.fluidState().saltSaturation()); const auto bLiquidSatEx = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), t_ex, p_ex, rssat_ex, salt_ex) - : FluidSystem::oilPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), + : fsys.oilPvt().inverseFormationVolumeFactor(intQuantsEx.pvtRegionIndex(), t_ex, p_ex, rssat_ex); const auto& densityLiquidEx = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) - ? FluidSystem::waterPvt().waterReferenceDensity(intQuantsEx.pvtRegionIndex()) - : FluidSystem::oilPvt().oilReferenceDensity(intQuantsEx.pvtRegionIndex()); + fsys.phaseIsActive(fsys.waterPhaseIdx) + ? fsys.waterPvt().waterReferenceDensity(intQuantsEx.pvtRegionIndex()) + : fsys.oilPvt().oilReferenceDensity(intQuantsEx.pvtRegionIndex()); const auto rho_ex = Opm::getValue(intQuantsEx.fluidState().invB(liquidPhaseIdx)) * densityLiquidEx; const auto rho_sat_ex = bLiquidSatEx * (densityLiquidEx + - rssat_ex * FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, + rssat_ex * fsys.referenceDensity(fsys.gasPhaseIdx, intQuantsEx.pvtRegionIndex())); // rho difference approximation const auto delta_rho = (rho_sat_ex + rho_sat_in - rho_in - rho_ex) / 2; @@ -363,7 +398,7 @@ public: const auto& rssat_up = (upIdx == interiorDofIdx) ? rssat_in : rssat_ex; unsigned globalUpIndex = (upIdx == interiorDofIdx) ? globalIndexIn : globalIndexEx; const auto& Rsup = - FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) + fsys.phaseIsActive(fsys.waterPhaseIdx) ? up.fluidState().Rsw() : up.fluidState().Rs(); @@ -376,7 +411,7 @@ public: const auto convectiveFlux = -trans * transMult * info.Xhi_[up.pvtRegionIndex()] * invB * pressure_difference_convective_mixing * RsupRestricted / (visc * faceArea); - unsigned activeGasCompIdx = FluidSystem::canonicalToActiveCompIdx(FluidSystem::gasCompIdx); + unsigned activeGasCompIdx = fsys.canonicalToActiveCompIdx(fsys.gasCompIdx); if (globalUpIndex == globalIndexIn) { flux[conti0EqIdx + activeGasCompIdx] += convectiveFlux; } @@ -386,7 +421,7 @@ public: if constexpr (enableEnergy) { const auto& h = up.fluidState().enthalpy(liquidPhaseIdx) * - FluidSystem::referenceDensity(FluidSystem::gasPhaseIdx, up.pvtRegionIndex()); + fsys.referenceDensity(fsys.gasPhaseIdx, up.pvtRegionIndex()); if (globalUpIndex == globalIndexIn) { flux[contiEnergyEqIdx] += convectiveFlux * h; } @@ -434,7 +469,7 @@ public: SoMax); } - const Evaluation& saturatedDissolutionFactor() const + OPM_HOST_DEVICE const Evaluation& saturatedDissolutionFactor() const { return saturatedDissolutionFactor_; } protected: diff --git a/opm/models/blackoil/blackoilintensivequantities.hh b/opm/models/blackoil/blackoilintensivequantities.hh index abc20c214a9..3d935c14404 100644 --- a/opm/models/blackoil/blackoilintensivequantities.hh +++ b/opm/models/blackoil/blackoilintensivequantities.hh @@ -818,6 +818,22 @@ public: } } + /*! + * \brief Returns the fluid system used by this intensive quantities. + */ + OPM_HOST_DEVICE auto& getFluidSystem() const + { + return fluidState_.fluidSystem(); + } + + /*! + * \brief Returns a pointer to the fluid system used by this intensive quantities. + */ + OPM_HOST_DEVICE auto getFluidSystemPtr() const + { + return fluidState_.fluidSystemPtr(); + } + private: friend BlackOilSolventIntensiveQuantities; friend BlackOilExtboIntensiveQuantities; diff --git a/opm/models/blackoil/blackoillocalresidualtpfa.hh b/opm/models/blackoil/blackoillocalresidualtpfa.hh index a8a968f6989..c95ad66dc56 100644 --- a/opm/models/blackoil/blackoillocalresidualtpfa.hh +++ b/opm/models/blackoil/blackoillocalresidualtpfa.hh @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +118,7 @@ class BlackOilLocalResidualTPFA : public GetPropType; using DiffusionModule = BlackOilDiffusionModule; using ConvectiveMixingModule = BlackOilConvectiveMixingModule; - using ConvectiveMixingModuleParam = typename ConvectiveMixingModule::ConvectiveMixingModuleParam; + using ModuleParams = BlackoilModuleParams>; using DispersionModule = BlackOilDispersionModule; using BioeffectsModule = BlackOilBioeffectsModule; @@ -140,11 +141,6 @@ public: ConditionalStorage dispersivity; }; - struct ModuleParams - { - ConvectiveMixingModuleParam convectiveMixingModuleParam; - }; - /*! * \copydoc FvBaseLocalResidual::computeStorage */ diff --git a/opm/models/blackoil/blackoilmoduleparams.hh b/opm/models/blackoil/blackoilmoduleparams.hh new file mode 100644 index 00000000000..99e35d344ac --- /dev/null +++ b/opm/models/blackoil/blackoilmoduleparams.hh @@ -0,0 +1,27 @@ +/* + Copyright 2025 Equinor ASA + This file is part of the Open Porous Media project (OPM). + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_MODELS_BLACKOIL_MODULEPARAM_HH +#define OPM_MODELS_BLACKOIL_MODULEPARAM_HH + +namespace Opm { + template + struct BlackoilModuleParams + { + ConvectiveMixingModuleParamT convectiveMixingModuleParam; + }; +} // namespace Opm + +#endif // OPM_MODELS_BLACKOIL_MODULEPARAM_HH diff --git a/opm/simulators/flow/FlowProblemBlackoil.hpp b/opm/simulators/flow/FlowProblemBlackoil.hpp index e7eb1f84ba4..46c55956268 100644 --- a/opm/simulators/flow/FlowProblemBlackoil.hpp +++ b/opm/simulators/flow/FlowProblemBlackoil.hpp @@ -39,7 +39,8 @@ #include #include -#include +#include +#include #include @@ -149,7 +150,7 @@ class FlowProblemBlackoil : public FlowProblem using DispersionModule = BlackOilDispersionModule; using DiffusionModule = BlackOilDiffusionModule; using ConvectiveMixingModule = BlackOilConvectiveMixingModule; - using ModuleParams = typename BlackOilLocalResidualTPFA::ModuleParams; + using ModuleParams = BlackoilModuleParams>; using HybridNewton = BlackOilHybridNewton; using InitialFluidState = typename EquilInitializer::ScalarFluidState; diff --git a/opm/simulators/flow/NewTranFluxModule.hpp b/opm/simulators/flow/NewTranFluxModule.hpp index 94b49b4944a..c13a4e283d0 100644 --- a/opm/simulators/flow/NewTranFluxModule.hpp +++ b/opm/simulators/flow/NewTranFluxModule.hpp @@ -44,7 +44,10 @@ #include #include #include -#include +#include +#include + +#include #include @@ -132,12 +135,12 @@ class NewTranExtensiveQuantities using DimMatrix = Dune::FieldMatrix; using ConvectiveMixingModule = BlackOilConvectiveMixingModule; - using ModuleParams = typename BlackOilLocalResidualTPFA::ModuleParams; + using ModuleParams = BlackoilModuleParams>; public: /*! * \brief Return the intrinsic permeability tensor at a face [m^2] */ - const DimMatrix& intrinsicPermeability() const + OPM_HOST_DEVICE const DimMatrix& intrinsicPermeability() const { throw std::invalid_argument("The ECL transmissibility module does not provide an explicit intrinsic permeability"); } @@ -148,7 +151,7 @@ class NewTranExtensiveQuantities * * \param phaseIdx The index of the fluid phase */ - const EvalDimVector& potentialGrad(unsigned) const + OPM_HOST_DEVICE const EvalDimVector& potentialGrad(unsigned) const { throw std::invalid_argument("The ECL transmissibility module does not provide explicit potential gradients"); } @@ -159,7 +162,7 @@ class NewTranExtensiveQuantities * * \param phaseIdx The index of the fluid phase */ - const Evaluation& pressureDifference(unsigned phaseIdx) const + OPM_HOST_DEVICE const Evaluation& pressureDifference(unsigned phaseIdx) const { return pressureDifference_[phaseIdx]; } /*! @@ -168,7 +171,7 @@ class NewTranExtensiveQuantities * * \param phaseIdx The index of the fluid phase */ - const EvalDimVector& filterVelocity(unsigned) const + OPM_HOST_DEVICE const EvalDimVector& filterVelocity(unsigned) const { throw std::invalid_argument("The ECL transmissibility module does not provide explicit filter velocities"); } @@ -182,7 +185,7 @@ class NewTranExtensiveQuantities * * \param phaseIdx The index of the fluid phase */ - const Evaluation& volumeFlux(unsigned phaseIdx) const + OPM_HOST_DEVICE const Evaluation& volumeFlux(unsigned phaseIdx) const { return volumeFlux_[phaseIdx]; } protected: @@ -193,7 +196,7 @@ class NewTranExtensiveQuantities * i.e., the DOF which exhibits a higher effective pressure for * the given phase. */ - unsigned upstreamIndex_(unsigned phaseIdx) const + OPM_HOST_DEVICE unsigned upstreamIndex_(unsigned phaseIdx) const { assert(phaseIdx < numPhases); @@ -207,22 +210,22 @@ class NewTranExtensiveQuantities * i.e., the DOF which exhibits a lower effective pressure for the * given phase. */ - unsigned downstreamIndex_(unsigned phaseIdx) const + OPM_HOST_DEVICE unsigned downstreamIndex_(unsigned phaseIdx) const { assert(phaseIdx < numPhases); return dnIdx_[phaseIdx]; } - void updateSolvent(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) + OPM_HOST_DEVICE void updateSolvent(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) { asImp_().updateVolumeFluxTrans(elemCtx, scvfIdx, timeIdx); } - void updatePolymer(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) + OPM_HOST_DEVICE void updatePolymer(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) { asImp_().updateShearMultipliers(elemCtx, scvfIdx, timeIdx); } public: - static void volumeAndPhasePressureDifferences(std::array& upIdx, + OPM_HOST_DEVICE static void volumeAndPhasePressureDifferences(std::array& upIdx, std::array& dnIdx, Evaluation (&volumeFlux)[numPhases], Evaluation (&pressureDifferences)[numPhases], @@ -307,7 +310,7 @@ class NewTranExtensiveQuantities } template - static void calculatePhasePressureDiff_(short& upIdx, + OPM_HOST_DEVICE static void calculatePhasePressureDiff_(short& upIdx, short& dnIdx, EvalType& pressureDifference, const IntensiveQuantities& intQuantsIn, @@ -414,7 +417,7 @@ class NewTranExtensiveQuantities /*! * \brief Update the required gradients for interior faces */ - void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) + OPM_HOST_DEVICE void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx) { Valgrind::SetUndefined(*this); @@ -425,7 +428,7 @@ class NewTranExtensiveQuantities * \brief Update the required gradients for boundary faces */ template - void calculateBoundaryGradients_(const ElementContext& elemCtx, + OPM_HOST_DEVICE void calculateBoundaryGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx, const FluidState& exFluidState) @@ -469,7 +472,7 @@ class NewTranExtensiveQuantities * \brief Update the required gradients for boundary faces */ template - static void calculateBoundaryGradients_(const Problem& problem, + OPM_HOST_DEVICE static void calculateBoundaryGradients_(const Problem& problem, const unsigned globalSpaceIdx, const IntensiveQuantities& intQuantsIn, const unsigned bfIdx, @@ -568,10 +571,10 @@ class NewTranExtensiveQuantities /*! * \brief Update the volumetric fluxes for all fluid phases on the interior faces of the context */ - void calculateFluxes_(const ElementContext&, unsigned, unsigned) + OPM_HOST_DEVICE void calculateFluxes_(const ElementContext&, unsigned, unsigned) { } - void calculateBoundaryFluxes_(const ElementContext&, unsigned, unsigned) + OPM_HOST_DEVICE void calculateBoundaryFluxes_(const ElementContext&, unsigned, unsigned) {} private: