Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bitpit::SparseMatrix Class Reference

Sparse matrix. More...

Collaboration diagram for bitpit::SparseMatrix:
Collaboration graph
[legend]

Public Member Functions

 SparseMatrix ()
 
 SparseMatrix (const SparseMatrix &other)
 
 SparseMatrix (int blockSize, long nRows, long nCols, long nNZ)
 
 SparseMatrix (long nRows, long nCols, long nNZ)
 
 SparseMatrix (MPI_Comm communicator)
 
 SparseMatrix (MPI_Comm communicator, bool partitioned, int blockSize, long nRows, long nCols, long nNZ)
 
 SparseMatrix (MPI_Comm communicator, bool partitioned, long nRows, long nCols, long nNZ)
 
 SparseMatrix (SparseMatrix &&other)=default
 
 ~SparseMatrix ()
 
void addRow (const std::vector< long > &rowPattern, const std::vector< double > &rowValues)
 
void addRow (long nRowNZ, const long *rowPattern, const double *rowValues)
 
void assembly ()
 
void clear (bool release=false)
 
std::unique_ptr< SparseMatrixcomputeTranspose () const
 
long countAddedRows () const
 
long countMissingRows () const
 
virtual void display (std::ostream &stream, double negligiblity, int indent=0) const
 
std::vector< long > extractGhostGlobalCols () const
 
std::vector< long > extractGhostGlobalRows () const
 
std::vector< long > extractLocalGlobalCols () const
 
std::vector< long > extractLocalGlobalRows () const
 
int getBlockSize () const
 
long getColCount () const
 
long getColElementCount () const
 
long getColGlobalCount () const
 
long getColGlobalElementCount () const
 
long getColGlobalElementOffset () const
 
long getColGlobalOffset () const
 
const MPI_Comm & getCommunicator () const
 
long getMaxRowNZCount () const
 
long getMaxRowNZElementCount () const
 
long getMaxRowNZGlobalCount () const
 
long getMaxRowNZGlobalElementCount () const
 
long getNZCount () const
 
long getNZElementCount () const
 
long getNZGlobalCount () const
 
long getNZGlobalElementCount () const
 
long getRowCount () const
 
long getRowElementCount () const
 
long getRowGlobalCount () const
 
long getRowGlobalElementCount () const
 
long getRowGlobalElementOffset () const
 
long getRowGlobalOffset () const
 
long getRowNZCount (long row) const
 
long getRowNZElementCount (long row) const
 
ConstProxyVector< long > getRowPattern (long row) const
 
void getRowPattern (long row, ConstProxyVector< long > *pattern) const
 
ConstProxyVector< double > getRowValues (long row) const
 
void getRowValues (long row, ConstProxyVector< double > *values) const
 
void initialize (bool partitioned, int blockSize, long nRows, long nCols, long nNZ)
 
void initialize (bool partitioned, long nRows, long nCols, long nNZ)
 
void initialize (int blockSize, long nRows, long nCols, long nNZ)
 
void initialize (long nRows, long nCols, long nNZ)
 
bool isAssembled () const
 
bool isPartitioned () const
 
void squeeze ()
 

Protected Member Functions

void clearPatternStorage (bool release)
 
void clearValueStorage (bool release)
 
long * getRowPatternData (long row)
 
const long * getRowPatternData (long row) const
 
double * getRowValuesData (long row)
 
const double * getRowValuesData (long row) const
 
void initializePatternStorage ()
 
void initializeValueStorage ()
 
void squeezePatternStorage ()
 
void squeezeValueStorage ()
 

Protected Attributes

bool m_assembled
 
int m_blockSize
 
MPI_Comm m_communicator
 
long m_global_colOffset
 
long m_global_maxRowNZ
 
long m_global_nCols
 
long m_global_nNZ
 
long m_global_nRows
 
long m_global_rowOffset
 
long m_lastRow
 
long m_maxRowNZ
 
long m_nCols
 
long m_nNZ
 
long m_nRows
 
