ThunderEgg  1.0.0
ThunderEgg::Iterative::BiCGStab< D > Class Template Reference

BiCGStab iterative solver. More...

#include <BiCGStab.h>

Inheritance diagram for ThunderEgg::Iterative::BiCGStab< D >:
Collaboration diagram for ThunderEgg::Iterative::BiCGStab< D >:

Public Member Functions

BiCGStab< D > * clone () const override
 Clone this solver. More...
 
void setMaxIterations (int max_iterations_in)
 Set the maximum number of iterations. More...
 
int getMaxIterations () const
 Get the maximum number of iterations. More...
 
void setTolerance (double tolerance_in)
 Set the stopping tolerance. More...
 
double getTolerance () const
 Get the stopping tolerance. More...
 
void setTimer (std::shared_ptr< Timer > timer_in)
 Set the Timer object. More...
 
std::shared_ptr< TimergetTimer () const
 Get the Timer object. More...
 
int solve (const Operator< D > &A, Vector< D > &x, const Vector< D > &b, const Operator< D > *Mr=nullptr, bool output=false, std::ostream &os=std::cout) const override
 Perform an iterative solve. More...
 
- Public Member Functions inherited from ThunderEgg::Iterative::Solver< D >
virtual ~Solver ()
 Destroy the Solver object.
 

Detailed Description

template<int D>
class ThunderEgg::Iterative::BiCGStab< D >

BiCGStab iterative solver.

Template Parameters
Dthe number of Cartesian dimensions

Member Function Documentation

◆ clone()

template<int D>
BiCGStab<D>* ThunderEgg::Iterative::BiCGStab< D >::clone ( ) const
inlineoverridevirtual

Clone this solver.

Returns
BiCGStab<D>* a newly allocated copy of this solver

Implements ThunderEgg::Iterative::Solver< D >.

◆ getMaxIterations()

template<int D>
int ThunderEgg::Iterative::BiCGStab< D >::getMaxIterations ( ) const
inline

Get the maximum number of iterations.

Default is 1000

Returns
int the maximum number of iterations

◆ getTimer()

template<int D>
std::shared_ptr<Timer> ThunderEgg::Iterative::BiCGStab< D >::getTimer ( ) const
inline

Get the Timer object.

Returns
std::shared_ptr<Timer> the Timer

◆ getTolerance()

template<int D>
double ThunderEgg::Iterative::BiCGStab< D >::getTolerance ( ) const
inline

Get the stopping tolerance.

Default is 1e-12

Returns
double the stopping tolerance

◆ setMaxIterations()

template<int D>
void ThunderEgg::Iterative::BiCGStab< D >::setMaxIterations ( int  max_iterations_in)
inline

Set the maximum number of iterations.

Default is 1000

Parameters
max_iterations_inthe maximum number of iterations

◆ setTimer()

template<int D>
void ThunderEgg::Iterative::BiCGStab< D >::setTimer ( std::shared_ptr< Timer timer_in)
inline

Set the Timer object.

Parameters
timer_inthe Timer

◆ setTolerance()

template<int D>
void ThunderEgg::Iterative::BiCGStab< D >::setTolerance ( double  tolerance_in)
inline

Set the stopping tolerance.

Default is 1e-12

Parameters
tolerance_inthe stopping tolerance

◆ solve()

template<int D>
int ThunderEgg::Iterative::BiCGStab< D >::solve ( const Operator< D > &  A,
Vector< D > &  x,
const Vector< D > &  b,
const Operator< D > *  Mr = nullptr,
bool  output = false,
std::ostream &  os = std::cout 
) const
inlineoverridevirtual

Perform an iterative solve.

Parameters
Athe matrix
xthe initial LHS guess.
bthe RHS vector.
Mrthe right preconditioner. Set to nullptr if there is no right preconditioner.
outputprint output to the provided stream
osthe stream to output to
Returns
the number of iterations

Implements ThunderEgg::Iterative::Solver< D >.


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