dune-istl 2.10
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
Dune::InverseOperator< X, Y > Class Template Referenceabstract

Abstract base class for all solvers. More...

#include <dune/istl/solver.hh>

Inheritance diagram for Dune::InverseOperator< X, Y >:
Inheritance graph

Public Types

typedef X domain_type
 Type of the domain of the operator to be inverted.
 
typedef Y range_type
 Type of the range of the operator to be inverted.
 
typedef X::field_type field_type
 The field type of the operator.
 
typedef FieldTraits< field_type >::real_type real_type
 The real type of the field type (is the same if using real numbers, but differs for std::complex)
 
typedef Simd::Scalar< real_typescalar_real_type
 scalar type underlying the field_type
 

Public Member Functions

virtual void apply (X &x, Y &b, InverseOperatorResult &res)=0
 Apply inverse operator,.
 
virtual void apply (X &x, Y &b, double reduction, InverseOperatorResult &res)=0
 apply inverse operator, with given convergence criteria.
 
virtual SolverCategory::Category category () const =0
 Category of the solver (see SolverCategory::Category)
 
virtual ~InverseOperator ()
 Destructor.
 

Protected Types

enum  { iterationSpacing = 5 , normSpacing = 16 }
 

Protected Member Functions

void printHeader (std::ostream &s) const
 helper function for printing header of solver output
 
template<typename CountType , typename DataType >
void printOutput (std::ostream &s, const CountType &iter, const DataType &norm, const DataType &norm_old) const
 helper function for printing solver output
 
template<typename CountType , typename DataType >
void printOutput (std::ostream &s, const CountType &iter, const DataType &norm) const
 helper function for printing solver output
 

Detailed Description

template<class X, class Y>
class Dune::InverseOperator< X, Y >

Abstract base class for all solvers.

An InverseOperator computes the solution of $ A(x)=b$ where $ A : X \to Y $ is an operator. Note that the solver "knows" which operator to invert and which preconditioner to apply (if any). The user is only interested in inverting the operator. InverseOperator might be a Newton scheme, a Krylov subspace method, or a direct solver or just anything.

Member Typedef Documentation

◆ domain_type

template<class X , class Y >
typedef X Dune::InverseOperator< X, Y >::domain_type

Type of the domain of the operator to be inverted.

◆ field_type

template<class X , class Y >
typedef X::field_type Dune::InverseOperator< X, Y >::field_type

The field type of the operator.

◆ range_type

template<class X , class Y >
typedef Y Dune::InverseOperator< X, Y >::range_type

Type of the range of the operator to be inverted.

◆ real_type

template<class X , class Y >
typedef FieldTraits<field_type>::real_type Dune::InverseOperator< X, Y >::real_type

The real type of the field type (is the same if using real numbers, but differs for std::complex)

◆ scalar_real_type

template<class X , class Y >
typedef Simd::Scalar<real_type> Dune::InverseOperator< X, Y >::scalar_real_type

scalar type underlying the field_type

Member Enumeration Documentation

◆ anonymous enum

template<class X , class Y >
anonymous enum
protected
Enumerator
iterationSpacing 
normSpacing 

Constructor & Destructor Documentation

◆ ~InverseOperator()

template<class X , class Y >
virtual Dune::InverseOperator< X, Y >::~InverseOperator ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ apply() [1/2]

template<class X , class Y >
virtual void Dune::InverseOperator< X, Y >::apply ( X &  x,
Y &  b,
double  reduction,
InverseOperatorResult res 
)
pure virtual

apply inverse operator, with given convergence criteria.

Warning
Right hand side b may be overwritten!
Parameters
xThe left hand side to store the result in.
bThe right hand side
reductionThe minimum defect reduction to achieve.
resObject to store the statistics about applying the operator.
Exceptions
SolverAbortWhen the solver detects a problem and cannot continue

Implemented in Dune::Cholmod< Vector, Index >, Dune::RestartedGMResSolver< X, Y, F >, and Dune::RestartedFlexibleGMResSolver< X, Y, F >.

◆ apply() [2/2]

template<class X , class Y >
virtual void Dune::InverseOperator< X, Y >::apply ( X &  x,
Y &  b,
InverseOperatorResult res 
)
pure virtual

Apply inverse operator,.

Warning
Note: right hand side b may be overwritten!
Parameters
xThe left hand side to store the result in.
bThe right hand side
resObject to store the statistics about applying the operator.
Exceptions
SolverAbortWhen the solver detects a problem and cannot continue

Implemented in Dune::Cholmod< Vector, Index >, and Dune::RestartedGMResSolver< X, Y, F >.

◆ category()

template<class X , class Y >
virtual SolverCategory::Category Dune::InverseOperator< X, Y >::category ( ) const
pure virtual

◆ printHeader()

template<class X , class Y >
void Dune::InverseOperator< X, Y >::printHeader ( std::ostream &  s) const
inlineprotected

helper function for printing header of solver output

◆ printOutput() [1/2]

template<class X , class Y >
template<typename CountType , typename DataType >
void Dune::InverseOperator< X, Y >::printOutput ( std::ostream &  s,
const CountType &  iter,
const DataType &  norm 
) const
inlineprotected

helper function for printing solver output

◆ printOutput() [2/2]

template<class X , class Y >
template<typename CountType , typename DataType >
void Dune::InverseOperator< X, Y >::printOutput ( std::ostream &  s,
const CountType &  iter,
const DataType &  norm,
const DataType &  norm_old 
) const
inlineprotected

helper function for printing solver output


The documentation for this class was generated from the following file: