Opm::Accelerator::BlockedMatrix< Scalar > Class Template Reference

#include <BlockedMatrix.hpp>

Public Member Functions

 BlockedMatrix (int Nb_, int nnzbs_, unsigned int block_size_)
 
 BlockedMatrix (const BlockedMatrix &M)
 
 BlockedMatrix (int Nb_, int nnzbs_, unsigned int block_size_, Scalar *nnzValues_, int *colIndices_, int *rowPointers_)
 
 ~BlockedMatrix ()
 

Public Attributes

Scalar * nnzValues
 
int * colIndices
 
int * rowPointers
 
int Nb
 
int nnzbs
 
unsigned int block_size
 
bool deleteNnzs
 
bool deleteSparsity
 

Detailed Description

template<class Scalar>
class Opm::Accelerator::BlockedMatrix< Scalar >

This struct resembles a blocked csr matrix, like Dune::BCRSMatrix. The data is stored in contiguous memory, such that they can be copied to a device in one transfer.

Constructor & Destructor Documentation

◆ BlockedMatrix() [1/3]

template<class Scalar >
Opm::Accelerator::BlockedMatrix< Scalar >::BlockedMatrix ( int  Nb_,
int  nnzbs_,
unsigned int  block_size_ 
)
inline

Allocate BlockedMatrix and data arrays with given sizes

Parameters
[in]Nbnumber of blockrows
[in]nnzbsnumber of nonzero blocks
[in]block_sizethe number of rows and columns for each block

◆ BlockedMatrix() [2/3]

template<class Scalar >
Opm::Accelerator::BlockedMatrix< Scalar >::BlockedMatrix ( const BlockedMatrix< Scalar > &  M)
inline

Allocate BlockedMatrix, but copy sparsity pattern instead of allocating new memory

Parameters
[in]Mmatrix to be copied

◆ BlockedMatrix() [3/3]

template<class Scalar >
Opm::Accelerator::BlockedMatrix< Scalar >::BlockedMatrix ( int  Nb_,
int  nnzbs_,
unsigned int  block_size_,
Scalar *  nnzValues_,
int *  colIndices_,
int *  rowPointers_ 
)
inline

Allocate BlockedMatrix, but let data arrays point to existing arrays

Parameters
[in]Nbnumber of blockrows
[in]nnzbsnumber of nonzero blocks
[in]block_sizethe number of rows and columns for each block
[in]nnzValuesarray of nonzero values, contains nnzb*block_size*block_size scalars
[in]colIndicesarray of column indices, contains nnzb entries
[in]rowPointersarray of row pointers, contains Nb+1 entries

◆ ~BlockedMatrix()

Member Data Documentation

◆ block_size

template<class Scalar >
unsigned int Opm::Accelerator::BlockedMatrix< Scalar >::block_size

◆ colIndices

template<class Scalar >
int* Opm::Accelerator::BlockedMatrix< Scalar >::colIndices

◆ deleteNnzs

template<class Scalar >
bool Opm::Accelerator::BlockedMatrix< Scalar >::deleteNnzs

◆ deleteSparsity

template<class Scalar >
bool Opm::Accelerator::BlockedMatrix< Scalar >::deleteSparsity

◆ Nb

template<class Scalar >
int Opm::Accelerator::BlockedMatrix< Scalar >::Nb

◆ nnzbs

template<class Scalar >
int Opm::Accelerator::BlockedMatrix< Scalar >::nnzbs

◆ nnzValues

template<class Scalar >
Scalar* Opm::Accelerator::BlockedMatrix< Scalar >::nnzValues

◆ rowPointers

template<class Scalar >
int* Opm::Accelerator::BlockedMatrix< Scalar >::rowPointers

The documentation for this class was generated from the following file: