16 #ifndef THERMAL_GASWATER_FLOW_PROBLEM_HPP 17 #define THERMAL_GASWATER_FLOW_PROBLEM_HPP 19 #include <opm/common/ErrorMacros.hpp> 20 #include <opm/common/utility/VectorWithDefaultAllocator.hpp> 21 #include <opm/common/utility/gpuDecorators.hpp> 22 #include <opm/common/utility/gpuistl_if_available.hpp> 31 template <
class Scalar,
template <
class>
class Storage = Opm::VectorWithDefaultAllocator>
40 Storage<Scalar> alpha1,
41 Storage<Scalar> alpha2,
46 , moduleParams_(moduleParams)
50 OPM_HOST_DEVICE Scalar getAlpha(
unsigned globalIndex,
unsigned boundaryFaceIndex)
const 52 if (boundaryFaceIndex == 0) {
53 return alpha0_[globalIndex];
54 }
else if (boundaryFaceIndex == 1) {
55 return alpha1_[globalIndex];
56 }
else if (boundaryFaceIndex == 2) {
57 return alpha2_[globalIndex];
59 OPM_THROW(std::logic_error,
"Invalid boundary face index");
72 Storage<Scalar>& alpha0()
77 Storage<Scalar>& alpha1()
82 Storage<Scalar>& alpha2()
88 Storage<Scalar> alpha0_;
89 Storage<Scalar> alpha1_;
90 Storage<Scalar> alpha2_;
97 template <
class Scalar>
103 GpuBuffer<Scalar>(cpuProblem.alpha0()),
104 GpuBuffer<Scalar>(cpuProblem.alpha1()),
105 GpuBuffer<Scalar>(cpuProblem.alpha2()),
106 ModuleParams {copy_to_gpu(cpuProblem.moduleParams().convectiveMixingModuleParam)});
109 template <
class Scalar>
115 make_view(buffer.alpha0()),
116 make_view(buffer.alpha1()),
117 make_view(buffer.alpha2()),
118 ModuleParams {make_view(buffer.moduleParams().convectiveMixingModuleParam)});
125 #endif // THERMAL_GASWATER_FLOW_PROBLEM_HPP Definition: ThermalGasWaterFlowProblem.hpp:32
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45