Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/db/d4b/classdolfinx_1_1la_1_1petsc_1_1Operator.html
DOLFINx 0.8.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Operator Class Reference

#include <petsc.h>

Inheritance diagram for Operator:
Inheritance graph
[legend]

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: