DOLFINx 0.9.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
Operator Class Reference

#include <petsc.h>

Inheritance diagram for Operator:

Public Member Functions

 Operator (Mat A, bool inc_ref_count)
 Constructor.
 
 Operator (const Operator &A)=delete
 
 Operator (Operator &&A)
 Move constructor.
 
virtual ~Operator ()
 Destructor.
 
Operatoroperator= (const Operator &A)=delete
 Assignment operator (deleted)
 
Operatoroperator= (Operator &&A)
 Move assignment operator.
 
std::array< std::int64_t, 2 > size () const
 
Vec create_vector (std::size_t dim) const
 
Mat mat () const
 Return PETSc Mat pointer.
 

Detailed Description

This class is a base class for matrices that can be used in petsc::KrylovSolver.

Member Function Documentation

◆ create_vector()

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.

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

◆ size()

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.


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