madupite.MatrixPreallocation#

class madupite.MatrixPreallocation(*args, **kwargs)#

Represents the preallocation for a matrix in the Madupite framework.

The MatrixPreallocation class is used to define memory preallocation for matrices. Preallocating memory helps optimize matrix operations by reducing the need for dynamic memory allocation during computation.

The matrices are stored in blocks according to the number of ranks available. E.g. a 6x6 matrix on 3 ranks is split into 2x2 blocks of size 3x3. This class provides attributes to specify the number of non-zero entries in both diagonal and off-diagonal blocks of the matrix.

Attributes#

d_nzint

The number of non-zero entries per row on the diagonal block.

d_nnzlist of int

A list with the number of non-zero entries for each row on the diagonal block.

o_nzint

The number of non-zero entries per row on the remaining blocks.

o_nnzlist of int

A list with the number of non-zero entries for each row of the remaining blocks.

__init__(self) None#

Methods

__init__(self)

Attributes

d_nnz

Diagonal non-zero entries

d_nz

Number of diagonal non-zero entries

o_nnz

Off-diagonal non-zero entries

o_nz

Number of off-diagonal non-zero entries