Reduced header inclusion, also moved WellContributions OpenCL initialization

This commit is contained in:
Tong Dong Qiu
2021-02-23 12:31:09 +01:00
parent a5c5dc2ec9
commit 748dc4ccb3
3 changed files with 43 additions and 17 deletions

View File

@@ -250,12 +250,9 @@ namespace Opm
if (use_gpu) {
const std::string gpu_mode = EWOMS_GET_PARAM(TypeTag, std::string, GpuMode);
WellContributions wellContribs(gpu_mode);
#if HAVE_OPENCL
if(gpu_mode.compare("opencl") == 0){
const auto openclBackend = static_cast<const bda::openclSolverBackend<block_size>*>(&bdaBridge->getBackend());
wellContribs.setOpenCLEnv(openclBackend->context.get(), openclBackend->queue.get());
}
#endif
bdaBridge->initWellContributions(wellContribs);
if (!useWellConn_) {
simulator_.problem().wellModel().getWellContributions(wellContribs);
}