PETScBaseMatrix.h

Note

The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.

class PETScBaseMatrix

Parent class(es)

This class is a base class for matrices that can be used in PETScKrylovSolver.

PETScBaseMatrix()

Constructor

explicit PETScBaseMatrix(Mat A)

Constructor

PETScBaseMatrix(const PETScBaseMatrix &A)

Copy constructor

std::size_t size(std::size_t dim) const

Return number of rows (dim = 0) or columns (dim = 1)

std::pair<std::int64_t, std::int64_t> size() const

Return number of rows and columns (num_rows, num_cols). PETSc returns -1 if size has not been set.

std::pair<std::int64_t, std::int64_t> local_range(std::size_t dim) const

Return local range along dimension dim

void init_vector(GenericVector &z, std::size_t dim) const

Initialize vector to be compatible with the matrix-vector product y = Ax. In the parallel case, both size and layout are important.

Arguments
dim (std::size_t)
The dimension (axis): dim = 0 –> z = y, dim = 1 –> z = x
Mat mat() const

Return PETSc Mat pointer

MPI_Comm mpi_comm() const

Return the MPI communicator

std::string str(bool verbose) const = 0

Return informal string representation (pretty-print)