dune-istl
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
istl
preconditioner.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
#ifndef DUNE_ISTL_PRECONDITIONER_HH
6
#define DUNE_ISTL_PRECONDITIONER_HH
7
8
#include <dune-istl-config.hh>
// DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE
9
#include <dune/common/exceptions.hh>
10
11
#include "
solvercategory.hh
"
12
13
namespace
Dune
{
18
//=====================================================================
31
//=====================================================================
32
template
<
class
X,
class
Y>
33
class
Preconditioner
{
34
public
:
36
typedef
X
domain_type
;
38
typedef
Y
range_type
;
40
typedef
typename
X::field_type
field_type
;
41
70
virtual
void
pre
(X& x, Y& b) = 0;
71
82
virtual
void
apply
(X& v,
const
Y& d) = 0;
83
92
virtual
void
post
(X& x) = 0;
93
95
virtual
SolverCategory::Category
category
() const
96
#if DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE
97
{
98
DUNE_THROW(Dune::Exception,
"It is necessary to implement the category method in a derived classes, in the future this method will pure virtual."
);
99
}
100
#else
101
= 0;
102
#endif
103
105
virtual
~Preconditioner
() {}
106
107
};
108
112
}
113
#endif
solvercategory.hh
Dune
Definition
allocator.hh:11
Dune::Preconditioner
Base class for matrix free definition of preconditioners.
Definition
preconditioner.hh:33
Dune::Preconditioner::post
virtual void post(X &x)=0
Clean up.
Dune::Preconditioner::apply
virtual void apply(X &v, const Y &d)=0
Apply one step of the preconditioner to the system A(v)=d.
Dune::Preconditioner::~Preconditioner
virtual ~Preconditioner()
every abstract base class has a virtual destructor
Definition
preconditioner.hh:105
Dune::Preconditioner::range_type
Y range_type
The range type of the preconditioner.
Definition
preconditioner.hh:38
Dune::Preconditioner::domain_type
X domain_type
The domain type of the preconditioner.
Definition
preconditioner.hh:36
Dune::Preconditioner::category
virtual SolverCategory::Category category() const =0
Category of the preconditioner (see SolverCategory::Category).
Dune::Preconditioner::field_type
X::field_type field_type
The field type of the preconditioner.
Definition
preconditioner.hh:40
Dune::Preconditioner::pre
virtual void pre(X &x, Y &b)=0
Prepare the preconditioner.
Dune::SolverCategory::Category
Category
Definition
solvercategory.hh:23
Generated by
1.17.0