3 #ifndef DUNE_ISTL_SCALARPRODUCTS_HH
4 #define DUNE_ISTL_SCALARPRODUCTS_HH
53 virtual field_type
dot (
const X& x,
const X& y) = 0;
58 virtual double norm (
const X& x) = 0;
74 template<
class X,
class C,
int c>
108 virtual field_type
dot (
const X& x,
const X& y)
116 virtual double norm (
const X& x)
118 return static_cast<double>(x.two_norm());
122 template<
class X,
class C>
135 return new ScalarProduct();
X::field_type field_type
Definition: scalarproducts.hh:99
Base class for scalar product and norm computation.
Definition: scalarproducts.hh:43
Definition: basearray.hh:19
virtual double norm(const X &x)=0
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition...
virtual ~ScalarProduct()
every abstract base class has a virtual destructor
Definition: scalarproducts.hh:62
virtual double norm(const X &x)
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition...
Definition: scalarproducts.hh:116
Categories for the solvers.
Definition: solvercategory.hh:17
X domain_type
export types, they come from the derived class
Definition: scalarproducts.hh:46
SeqScalarProduct< X > ScalarProduct
The type of the scalar product for the sequential case.
Definition: scalarproducts.hh:126
Category for sequential solvers.
Definition: solvercategory.hh:21
virtual field_type dot(const X &x, const X &y)
Dot product of two vectors. In the complex case, the first argument is conjugated. It is assumed that the vectors are consistent on the interior+border partition.
Definition: scalarproducts.hh:108
virtual field_type dot(const X &x, const X &y)=0
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
The solver category.
Definition: scalarproducts.hh:82
static ScalarProduct * construct(const C &)
Definition: scalarproducts.hh:133
Definition: scalarproducts.hh:102
C communication_type
The type of the communication object.
Definition: scalarproducts.hh:78
Choose the approriate scalar product for a solver category.
Definition: scalarproducts.hh:75
Default implementation for the scalar case.
Definition: scalarproducts.hh:94
X domain_type
export types
Definition: scalarproducts.hh:98
X::field_type field_type
Definition: scalarproducts.hh:47