Go to the documentation of this file.
3 #ifndef DUNE_ISTL_OPERATORS_HH
4 #define DUNE_ISTL_OPERATORS_HH
12 #include <dune/common/exceptions.hh>
63 template<
class X,
class Y>
77 virtual void apply (
const X& x, Y& y)
const = 0;
87 #if DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE
89 DUNE_THROW(Dune::Exception,
"It is necessary to implement the category method in a derived classes, in the future this method will pure virtual.");
105 template<
class M,
class X,
class Y>
115 virtual const M&
getmat ()
const = 0;
132 template<
class M,
class X,
class Y>
146 virtual void apply (
const X& x, Y& y)
const
Category
Definition: solvercategory.hh:21
Y range_type
The type of the range of the operator.
Definition: operators.hh:69
Y range_type
Definition: operators.hh:111
Adapter to turn a matrix into a linear operator.
Definition: operators.hh:133
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
M matrix_type
export types
Definition: operators.hh:137
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const
apply operator to x, scale and add:
Definition: operators.hh:152
X domain_type
Definition: operators.hh:138
virtual const M & getmat() const
get matrix via *
Definition: operators.hh:158
virtual ~LinearOperator()
every abstract base class has a virtual destructor
Definition: operators.hh:83
M matrix_type
export types, usually they come from the derived class
Definition: operators.hh:109
X::field_type field_type
Definition: operators.hh:112
virtual void apply(const X &x, Y &y) const =0
apply operator to x: The input vector is consistent and the output must also be consistent on the in...
virtual SolverCategory::Category category() const =0
Category of the linear operator (see SolverCategory::Category)
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const =0
apply operator to x, scale and add:
X domain_type
The type of the domain of the operator.
Definition: operators.hh:67
virtual void apply(const X &x, Y &y) const
apply operator to x:
Definition: operators.hh:146
X domain_type
Definition: operators.hh:110
MatrixAdapter(const M &A)
constructor: just store a reference to a matrix
Definition: operators.hh:143
A linear operator exporting itself in matrix form.
Definition: operators.hh:106
virtual ~AssembledLinearOperator()
every abstract base class has a virtual destructor
Definition: operators.hh:118
virtual const M & getmat() const =0
get matrix via *
X::field_type field_type
The field type of the operator.
Definition: operators.hh:71
Definition: allocator.hh:7
X::field_type field_type
Definition: operators.hh:140
Y range_type
Definition: operators.hh:139
virtual SolverCategory::Category category() const
Category of the solver (see SolverCategory::Category)
Definition: operators.hh:164
A linear operator.
Definition: operators.hh:64