LinearOperator¶
-
class
dolfin.cpp.la.
LinearOperator
(*args)¶ Bases:
dolfin.cpp.la.GenericLinearOperator
This class defines an interface for linear operators defined only in terms of their action (matrix-vector product) and can be used for matrix-free solution of linear systems. The linear algebra backend is decided at run-time based on the present value of the “linear_algebra_backend” parameter. To define a linear operator, users need to inherit from this class and overload the function mult(x, y) which defines the action of the matrix on the vector x as y = Ax.
Create linear operator to match parallel layout of vectors x and y for product y = Ax.
Parameters: - GenericVector & x (const) –
- GenericVector & y (const) –
-
init_layout
()¶ Initialize linear operator to match parallel layout of vectors x and y for product y = Ax. Needs to be implemented by backend.
Parameters: - GenericVector & x (const) –
- GenericVector & y (const) –
- * wrapper (GenericLinearOperator) –
Return type: void
-
mult
()¶ Compute matrix-vector product y = Ax.
Parameters: - GenericVector & x (const) –
- & y (GenericVector) –
Return type: void
Return concrete instance / unwrap (const shared pointer version)
Return type: std::shared_ptr< const LinearAlgebraObject >
-
size
()¶ Return size of given dimension.
Parameters: dim (std::size_t) – Return type: std::size_t
-
str
()¶ Return informal string representation (pretty-print)
Parameters: verbose (bool) – Return type: std::string
-
thisown
¶ The membership flag