bool m_partitioned
 
FlatVector2D< long > m_pattern
 
std::vector< double > m_values
 

Detailed Description

Sparse matrix.

Rather than working with individual elements in the matrix, it is possible to employ blocks of elements. The size of the blocks can be defined during assembly. When a size different that one is provided, the matrix will store elements by fixed-sized dense nb × nb blocks, where nb is the size of the blocks. Blocking may be advantageous when solving PDE-based simulations that leads to matrices with a naturally blocked structure (with a block size equal to the number of degrees of freedom per cell).

When blocking is used, row and column indexes will count the number of blocks in the row/column direction, not the number of rows/columns of the matrix.

Examples
LA_example_00001.cpp, and RBF_example_00001.cpp.

Definition at line 38 of file system_matrix.hpp.

Constructor & Destructor Documentation

◆ SparseMatrix() [1/7]

bitpit::SparseMatrix::SparseMatrix ( )

The SparseMatrix class mimics the beahviour of the sparse parallel matrix in AIJ/BAIJ format of the PETSc library.

The parallel matrix is partitioned across processes such that the first m0 rows belong to process 0, the next m1 rows belong to process 1, the next m2 rows belong to process 2 etc.. where m0, m1, m2,.. are the local number of rows defined by each processes.

Each process stores values corresponding to [m x N] submatrix, wher N is the global number of columns of the matrix, N is obtained summing the local number of columns of each process.

Although each process stores values for the whole global row, columns are logically partitioned across processes, with the n0 columns belonging to 0th partition, the next n1 columns belonging to the next partition etc.. where n0, n1, n2... are the local number of columns defined by each process.

The DIAGONAL portion of the local submatrix on any given process is the submatrix corresponding to the rows and columns m,n corresponding to the given process. i.e diagonal matrix on process 0 is [m0 x n0], diagonal matrix on process 1 is [m1 x n1] etc. The remaining portion of the local submatrix [m x (N-n)] constitute the OFF-DIAGONAL portion.

For a square global matrix we define each process's diagonal portion to be its local rows and the corresponding columns (a square submatrix); each process's off-diagonal portion encompasses the remainder of the local matrix (a rectangular submatrix). Default constructor

Definition at line 84 of file system_matrix.cpp.

◆ SparseMatrix() [2/7]

bitpit::SparseMatrix::SparseMatrix ( long nRows,
long nCols,
long nNZ )

Constructor

Parameters
nRowsis the number of rows of the matrix
nColsis the number of columns of the matrix
nNZis the number of non-zero elements that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 127 of file system_matrix.cpp.

◆ SparseMatrix() [3/7]

bitpit::SparseMatrix::SparseMatrix ( int blockSize,
long nRows,
long nCols,
long nNZ )

Constructor

Parameters
blockSizeis the block size of the matrix
nRowsis the number of rows of the matrix
nColsis the number of columns of the matrix
nNZis the number of non-zero blocks that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 144 of file system_matrix.cpp.

◆ SparseMatrix() [4/7]

bitpit::SparseMatrix::SparseMatrix ( MPI_Comm communicator)

Constructor

Parameters
communicatoris the MPI communicator

Definition at line 94 of file system_matrix.cpp.

◆ SparseMatrix() [5/7]

bitpit::SparseMatrix::SparseMatrix ( MPI_Comm communicator,
bool partitioned,
long nRows,
long nCols,
long nNZ )

Constructor

Parameters
communicatoris the MPI communicator
partitionedcontrols if the matrix is partitioned
nRowsis the number rows of the matrix, if the matrix is partitioned this is the number of local rows
nColsis the number columns of the matrix, if the matrix is partitioned this is the number of local columns
nNZis the number of non-zero elements that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 164 of file system_matrix.cpp.

◆ SparseMatrix() [6/7]

bitpit::SparseMatrix::SparseMatrix ( MPI_Comm communicator,
bool partitioned,
int blockSize,
long nRows,
long nCols,
long nNZ )

Constructor

