Loading...
Searching...
No Matches
dolfin::GenericLinearOperator Class Referenceabstract

`#include <GenericLinearOperator.h>`

Inheritance diagram for dolfin::GenericLinearOperator:
[legend]
Collaboration diagram for dolfin::GenericLinearOperator:
[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 LinearAlgebraObject * | instance () const
| Return concrete instance / unwrap (const version).
virtual LinearAlgebraObject * | instance ()
| Return concrete instance / unwrap (non-const version).
virtual std::shared_ptr< const LinearAlgebraObject > | shared_instance () const
| Return concrete shared ptr instance / unwrap (const version).
virtual std::shared_ptr< LinearAlgebraObject > | shared_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 Variable & | operator= (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 )

inline protected virtual

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.

## mult()

virtual void dolfin::GenericLinearOperator::mult | ( | const GenericVector & | x,
|  | GenericVector & | y ) const

pure virtual

Compute matrix-vector product y = Ax.

Implemented in dolfin::EigenMatrix, dolfin::GenericLinearAlgebraFactory::NotImplementedLinearOperator, dolfin::LinearOperator, dolfin::Matrix, dolfin::PETScLinearOperator, dolfin::PETScMatrix, dolfin::PETScNestMatrix, and dolfin::TpetraMatrix.

## size()

virtual std::size_t dolfin::GenericLinearOperator::size | ( | std::size_t | dim | ) | const

pure virtual

Return size of given dimension.

Implemented in dolfin::EigenMatrix, dolfin::GenericLinearAlgebraFactory::NotImplementedLinearOperator, dolfin::GenericMatrix, dolfin::LinearOperator, dolfin::Matrix, dolfin::PETScLinearOperator, dolfin::PETScMatrix, dolfin::PETScNestMatrix, and dolfin::TpetraMatrix.

## str()

virtual std::string dolfin::GenericLinearOperator::str | ( | bool | verbose | ) | const

pure virtual

Return informal string representation (pretty-print).

Reimplemented from dolfin::Variable.

Implemented in dolfin::EigenMatrix, dolfin::GenericLinearAlgebraFactory::NotImplementedLinearOperator, dolfin::GenericMatrix, dolfin::LinearOperator, dolfin::Matrix, dolfin::PETScLinearOperator, dolfin::PETScMatrix, dolfin::PETScNestMatrix, and dolfin::TpetraMatrix.

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

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/la/GenericLinearOperator.h