DOLFIN
DOLFIN C++ interface
Public Member Functions | Protected Member Functions | Friends | List of all members
dolfin::GenericLinearOperator Class Referenceabstract

#include <GenericLinearOperator.h>

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

Public Member Functions

virtual std::size_t size (std::size_t dim) const =0
 Return size of given dimension.
 
virtual void mult (const GenericVector &x, GenericVector &y) const =0
 Compute matrix-vector product y = Ax.
 
virtual std::string str (bool verbose) const =0
 Return informal string representation (pretty-print)
 
- 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)
 
virtual MPI_Comm mpi_comm () const =0
 Return MPI communicator.
 
- 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
 

Protected Member Functions

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

Friends

class LinearOperator
 

Additional Inherited Members

- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

This class defines a common interface for linear operators, including actual matrices (class GenericMatrix) and linear operators only defined in terms of their action on vectors.

This class is used internally by DOLFIN to define a class hierarchy of backend independent linear operators and solvers. Users should not interface to this class directly but instead use the LinearOperator class.

Member Function Documentation

◆ init_layout()

virtual void dolfin::GenericLinearOperator::init_layout ( const GenericVector x,
const GenericVector y,
GenericLinearOperator wrapper 
)
inlineprotectedvirtual

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

Reimplemented in dolfin::PETScLinearOperator.


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