Parameters
communicatoris the MPI communicator
partitionedcontrols if the matrix is partitioned
blockSizeis the block size of the matrix
nRowsis the number rows of the matrix, if the matrix is partitioned this is the number of local rows
nColsis the number columns of the matrix, if the matrix is partitioned this is the number of local columns
nNZis the number of non-zero blocks that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 186 of file system_matrix.cpp.

◆ SparseMatrix() [7/7]

bitpit::SparseMatrix::SparseMatrix ( const SparseMatrix & other)

Copy constructor

Definition at line 231 of file system_matrix.cpp.

◆ ~SparseMatrix()

bitpit::SparseMatrix::~SparseMatrix ( )

Destructor

Definition at line 257 of file system_matrix.cpp.

Member Function Documentation

◆ addRow() [1/2]

void bitpit::SparseMatrix::addRow ( const std::vector< long > & rowPattern,
const std::vector< double > & rowValues )

Add a row.

The values of the row are stored using a block-row-major order: the rows of the single block elements are stored consecutively:

  <row_1_block_1><row_1_block_2>...<row_2_block_1><row_2_block_2>...
Parameters
rowPatternare the indexes of the non-zero columns of the matrix
rowValuesare the values of the non-zero columns of the matrix

Definition at line 1214 of file system_matrix.cpp.

◆ addRow() [2/2]

void bitpit::SparseMatrix::addRow ( long nRowNZ,
const long * rowPattern,
const double * rowValues )

Add a row.

The values of the row are stored using a block-row-major order: the rows of the single block elements are stored consecutively:

  <row_1_block_1><row_1_block_2>...<row_2_block_1><row_2_block_2>...
Parameters
nRowNZis the number of non-zero elements in the row
rowPatternare the indexes of the non-zero columns of the matrix
rowValuesare the values of the non-zero columns of the matrix

Definition at line 1231 of file system_matrix.cpp.

◆ assembly()

void bitpit::SparseMatrix::assembly ( )

Assembly the matrix.

This function should be called after adding all the rows of the matrix. Its purpose is to prepare the matrix for the usage.

It's a collective operation, hence it has to be called by all processes.

Definition at line 737 of file system_matrix.cpp.

◆ clear()

void bitpit::SparseMatrix::clear ( bool release = false)

Clear the matrix.

Parameters
releaseif set to true the memory hold by the matrix will be released

Definition at line 429 of file system_matrix.cpp.

◆ clearPatternStorage()

void bitpit::SparseMatrix::clearPatternStorage ( bool release)
protected

Clear the storage for the pattern.

Parameters
releaseif set to true the memory hold by the pattern storage will be released

Definition at line 675 of file system_matrix.cpp.

◆ clearValueStorage()

void bitpit::SparseMatrix::clearValueStorage ( bool release)
protected

Clear the storage for the values.

Parameters
releaseif set to true the memory hold by the value storage will be released

Definition at line 717 of file system_matrix.cpp.

◆ computeTranspose()

std::unique_ptr< SparseMatrix > bitpit::SparseMatrix::computeTranspose ( ) const

Compute the transpose of the matrix.

The transpose is evaluated as a new matrix, the current matrix is not modified.

Returns
The transpose of the matrix.

Definition at line 1387 of file system_matrix.cpp.

◆ countAddedRows()

long bitpit::SparseMatrix::countAddedRows ( ) const

Count the number of rows that have been added to the matrix.

Returns
The number of rows that have been added to the matrix.

Definition at line 792 of file system_matrix.cpp.

◆ countMissingRows()

long bitpit::SparseMatrix::countMissingRows ( ) const

Count the number of rows that needs to be added to fill the matrix.

Returns
The number of rows that needs to be added to fill the matrix.

Definition at line 779 of file system_matrix.cpp.

◆ display()

void bitpit::SparseMatrix::display ( std::ostream & stream,
double negligiblity,
int indent = 0 ) const
virtual

Displays matrix information.

Parameters
streamis the output stream
negligiblityis the threshold below which the values are considered negligible
[in]indentis the number of spaces to prepend to each row

