Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/v0.1.0/v0.9.0/cpp
DOLFINx  0.1.0
DOLFINx C++ interface
Public Member Functions | List of all members
dolfinx::la::PETScOperator Class Reference

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

#include <PETScOperator.h>

Inheritance diagram for dolfinx::la::PETScOperator:
Inheritance graph
[legend]

Public Member Functions

 PETScOperator (Mat A, bool inc_ref_count)
 Constructor.
 
 PETScOperator (const PETScOperator &A)=delete
 
 PETScOperator (PETScOperator &&A)
 Move constructor.
 
virtual ~PETScOperator ()
 Destructor.
 
PETScOperatoroperator= (const PETScOperator &A)=delete
 Assignment operator (deleted)
 
PETScOperatoroperator= (PETScOperator &&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.
 
PETScVector 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. More...
 
Mat mat () const
 Return PETSc Mat pointer.
 

Detailed Description

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

Member Function Documentation

◆ create_vector()

PETScVector PETScOperator::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.

Parameters
[in]dimThe dimension (axis): dim = 0 --> z = y, dim = 1 --> z = x

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