Removed unused variables. Changed initializerlist order for readability.

This commit is contained in:
T.D. (Tongdong) Qiu 2020-05-18 16:10:19 +02:00
parent dcbba53510
commit 0f273ebdf6
2 changed files with 11 additions and 6 deletions

View File

@ -41,14 +41,20 @@ namespace Opm
unsigned int BnumBlocks_, double *Bvalues, unsigned int *BcolIndices, unsigned int *BrowPointers,
unsigned int DnumBlocks_, double *Dvalues, int *DcolPointers, int *DrowIndices,
double *Cvalues)
: dim(dim_), dim_wells(dim_wells_), N(Nb_*dim), Nb(Nb_), M(Mb_*dim_wells), Mb(Mb_), DnumBlocks(DnumBlocks_), BnumBlocks(BnumBlocks_)
:
dim(dim_),
dim_wells(dim_wells_),
N(Nb_*dim),
Nb(Nb_),
M(Mb_*dim_wells),
Mb(Mb_),
DnumBlocks(DnumBlocks_),
BnumBlocks(BnumBlocks_)
{
Cvals.insert(Cvals.end(), Cvalues, Cvalues + BnumBlocks*dim*dim_wells);
Dvals.insert(Dvals.end(), Dvalues, Dvalues + DnumBlocks*dim_wells*dim_wells);
Bvals.insert(Bvals.end(), Bvalues, Bvalues + BnumBlocks*dim*dim_wells);
Ccols.insert(Ccols.end(), BcolIndices, BcolIndices + BnumBlocks);
Bcols.insert(Bcols.end(), BcolIndices, BcolIndices + BnumBlocks);
Crows.insert(Crows.end(), BrowPointers, BrowPointers + M + 1);
Brows.insert(Brows.end(), BrowPointers, BrowPointers + M + 1);
Dcols.insert(Dcols.end(), DcolPointers, DcolPointers + M + 1);

View File

@ -50,16 +50,15 @@ namespace Opm
cudaStream_t stream;
double *h_x = nullptr, *h_y = nullptr; // CUDA pinned memory for GPU memcpy
// C and B are stored in BCRS format, D is stored in CSC format (Dune::UMFPack).
// C and B are stored in BCRS format, D is stored in CSC format (Dune::UMFPack)
// Sparsity pattern for C is not stored, since it is the same as B
unsigned int DnumBlocks;
unsigned int BnumBlocks;
std::vector<double> Cvals;
std::vector<double> Dvals;
std::vector<double> Bvals;
std::vector<unsigned int> Ccols;
std::vector<int> Dcols; // Columnpointers, contains M+1 entries
std::vector<unsigned int> Bcols;
std::vector<unsigned int> Crows;
std::vector<int> Drows; // Rowindicies, contains DnumBlocks*dim*dim_wells entries
std::vector<unsigned int> Brows;
std::vector<double> z1; // z1 = B * x