Definition at line 474 of file system_matrix.cpp.

◆ extractGhostGlobalCols()

std::vector< long > bitpit::SparseMatrix::extractGhostGlobalCols ( ) const

Extract the list of ghost global columns.

Returns
The the list of ghost global columns.

Definition at line 1181 of file system_matrix.cpp.

◆ extractGhostGlobalRows()

std::vector< long > bitpit::SparseMatrix::extractGhostGlobalRows ( ) const

Extract the list of ghost global rows.

Returns
The the list of ghost global rows.

Definition at line 1147 of file system_matrix.cpp.

◆ extractLocalGlobalCols()

std::vector< long > bitpit::SparseMatrix::extractLocalGlobalCols ( ) const

Extract the list of local global columns.

Returns
The the list of local global columns.

Definition at line 1157 of file system_matrix.cpp.

◆ extractLocalGlobalRows()

std::vector< long > bitpit::SparseMatrix::extractLocalGlobalRows ( ) const

Extract the list of local global rows.

Returns
The the list of local global rows.

Definition at line 1126 of file system_matrix.cpp.

◆ getBlockSize()

int bitpit::SparseMatrix::getBlockSize ( ) const

Get the number of blocks of the matrix.

Returns
The number of blocks of the matrix.

Definition at line 802 of file system_matrix.cpp.

◆ getColCount()

long bitpit::SparseMatrix::getColCount ( ) const

Get the number of columns of the matrix.

Returns
The number of columns of the matrix.

Definition at line 822 of file system_matrix.cpp.

◆ getColElementCount()

long bitpit::SparseMatrix::getColElementCount ( ) const

Get the number of columns of the matrix.

Returns
The number of columns of the matrix.

Definition at line 844 of file system_matrix.cpp.

◆ getColGlobalCount()

long bitpit::SparseMatrix::getColGlobalCount ( ) const

Get number of global columns.

Returns
The number of global columns.

Definition at line 1038 of file system_matrix.cpp.

◆ getColGlobalElementCount()

long bitpit::SparseMatrix::getColGlobalElementCount ( ) const

Get the number of global column

Returns
The number of global column

Definition at line 1058 of file system_matrix.cpp.

◆ getColGlobalElementOffset()

long bitpit::SparseMatrix::getColGlobalElementOffset ( ) const

Get global column offset.

Returns
The global column offset.

Definition at line 1070 of file system_matrix.cpp.

◆ getColGlobalOffset()

long bitpit::SparseMatrix::getColGlobalOffset ( ) const

Get global column offset.

Returns
The global column offset.

Definition at line 1048 of file system_matrix.cpp.

◆ getCommunicator()

const MPI_Comm & bitpit::SparseMatrix::getCommunicator ( ) const

Gets the MPI communicator associated to the matrix.

Returns
The MPI communicator associated to the matrix.

Definition at line 955 of file system_matrix.cpp.

◆ getMaxRowNZCount()

long bitpit::SparseMatrix::getMaxRowNZCount ( ) const

Get the maximum number of non-zero blocks/elements per row.

Returns
The maximum number of non-zero blocks/elements per row.

Definition at line 876 of file system_matrix.cpp.

◆ getMaxRowNZElementCount()

long bitpit::SparseMatrix::getMaxRowNZElementCount ( ) const

Get the maximum number of non-zero elements per row.

This is the number of individual non-zero elements, NOT the number of non-zero blocks.

Returns
The maximum number of non-zero elements per row.

Definition at line 932 of file system_matrix.cpp.

◆ getMaxRowNZGlobalCount()

long bitpit::SparseMatrix::getMaxRowNZGlobalCount ( ) const

Get the global maximum number of non-zero elements per row.

Returns
The global maximum number of non-zero elements per row.

Definition at line 1092 of file system_matrix.cpp.

◆ getMaxRowNZGlobalElementCount()

long bitpit::SparseMatrix::getMaxRowNZGlobalElementCount ( ) const

