Add useWellConn parameter to WellContributions()

This commit is contained in:
Tong Dong Qiu 2021-06-02 14:55:15 +02:00
parent 4c870373c9
commit 5918c64b54
3 changed files with 5 additions and 3 deletions

View File

@ -262,7 +262,7 @@ namespace Opm
bool use_fpga = bdaBridge->getUseFpga();
if (use_gpu || use_fpga) {
const std::string accelerator_mode = EWOMS_GET_PARAM(TypeTag, std::string, AcceleratorMode);
WellContributions wellContribs(accelerator_mode);
WellContributions wellContribs(accelerator_mode, useWellConn_);
bdaBridge->initWellContributions(wellContribs);
if (!useWellConn_) {

View File

@ -28,7 +28,7 @@
namespace Opm
{
WellContributions::WellContributions(std::string accelerator_mode){
WellContributions::WellContributions(std::string accelerator_mode, bool useWellConn){
if(accelerator_mode.compare("cusparse") == 0){
cuda_gpu = true;
}

View File

@ -173,7 +173,9 @@ public:
void alloc();
/// Create a new WellContributions
WellContributions(std::string accelerator_mode);
/// \param[in] accelerator_mode string indicating which solverBackend is used
/// \param[in] useWellConn true iff wellcontributions are added to the matrix
WellContributions(std::string accelerator_mode, bool useWellConn);
/// Destroy a WellContributions, and free memory
~WellContributions();