23#ifndef OPM_GPU_FLOW_GASWATER_ENERGY_CONTRACT_HPP
24#define OPM_GPU_FLOW_GASWATER_ENERGY_CONTRACT_HPP
28#include <opm/material/fluidmatrixinteractions/EclMaterialLawTwoPhaseTypes.hpp>
29#include <opm/material/fluidmatrixinteractions/EclTwoPhaseMaterial.hpp>
30#include <opm/material/fluidmatrixinteractions/GpuEclMaterialLawManager.hpp>
31#include <opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterial.hpp>
32#include <opm/material/fluidmatrixinteractions/PiecewiseLinearTwoPhaseMaterialParams.hpp>
33#include <opm/material/fluidsystems/BlackOilFluidSystemNonStatic.hpp>
34#include <opm/material/thermal/EclSpecrockLaw.hpp>
35#include <opm/material/thermal/EclSpecrockLawParams.hpp>
36#include <opm/material/thermal/EclThconrLaw.hpp>
37#include <opm/material/thermal/EclThconrLawParams.hpp>
38#include <opm/material/thermal/GpuEclThermalLawManager.hpp>
58template <
class TypeTag,
class MyTypeTag>
59struct EnableHysteresis;
60template <
class TypeTag,
class MyTypeTag>
61struct EnableEndpointScaling;
69struct FlowGasWaterEnergyProblem;
70struct FlowGasWaterEnergyProblemGPU;
80template <
template <
class>
class Storage>
81struct FlowGasWaterEnergyDeviceTypeTag {
82 using InheritsFrom = std::tuple<FlowGasWaterEnergyProblem>;
91template <
class ParentTypeTag>
92struct FlowGasWaterEnergyCpuDeviceContract {
93 using InheritsFrom = std::tuple<FlowGasWaterEnergyProblem>;
97using FlowGasWaterEnergyKernelBaseGPU = FlowGasWaterEnergyDeviceTypeTag<gpuistl::GpuView>;
98using FlowGasWaterEnergyDummyProblemGPU = FlowGasWaterEnergyDeviceTypeTag<gpuistl::GpuView>;
99using FlowGasWaterEnergyCpuKernelBase = FlowGasWaterEnergyCpuDeviceContract<FlowGasWaterEnergyProblem>;
101template <
template <
class>
class Storage>
102struct to_gpu_type<FlowGasWaterEnergyProblemGPU, Storage> {
103 using type = FlowGasWaterEnergyDeviceTypeTag<Storage>;
106template <
template <
class>
class Storage>
107struct to_gpu_type<FlowGasWaterEnergyProblem, Storage> {
108 using type = FlowGasWaterEnergyDeviceTypeTag<Storage>;
114template <
class TypeTag,
template <
class>
class Storage>
115struct EnableDiffusion<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
116 static constexpr bool value =
false;
119template <
class TypeTag,
template <
class>
class Storage>
120struct EnableDispersion<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
121 static constexpr bool value =
false;
124template <
class TypeTag,
template <
class>
class Storage>
125struct EnableSolvent<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
126 static constexpr bool value =
false;
129template <
class TypeTag,
template <
class>
class Storage>
130struct EnableExtbo<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
131 static constexpr bool value =
false;
134template <
class TypeTag,
template <
class>
class Storage>
135struct EnablePolymer<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
136 static constexpr bool value =
false;
139template <
class TypeTag,
template <
class>
class Storage>
140struct EnablePolymerMW<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
141 static constexpr bool value =
false;
144template <
class TypeTag,
template <
class>
class Storage>
145struct EnableFoam<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
146 static constexpr bool value =
false;
149template <
class TypeTag,
template <
class>
class Storage>
150struct EnableBrine<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
151 static constexpr bool value =
false;
154template <
class TypeTag,
template <
class>
class Storage>
155struct EnableSaltPrecipitation<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
156 static constexpr bool value =
false;
159template <
class TypeTag,
template <
class>
class Storage>
160struct EnableBioeffects<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
161 static constexpr bool value =
false;
164template <
class TypeTag,
template <
class>
class Storage>
165struct EnableMech<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
166 static constexpr bool value =
false;
169template <
class TypeTag,
template <
class>
class Storage>
170struct EnableGeochemistry<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
171 static constexpr bool value =
false;
174template <
class TypeTag,
template <
class>
class Storage>
175struct EnableConvectiveMixing<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
176 static constexpr bool value =
false;
179template <
class TypeTag,
template <
class>
class Storage>
180struct EnableEnergy<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
181 static constexpr bool value =
true;
185template <
class TypeTag,
class ParentTypeTag>
186struct EnableDiffusion<TypeTag, TTag::FlowGasWaterEnergyCpuDeviceContract<ParentTypeTag>> {
187 static constexpr bool value =
false;
190template <
class TypeTag,
class ParentTypeTag>
191struct EnableDispersion<TypeTag, TTag::FlowGasWaterEnergyCpuDeviceContract<ParentTypeTag>> {
192 static constexpr bool value =
false;
196template <
class TypeTag,
template <
class>
class Storage>
197struct MaterialLaw<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>>
200 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
201 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
202 using Traits = ThreePhaseMaterialTraits<Scalar,
203 FluidSystem::waterPhaseIdx,
204 FluidSystem::oilPhaseIdx,
205 FluidSystem::gasPhaseIdx,
206 getPropValue<TypeTag, Properties::EnableHysteresis>(),
207 getPropValue<TypeTag, Properties::EnableEndpointScaling>()>;
208 using TwoPhaseTraits = TwoPhaseMaterialTraits<Scalar,
209 Traits::wettingPhaseIdx,
210 Traits::nonWettingPhaseIdx>;
211 using TwoPhaseParams =
212 ::Opm::PiecewiseLinearTwoPhaseMaterialParams<TwoPhaseTraits, ::Opm::gpuistl::GpuView<const Scalar>>;
213 using TwoPhaseLaw = ::Opm::PiecewiseLinearTwoPhaseMaterial<TwoPhaseTraits, TwoPhaseParams>;
214 using GpuMaterialLawParams =
215 ::Opm::EclTwoPhaseMaterialParams<Traits,
220 using GpuMaterialLaw =
221 ::Opm::EclTwoPhaseMaterial<Traits, TwoPhaseLaw, TwoPhaseLaw, TwoPhaseLaw, GpuMaterialLawParams>;
224 using EclMaterialLawManager =
225 ::Opm::EclMaterialLaw::GpuManager<Traits,
228 ::Opm::VectorWithDefaultAllocator,
230 using type =
typename EclMaterialLawManager::MaterialLaw;
233template <
class TypeTag,
template <
class>
class Storage>
234struct PrimaryVariables<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
238template <
class TypeTag,
template <
class>
class Storage>
239struct FluidSystem<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
240 using type = ::Opm::BlackOilFluidSystemNonStatic<
241 GetPropType<TypeTag, Properties::Scalar>,
242 ::Opm::BlackOilDefaultFluidSystemIndices,
246template <
class TypeTag,
template <
class>
class Storage>
247struct SolidEnergyLaw<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>>
250 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
251 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
254 using EclThermalLawManager =
255 ::Opm::EclThermalLaw::GpuManager<Scalar, FluidSystem, ::Opm::gpuistl::GpuView, ::Opm::gpuistl::GpuView>;
256 using type = ::Opm::EclSpecrockLaw<Scalar, ::Opm::EclSpecrockLawParams<Scalar, ::Opm::gpuistl::GpuView>>;
259template <
class TypeTag,
template <
class>
class Storage>
260struct ThermalConductionLaw<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>>
263 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
264 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
267 using EclThermalLawManager =
268 ::Opm::EclThermalLaw::GpuManager<Scalar, FluidSystem, ::Opm::gpuistl::GpuView, ::Opm::gpuistl::GpuView>;
269 using type = ::Opm::EclThconrLaw<Scalar, FluidSystem>;
272template <
class TypeTag,
template <
class>
class Storage>
273struct Problem<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>>
276 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
277 using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
278 using MaterialLawManager =
typename GetProp<TypeTag, Properties::MaterialLaw>::EclMaterialLawManager;
279 using GpuViewMaterialLawManager =
280 ::Opm::EclMaterialLaw::GpuManager<
typename MaterialLawManager::Traits,
281 typename MaterialLawManager::GasOilLaw,
282 typename MaterialLawManager::OilWaterLaw,
284 typename MaterialLawManager::MaterialLaw>;
285 using GpuViewThermalLawManager =
286 ::Opm::EclThermalLaw::GpuManager<Scalar, FluidSystem, ::Opm::gpuistl::GpuView, ::Opm::gpuistl::GpuView>;
293template <
class TypeTag,
template <
class>
class Storage>
294struct ElementContext<TypeTag, TTag::FlowGasWaterEnergyDeviceTypeTag<Storage>> {
295 using type = std::nullptr_t;
GPU-compatible, simplified version of Opm::FlowProblem.
Declares the properties required by the black oil model.
Represents the primary variables used by the black-oil model.
Definition: blackoilprimaryvariables.hh:87
Minimal, GPU-compatible problem class.
Definition: GpuFlowProblem.hpp:137
The GpuView class is provides a view of some data allocated on the GPU Essenstially is only stores a ...
Definition: GpuView.hpp:53
A value stored with a pointer interface. Can be used to wrap objects in GPU kernels that were otherwi...
Definition: gpu_smart_pointer.hpp:420
Defines the common properties required by the porous medium multi-phase models.
Definition: blackoilmodel.hh:74
The Opm property system, traits with inheritance.
UndefinedProperty type
Definition: fvbaseproperties.hh:154
UndefinedProperty type
Definition: multiphasebaseproperties.hh:79
UndefinedProperty type
Definition: multiphasebaseproperties.hh:55
UndefinedProperty type
Definition: fvbaseproperties.hh:135
UndefinedProperty type
Definition: fvbaseproperties.hh:86
UndefinedProperty type
Definition: multiphasebaseproperties.hh:63
UndefinedProperty type
Definition: multiphasebaseproperties.hh:71