Get the global maximum number of non-zero elements per row.

Returns
The global maximum number of non-zero elements per row.

Definition at line 1114 of file system_matrix.cpp.

◆ getNZCount()

long bitpit::SparseMatrix::getNZCount ( ) const

Get the number of non-zero blocks/elements.

Returns
The number of non-zero blocks/elements.

Definition at line 856 of file system_matrix.cpp.

◆ getNZElementCount()

long bitpit::SparseMatrix::getNZElementCount ( ) const

Get the number of non-zero elements.

This is the number of individual non-zero elements, NOT the number of non-zero blocks.

Returns
The number of non-zero elements.

Definition at line 888 of file system_matrix.cpp.

◆ getNZGlobalCount()

long bitpit::SparseMatrix::getNZGlobalCount ( ) const

Get the global number of non-zero elements.

Returns
The global number of non-zero elements.

Definition at line 1082 of file system_matrix.cpp.

◆ getNZGlobalElementCount()

long bitpit::SparseMatrix::getNZGlobalElementCount ( ) const

Get the global number of non-zero elements.

Returns
The global number of non-zero elements.

Definition at line 1102 of file system_matrix.cpp.

◆ getRowCount()

long bitpit::SparseMatrix::getRowCount ( ) const

Get the number of rows of the matrix.

Returns
The number of rows of the matrix.

Definition at line 812 of file system_matrix.cpp.

◆ getRowElementCount()

long bitpit::SparseMatrix::getRowElementCount ( ) const

Get the number of rows of the matrix.

Returns
The number of rows of the matrix.

Definition at line 832 of file system_matrix.cpp.

◆ getRowGlobalCount()

long bitpit::SparseMatrix::getRowGlobalCount ( ) const

Get the number of global rows

Returns
The number of global rows

Definition at line 994 of file system_matrix.cpp.

◆ getRowGlobalElementCount()

long bitpit::SparseMatrix::getRowGlobalElementCount ( ) const

Get the number of global rows

Returns
The number of global rows

Definition at line 1014 of file system_matrix.cpp.

◆ getRowGlobalElementOffset()

long bitpit::SparseMatrix::getRowGlobalElementOffset ( ) const

Get global row offset.

Returns
The global row offset.

Definition at line 1026 of file system_matrix.cpp.

◆ getRowGlobalOffset()

long bitpit::SparseMatrix::getRowGlobalOffset ( ) const

Get global row offset.

Returns
The global row offset.

Definition at line 1004 of file system_matrix.cpp.

◆ getRowNZCount()

long bitpit::SparseMatrix::getRowNZCount ( long row) const

Get the number of non-zero blocks/elements in the specified row.

Returns
The number of non-zero blocks/elements in the specified row.

Definition at line 866 of file system_matrix.cpp.

◆ getRowNZElementCount()

long bitpit::SparseMatrix::getRowNZElementCount ( long row) const

Get the number of non-zero elements in the specified row.

This is the number of individual non-zero elements, NOT the number of non-zero blocks.

Returns
The number of non-zero elements in the specified row.

Definition at line 918 of file system_matrix.cpp.

◆ getRowPattern() [1/2]

ConstProxyVector< long > bitpit::SparseMatrix::getRowPattern ( long row) const

Get the pattern of the specified row.

Parameters
rowis the row
Returns
The pattern of the specified row.

Definition at line 1260 of file system_matrix.cpp.

◆ getRowPattern() [2/2]

void bitpit::SparseMatrix::getRowPattern ( long row,
ConstProxyVector< long > * pattern ) const

Get the pattern of the specified row.

Parameters
rowis the row
patternon output will contain the pattern of the specified row

Definition at line 1274 of file system_matrix.cpp.

◆ getRowPatternData() [1/2]

long * bitpit::SparseMatrix::getRowPatternData ( long row)
protected

Get a constant pointer to the internal pattern of the specified row.

Parameters
rowis the row
Returns
A constant pointer to the internal pattern of the specified row.

