20#ifndef OPM_BLOCKED_MATRIX_HPP
21#define OPM_BLOCKED_MATRIX_HPP
23namespace Opm::Accelerator {
36 : nnzValues(new Scalar[nnzbs_*block_size_*block_size_])
37 , colIndices(new int[nnzbs_*block_size_*block_size_])
38 , rowPointers(new int[Nb_+1])
41 , block_size(block_size_)
43 , deleteSparsity(true)
49 : nnzValues(new Scalar[M.nnzbs*M.block_size*M.block_size])
50 , colIndices(M.colIndices)
51 , rowPointers(M.rowPointers)
54 , block_size(M.block_size)
56 , deleteSparsity(false)
67 Scalar* nnzValues_,
int *colIndices_,
int *rowPointers_)
68 : nnzValues(nnzValues_)
69 , colIndices(colIndices_)
70 , rowPointers(rowPointers_)
73 , block_size(block_size_)
75 , deleteSparsity(false)
94 unsigned int block_size;
105void sortRow(
int* colIndices,
int* data,
int left,
int right);
113template<
class Scalar>
114void blockMultSub(Scalar* a, Scalar* b, Scalar* c,
unsigned int block_size);
122template<
class Scalar>
123void blockMult(Scalar* mat1, Scalar* mat2, Scalar* resMat,
unsigned int block_size);
This struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition rocsparsePreconditioner.hpp:29
BlockedMatrix(int Nb_, int nnzbs_, unsigned int block_size_)
Allocate BlockedMatrix and data arrays with given sizes.
Definition BlockedMatrix.hpp:35
BlockedMatrix(const BlockedMatrix &M)
Allocate BlockedMatrix, but copy sparsity pattern instead of allocating new memory.
Definition BlockedMatrix.hpp:48
BlockedMatrix(int Nb_, int nnzbs_, unsigned int block_size_, Scalar *nnzValues_, int *colIndices_, int *rowPointers_)
Allocate BlockedMatrix, but let data arrays point to existing arrays.
Definition BlockedMatrix.hpp:66