DOLFIN
DOLFIN C++ interface
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dolfin::PETScLinearOperator Class Reference

PETSc version of the GenericLinearOperator. More...

#include <PETScLinearOperator.h>

Inheritance diagram for dolfin::PETScLinearOperator:
Inheritance graph
[legend]
Collaboration diagram for dolfin::PETScLinearOperator:
Collaboration graph
[legend]

Public Member Functions

 PETScLinearOperator (MPI_Comm comm)
 Constructor.
 
virtual std::size_t size (std::size_t dim) const
 Return size of given dimension.
 
virtual void mult (const GenericVector &x, GenericVector &y) const
 Compute matrix-vector product y = Ax.
 
virtual MPI_Comm mpi_comm () const
 Return MPI communicator.
 
virtual std::string str (bool verbose) const
 Return informal string representation (pretty-print)
 
virtual const GenericLinearOperatorwrapper () const
 Return pointer to wrapper (const version)
 
virtual GenericLinearOperatorwrapper ()
 Return pointer to wrapper (const version)
 
- Public Member Functions inherited from dolfin::PETScBaseMatrix
 PETScBaseMatrix ()
 Constructor.
 
 PETScBaseMatrix (Mat A)
 Constructor.
 
 PETScBaseMatrix (const PETScBaseMatrix &A)
 Copy constructor.
 
 ~PETScBaseMatrix ()
 Destructor.
 
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
 
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
 
Mat mat () const
 Return PETSc Mat pointer.
 
MPI_Comm mpi_comm () const
 Return the MPI communicator.
 
- Public Member Functions inherited from dolfin::PETScObject
 PETScObject ()
 Constructor. Ensures that PETSc has been initialised.
 
virtual ~PETScObject ()
 Destructor.
 
- Public Member Functions inherited from dolfin::Variable
 Variable ()
 Create unnamed variable.
 
 Variable (const std::string name, const std::string label)
 Create variable with given name and label.
 
 Variable (const Variable &variable)
 Copy constructor.
 
virtual ~Variable ()
 Destructor.
 
const Variableoperator= (const Variable &variable)
 Assignment operator.
 
void rename (const std::string name, const std::string label)
 Rename variable.
 
std::string name () const
 Return name.
 
std::string label () const
 Return label (description)
 
std::size_t id () const
 
- Public Member Functions inherited from dolfin::LinearAlgebraObject
virtual const LinearAlgebraObjectinstance () const
 Return concrete instance / unwrap (const version)
 
virtual LinearAlgebraObjectinstance ()
 Return concrete instance / unwrap (non-const version)
 
virtual std::shared_ptr< const LinearAlgebraObjectshared_instance () const
 Return concrete shared ptr instance / unwrap (const version)
 
virtual std::shared_ptr< LinearAlgebraObjectshared_instance ()
 Return concrete shared ptr instance / unwrap (non-const version)
 

Protected Member Functions

void init_layout (const GenericVector &x, const GenericVector &y, GenericLinearOperator *wrapper)
 

Protected Attributes

GenericLinearOperator_wrapper
 
- Protected Attributes inherited from dolfin::PETScBaseMatrix
Mat _matA
 

Additional Inherited Members

- Static Public Member Functions inherited from dolfin::PETScObject
static void petsc_error (int error_code, std::string filename, std::string petsc_function)
 Print error message for PETSc calls that return an error.
 
- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

PETSc version of the GenericLinearOperator.

Matrix-free interface for the solution of linear systems defined in terms of the action (matrix-vector product) of a linear operator.

Member Function Documentation

◆ init_layout()

void PETScLinearOperator::init_layout ( const GenericVector x,
const GenericVector y,
GenericLinearOperator wrapper 
)
protectedvirtual

Initialize linear operator to match parallel layout of vectors x and y for product y = Ax. Needs to be implemented by backend.

Reimplemented from dolfin::GenericLinearOperator.


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