Definition at line 1318 of file system_matrix.cpp.

◆ getRowPatternData() [2/2]

const long * bitpit::SparseMatrix::getRowPatternData ( long row) const
protected

Get a constant pointer to the internal pattern of the specified row.

Parameters
rowis the row
Returns
A constant pointer to the internal pattern of the specified row.

Definition at line 1329 of file system_matrix.cpp.

◆ getRowValues() [1/2]

ConstProxyVector< double > bitpit::SparseMatrix::getRowValues ( long row) const

Get the values of the specified row.

Parameters
rowis the row
Returns
The values of the specified row.

Definition at line 1287 of file system_matrix.cpp.

◆ getRowValues() [2/2]

void bitpit::SparseMatrix::getRowValues ( long row,
ConstProxyVector< double > * values ) const

Get the values of the specified row.

Parameters
rowis the row
valueson output will contain the values of the specified row

Definition at line 1301 of file system_matrix.cpp.

◆ getRowValuesData() [1/2]

double * bitpit::SparseMatrix::getRowValuesData ( long row)
protected

Get a constant pointer to the internal values of the specified row.

The data of the row is stored using a block-row-major order: the rows of the single block elements are stored consecutively:

  <row_1_block_1><row_1_block_2>...<row_2_block_1><row_2_block_2>...
Parameters
rowis the row
Returns
A constant pointer to the internal values of the specified row.

Definition at line 1350 of file system_matrix.cpp.

◆ getRowValuesData() [2/2]

const double * bitpit::SparseMatrix::getRowValuesData ( long row) const
protected

Get a constant pointer to the internal values of the specified row.

The data of the row is stored using a block-row-major order: the rows of the single block elements are stored consecutively:

  <row_1_block_1><row_1_block_2>...<row_2_block_1><row_2_block_2>...
Parameters
rowis the row
Returns
A constant pointer to the internal values of the specified row.

Definition at line 1366 of file system_matrix.cpp.

◆ initialize() [1/4]

void bitpit::SparseMatrix::initialize ( bool partitioned,
int blockSize,
long nRows,
long nCols,
long nNZ )

Initialize the pattern.

Parameters
partitionedcontrols if the matrix is partitioned
blockSizeis the block size of the matrix
nRowsis the number rows of the matrix, if the matrix is partitioned this is the number of local rows
nColsis the number columns of the matrix, if the matrix is partitioned this is the number of local columns
nNZis the number of non-zero blocks that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 300 of file system_matrix.cpp.

◆ initialize() [2/4]

void bitpit::SparseMatrix::initialize ( bool partitioned,
long nRows,
long nCols,
long nNZ )

Initialize the pattern.

Parameters
partitionedcontrols if the matrix is partitioned
nRowsis the number rows of the matrix, if the matrix is partitioned this is the number of local rows
nColsis the number columns of the matrix, if the matrix is partitioned this is the number of local columns
nNZis the number of non-zero elements that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 280 of file system_matrix.cpp.

◆ initialize() [3/4]

void bitpit::SparseMatrix::initialize ( int blockSize,
long nRows,
long nCols,
long nNZ )

Initialize the pattern.

Parameters
blockSizeis the block size of the matrix
nRowsis the number of rows of the matrix
nColsis the number of columns of the matrix
nNZis the number of non-zero blocks that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 334 of file system_matrix.cpp.

◆ initialize() [4/4]

void bitpit::SparseMatrix::initialize ( long nRows,
long nCols,
long nNZ )

Initialize the pattern.

Parameters
nRowsis the number of rows of the matrix
nColsis the number of columns of the matrix
nNZis the number of non-zero elements that the matrix will contain. If this number is unknown, an estimate (or zero) could be passed. If the actual number of non-zero elements turns out to be greater than the provided value, the initialization of the matrix will be slower because reallocation of internal data may be needed

Definition at line 317 of file system_matrix.cpp.

◆ initializePatternStorage()

void bitpit::SparseMatrix::initializePatternStorage ( )
protected

