20 #ifndef __LINEAR_OPERATOR_H 21 #define __LINEAR_OPERATOR_H 24 #include <dolfin/common/MPI.h> 25 #include "GenericLinearOperator.h" 55 virtual std::size_t
size(std::size_t dim)
const = 0;
62 { dolfin_assert(_matA);
return _matA->mpi_comm(); }
65 std::string
str(
bool verbose)
const;
76 virtual std::shared_ptr<const LinearAlgebraObject>
shared_instance()
const;
84 std::shared_ptr<GenericLinearOperator> _matA;
Definition: GenericLinearOperator.h:42
Definition: LinearOperator.h:40
LinearOperator()
Create linear operator.
Definition: LinearOperator.cpp:28
virtual MPI_Comm mpi_comm() const
Return the MPI communicator.
Definition: LinearOperator.h:61
std::string str(bool verbose) const
Return informal string representation (pretty-print)
Definition: LinearOperator.cpp:48
virtual void mult(const GenericVector &x, GenericVector &y) const =0
Compute matrix-vector product y = Ax.
virtual const GenericLinearOperator * instance() const
Return concrete instance / unwrap (const version)
Definition: LinearOperator.cpp:53
virtual std::shared_ptr< const LinearAlgebraObject > shared_instance() const
Return concrete instance / unwrap (const shared pointer version)
Definition: LinearOperator.cpp:63
virtual std::size_t size(std::size_t dim) const =0
Return size of given dimension.
This class defines a common interface for vectors.
Definition: GenericVector.h:47
virtual ~LinearOperator()
Destructor.
Definition: LinearOperator.h:52