concepts::CGFabric< F > Class Template Reference

Fabric class for conjugate gradients: CG. More...

#include <cgFabric.hh>

Inheritance diagram for concepts::CGFabric< F >:
concepts::SolverFabric< F >

Public Member Functions

 CGFabric (Real maxeps=EPS, int maxit=0, bool relres=false, bool throwing=true)
 Constructor. More...
 
Operator< F > * operator() ()
 Creates a linear solver from matrix. More...
 
virtual Operator< F > * operator() (Operator< F > &matrix)
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 

Private Attributes

Real maxeps_
 Convergence criteria for the solver. More...
 
int maxit_
 Convergence criteria for the solver. More...
 
bool relres_
 Convergence criteria for the solver. More...
 
bool throwing_
 false: best solution is given, when non converging true: exception is thrown, when non converging More...
 

Detailed Description

template<typename F>
class concepts::CGFabric< F >

Fabric class for conjugate gradients: CG.

Author
Philipp Frauenfelder, 2002

Definition at line 27 of file cgFabric.hh.

Constructor & Destructor Documentation

◆ CGFabric()

template<typename F >
concepts::CGFabric< F >::CGFabric ( Real  maxeps = EPS,
int  maxit = 0,
bool  relres = false,
bool  throwing = true 
)
inline

Constructor.

Parameters
maxepsMaximal residual
maxitMaximal number of iterations
relresRelative residual
throwingIn the case of non convergence an exception is thrown and the best solution is not given back.

Definition at line 36 of file cgFabric.hh.

Member Function Documentation

◆ info()

template<typename F >
virtual std::ostream& concepts::CGFabric< F >::info ( std::ostream &  os) const
inlineprotectedvirtual

Definition at line 44 of file cgFabric.hh.

◆ operator()() [1/2]

template<typename F >
Operator<F>* concepts::CGFabric< F >::operator() ( )
inlinevirtual

Creates a linear solver from matrix.

The caller is responsible for the deletion of the delivered object.

Returns
Reference to the linear solver

Implements concepts::SolverFabric< F >.

Definition at line 42 of file cgFabric.hh.

◆ operator()() [2/2]

template<typename F >
virtual Operator<F>* concepts::CGFabric< F >::operator() ( Operator< F > &  matrix)
inlinevirtual

Implements concepts::SolverFabric< F >.

Definition at line 39 of file cgFabric.hh.

Member Data Documentation

◆ maxeps_

template<typename F >
Real concepts::CGFabric< F >::maxeps_
private

Convergence criteria for the solver.

Definition at line 50 of file cgFabric.hh.

◆ maxit_

template<typename F >
int concepts::CGFabric< F >::maxit_
private

Convergence criteria for the solver.

Definition at line 52 of file cgFabric.hh.

◆ relres_

template<typename F >
bool concepts::CGFabric< F >::relres_
private

Convergence criteria for the solver.

Definition at line 54 of file cgFabric.hh.

◆ throwing_

template<typename F >
bool concepts::CGFabric< F >::throwing_
private

false: best solution is given, when non converging true: exception is thrown, when non converging

Definition at line 58 of file cgFabric.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich