KASKADE 7 development version
trivialpreconditioner.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the library KASKADE 7 */
4/* https://www.zib.de/research/projects/kaskade7-finite-element-toolbox */
5/* */
6/* Copyright (C) 2002-2020 Zuse Institute Berlin */
7/* */
8/* KASKADE 7 is distributed under the terms of the ZIB Academic License. */
9/* see $KASKADE/academic.txt */
10/* */
11/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12
13#ifndef TRIVIALPRECONDITIONER_HH
14#define TRIVIALPRECONDITIONER_HH
15
16#include "dune/istl/preconditioners.hh"
17#include "dune/istl/solvercategory.hh"
18
19namespace Kaskade
20{
21
33 template <class Operator>
34 class TrivialPreconditioner: public Dune::Preconditioner<typename Operator::domain_type,typename Operator::range_type>
35 {
36 public:
37 typedef typename Operator::domain_type domain_type;
38 typedef typename Operator::range_type range_type;
39
40 virtual void pre (domain_type&, range_type&) {}
41 virtual void apply (domain_type& x, range_type const& y) { x = y; }
42 virtual void post (domain_type&) {}
43
49 virtual Dune::SolverCategory::Category category() const override
50 {
51 return Dune::SolverCategory::sequential;
52 }
53 };
54
55} // namespace Kaskade
56#endif
The trivial preconditioner: this is simply the identity that does exactly nothing.
virtual void post(domain_type &)
virtual void pre(domain_type &, range_type &)
virtual void apply(domain_type &x, range_type const &y)
virtual Dune::SolverCategory::Category category() const override
returns the category of the operator