DOLFINx 0.7.3
DOLFINx C++ interface
|
This class is a base class for matrices that can be used in petsc::KrylovSolver. More...
#include <petsc.h>
Public Member Functions | |
Operator (Mat A, bool inc_ref_count) | |
Constructor. | |
Operator (const Operator &A)=delete | |
Operator (Operator &&A) | |
Move constructor. | |
virtual | ~Operator () |
Destructor. | |
Operator & | operator= (const Operator &A)=delete |
Assignment operator (deleted) | |
Operator & | operator= (Operator &&A) |
Move assignment operator. | |
std::array< std::int64_t, 2 > | size () const |
Return number of rows and columns (num_rows, num_cols). PETSc returns -1 if size has not been set. | |
Vec | create_vector (std::size_t dim) const |
Initialize vector to be compatible with the matrix-vector product y = Ax. In the parallel case, size and layout are both important. | |
Mat | mat () const |
Return PETSc Mat pointer. | |
This class is a base class for matrices that can be used in petsc::KrylovSolver.
Vec create_vector | ( | std::size_t | dim | ) | const |
Initialize vector to be compatible with the matrix-vector product y = Ax. In the parallel case, size and layout are both important.
[in] | dim | The dimension (axis): dim = 0 --> z = y, dim = 1 --> z = x |