Initialize the storage for the pattern.

Definition at line 641 of file system_matrix.cpp.

◆ initializeValueStorage()

void bitpit::SparseMatrix::initializeValueStorage ( )
protected

Initialize the storage for the values.

Definition at line 683 of file system_matrix.cpp.

◆ isAssembled()

bool bitpit::SparseMatrix::isAssembled ( ) const

Check if the matrix is assembled and ready for use.

Returns
Returns true if the matrix is assembled and ready for use.

Definition at line 769 of file system_matrix.cpp.

◆ isPartitioned()

bool bitpit::SparseMatrix::isPartitioned ( ) const

Checks if the matrix is partitioned.

Returns
Returns true if the patch is partitioned, false otherwise.

Definition at line 945 of file system_matrix.cpp.

◆ squeeze()

void bitpit::SparseMatrix::squeeze ( )

Squeeze.

Requests the matrix to reduce its capacity to fit its size.

Definition at line 460 of file system_matrix.cpp.

◆ squeezePatternStorage()

void bitpit::SparseMatrix::squeezePatternStorage ( )
protected

Squeeze the storage for the pattern.

Requests the pattern storage to reduce its capacity to fit its size.

Definition at line 665 of file system_matrix.cpp.

◆ squeezeValueStorage()

void bitpit::SparseMatrix::squeezeValueStorage ( )
protected

Squeeze the storage for the values.

Requests the value storage to reduce its capacity to fit its size.

Definition at line 707 of file system_matrix.cpp.

Member Data Documentation

◆ m_assembled

bool bitpit::SparseMatrix::m_assembled
protected

Definition at line 141 of file system_matrix.hpp.

◆ m_blockSize

int bitpit::SparseMatrix::m_blockSize
protected

Definition at line 132 of file system_matrix.hpp.

◆ m_communicator

MPI_Comm bitpit::SparseMatrix::m_communicator
protected

Definition at line 145 of file system_matrix.hpp.

◆ m_global_colOffset

long bitpit::SparseMatrix::m_global_colOffset
protected

Definition at line 152 of file system_matrix.hpp.

◆ m_global_maxRowNZ

long bitpit::SparseMatrix::m_global_maxRowNZ
protected

Definition at line 150 of file system_matrix.hpp.

◆ m_global_nCols

long bitpit::SparseMatrix::m_global_nCols
protected

Definition at line 148 of file system_matrix.hpp.

◆ m_global_nNZ

long bitpit::SparseMatrix::m_global_nNZ
protected

Definition at line 149 of file system_matrix.hpp.

◆ m_global_nRows

long bitpit::SparseMatrix::m_global_nRows
protected

Definition at line 147 of file system_matrix.hpp.

◆ m_global_rowOffset

long bitpit::SparseMatrix::m_global_rowOffset
protected

Definition at line 151 of file system_matrix.hpp.

◆ m_lastRow

long bitpit::SparseMatrix::m_lastRow
protected

Definition at line 139 of file system_matrix.hpp.

◆ m_maxRowNZ

long bitpit::SparseMatrix::m_maxRowNZ
protected

Definition at line 137 of file system_matrix.hpp.

◆ m_nCols

long bitpit::SparseMatrix::m_nCols
protected

Definition at line 135 of file system_matrix.hpp.

◆ m_nNZ

long bitpit::SparseMatrix::m_nNZ
protected

Definition at line 136 of file system_matrix.hpp.

◆ m_nRows

long bitpit::SparseMatrix::m_nRows
protected

Definition at line 134 of file system_matrix.hpp.

◆ m_partitioned

bool bitpit::SparseMatrix::m_partitioned
protected

Definition at line 144 of file system_matrix.hpp.

◆ m_pattern

FlatVector2D<long> bitpit::SparseMatrix::m_pattern
protected

Definition at line 155 of file system_matrix.hpp.

◆ m_values

std::vector<double> bitpit::SparseMatrix::m_values
protected

Definition at line 156 of file system_matrix.hpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---