Loading...
Searching...
No Matches
preconditioner.hh
Go to the documentation of this file.
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ISTL_PRECONDITIONER_HH
#define DUNE_ISTL_PRECONDITIONER_HH
#include <dune-istl-config.hh> // DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE
#include <dune/common/exceptions.hh>
#include "solvercategory.hh"
namespace Dune {
//=====================================================================
//=====================================================================
template<class X, class Y>
class Preconditioner {
public:
typedef X domain_type;
typedef Y range_type;
typedef typename X::field_type field_type;
virtual void pre (X& x, Y& b) = 0;
virtual void apply (X& v, const Y& d) = 0;
virtual void post (X& x) = 0;
virtual SolverCategory::Category category() const
#if DUNE_ISTL_SUPPORT_OLD_CATEGORY_INTERFACE
{
DUNE_THROW(Dune::Exception,"It is necessary to implement the category method in a derived classes, in the future this method will pure virtual.");
}
#else
= 0;
#endif
virtual ~Preconditioner () {}
};
}
#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