/// This class serves to eliminate the need to include the WellContributions into the matrix (with --matrix-add-well-contributions=true) for the cusparseSolver
/// If the --matrix-add-well-contributions commandline parameter is true, this class should not be used
classWellContributions
{
private:
unsignedintnum_blocks=0;// total number of blocks in all wells
unsignedintdim;
unsignedintdim_wells;
unsignedintnum_wells=0;
unsignedintnum_blocks_so_far=0;
unsignedintnum_wells_so_far=0;
unsignedint*val_pointers=nullptr;// val_pointers[wellID] == index of first block for this well in Ccols and Bcols
boolallocated=false;
#if HAVE_CUDA
double*d_Cnnzs=nullptr;
double*d_Dnnzs=nullptr;
double*d_Bnnzs=nullptr;
int*d_Ccols=nullptr;
int*d_Bcols=nullptr;
double*d_z1=nullptr;
double*d_z2=nullptr;
unsignedint*d_val_pointers=nullptr;
cudaStream_tstream;
#endif
double*Cnnzs=nullptr;
double*Dnnzs=nullptr;
double*Bnnzs=nullptr;
int*Ccols=nullptr;
int*Dcols=nullptr;
int*Bcols=nullptr;
double*z1=nullptr;// z1 = B * x
double*z2=nullptr;// z2 = D^-1 * B * x
public:
#if HAVE_CUDA
/// Set a cudaStream to be used
/// \param[in] stream the cudaStream that is used to launch the kernel in
voidsetCudaStream(cudaStream_tstream);
#endif
/// Create a new WellContributions, implementation is empty