Go to the documentation of this file.
3 #ifndef DUNE_ISTL_SCALARPRODUCTS_HH
4 #define DUNE_ISTL_SCALARPRODUCTS_HH
12 #include <dune/common/exceptions.hh>
53 typedef typename FieldTraits<field_type>::real_type
real_type;
93 template<
class X,
class C>
104 typedef typename FieldTraits<field_type>::real_type
real_type;
117 : _communication(com), _category(cat)
127 _communication.dot(x,y,result);
136 return _communication.norm(x);
162 template<
class X,
class C>
181 template<
class X,
class C>
202 template<
class X,
class Comm>
209 std::make_shared<ScalarProduct<X>>();
212 std::make_shared<ParallelScalarProduct<X,Comm>>(comm,category);
virtual SolverCategory::Category category() const
Category of the scalar product (see SolverCategory::Category)
Definition: scalarproducts.hh:73
OverlappingSchwarzScalarProduct(const C &comm)
Definition: scalarproducts.hh:185
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:23
virtual field_type dot(const X &x, const X &y) const
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
Definition: scalarproducts.hh:59
std::shared_ptr< ScalarProduct< X > > createScalarProduct(const Comm &comm, SolverCategory::Category category)
Choose the approriate scalar product for a solver category.
Definition: scalarproducts.hh:203
FieldTraits< field_type >::real_type real_type
Definition: scalarproducts.hh:53
Categories for the solvers.
Definition: solvercategory.hh:19
ParallelScalarProduct(const communication_type &com, SolverCategory::Category cat)
Definition: scalarproducts.hh:116
Default implementation for the scalar case.
Definition: scalarproducts.hh:152
virtual ~ScalarProduct()
every abstract base class has a virtual destructor
Definition: scalarproducts.hh:79
NonoverlappingSchwarzScalarProduct(const C &comm)
Definition: scalarproducts.hh:166
Base class for scalar product and norm computation.
Definition: scalarproducts.hh:48
virtual real_type norm(const X &x) const override
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition.
Definition: scalarproducts.hh:134
X::field_type field_type
Definition: scalarproducts.hh:52
virtual SolverCategory::Category category() const override
Category of the scalar product (see SolverCategory::Category)
Definition: scalarproducts.hh:140
Scalar product for overlapping Schwarz methods.
Definition: scalarproducts.hh:182
Definition: allocator.hh:7
C communication_type
The type of the communication object.
Definition: scalarproducts.hh:109
Nonoverlapping Scalar Product with communication object.
Definition: scalarproducts.hh:163
virtual real_type norm(const X &x) const
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition.
Definition: scalarproducts.hh:67
X domain_type
export types, they come from the derived class
Definition: scalarproducts.hh:51
Scalar product for overlapping Schwarz methods.
Definition: scalarproducts.hh:94
X domain_type
The type of the vector to compute the scalar product on.
Definition: scalarproducts.hh:101
FieldTraits< field_type >::real_type real_type
Definition: scalarproducts.hh:104
Category
Definition: solvercategory.hh:21
virtual field_type dot(const X &x, const X &y) const override
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
Definition: scalarproducts.hh:124
This file implements a vector space as a tensor product of a given vector space. The number of compon...
X::field_type field_type
The field type used by the vector type domain_type.
Definition: scalarproducts.hh:103