Opm::Accelerator::BlockedMatrix Class 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_, double *nnzValues_, int *colIndices_, int *rowPointers_)
 
 ~BlockedMatrix ()
 

Public Attributes

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

Detailed Description

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]

Opm::Accelerator::BlockedMatrix::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]

Opm::Accelerator::BlockedMatrix::BlockedMatrix ( const BlockedMatrix M)
inline

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

Parameters
[in]Mmatrix to be copied

◆ BlockedMatrix() [3/3]

Opm::Accelerator::BlockedMatrix::BlockedMatrix ( int  Nb_,
int  nnzbs_,
unsigned int  block_size_,
double *  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()

Opm::Accelerator::BlockedMatrix::~BlockedMatrix ( )
inline

Member Data Documentation

◆ block_size

unsigned int Opm::Accelerator::BlockedMatrix::block_size

◆ colIndices

int* Opm::Accelerator::BlockedMatrix::colIndices

Referenced by ~BlockedMatrix().

◆ deleteNnzs

bool Opm::Accelerator::BlockedMatrix::deleteNnzs

Referenced by ~BlockedMatrix().

◆ deleteSparsity

bool Opm::Accelerator::BlockedMatrix::deleteSparsity

Referenced by ~BlockedMatrix().

◆ Nb

int Opm::Accelerator::BlockedMatrix::Nb

◆ nnzbs

int Opm::Accelerator::BlockedMatrix::nnzbs

◆ nnzValues

double* Opm::Accelerator::BlockedMatrix::nnzValues

Referenced by ~BlockedMatrix().

◆ rowPointers

int* Opm::Accelerator::BlockedMatrix::rowPointers

Referenced by ~BlockedMatrix().


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