/// 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
/// So far, StandardWell and MultisegmentWell are supported
/// A single instance (or pointer) of this class is passed to the cusparseSolver.
/// For StandardWell, this class contains all the data and handles the computation. For MultisegmentWell, the vector 'multisegments' contains all the data. For more information, check the MultisegmentWellContribution class.
/// A StandardWell uses C, D and B and performs y -= (C^T * (D^-1 * (B*x)))
/// B and C are vectors, disguised as matrices and contain blocks of StandardWell::numEq by StandardWell::numStaticWellEq
/// D is a block, disguised as matrix, the square block has size StandardWell::numStaticWellEq. D is actually stored as D^-1
/// B*x and D*B*x are a vector with numStaticWellEq doubles
/// C*D*B*x is a blocked matrix with a symmetric sparsity pattern, contains square blocks with size numEq. For every columnindex i, j in StandardWell::duneB_, there is a block on (i, j) in C*D*B*x.
///
/// This class is used in 3 phases:
/// - get total size of all wellcontributions that must be stored here
/// - allocate memory
/// - copy data of wellcontributions
classWellContributions
{
private:
unsignedintnum_blocks=0;// total number of blocks in all wells
unsignedintdim;// number of columns in blocks in B and C, equal to StandardWell::numEq
unsignedintdim_wells;// number of rows in blocks in B and C, equal to StandardWell::numStaticWellEq
unsignedintnum_std_wells=0;// number of StandardWells in this object
unsignedintnum_ms_wells=0;// number of MultisegmentWells in this object, must equal multisegments.size()
unsignedintnum_blocks_so_far=0;// keep track of where next data is written
unsignedintnum_std_wells_so_far=0;// keep track of where next data is written
unsignedint*val_pointers=nullptr;// val_pointers[wellID] == index of first block for this well in Ccols and Bcols
unsignedintN;// number of rows (not blockrows) in vectors x and y