ThunderEgg  1.0.0
ThunderEgg::Iterative::Solver< D > Class Template Referenceabstract

Abstract interface for Iterative solvers. More...

#include <Solver.h>

Inheritance diagram for ThunderEgg::Iterative::Solver< D >:

Public Member Functions

virtual Solver< D > * clone () const =0
 Clone this solver. More...
 
virtual ~Solver ()
 Destroy the Solver object.
 
virtual 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 =0
 Perform an iterative solve. More...
 

Detailed Description

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

Abstract interface for Iterative solvers.

Template Parameters
Dthe number of cartesian dimensions

Member Function Documentation

◆ clone()

template<int D>
virtual Solver<D>* ThunderEgg::Iterative::Solver< D >::clone ( ) const
pure virtual

Clone this solver.

Returns
Solver* a newly allocated copy of this solver

Implemented in ThunderEgg::PETSc::KSPSolver< D >, ThunderEgg::Iterative::BiCGStab< D >, and ThunderEgg::Iterative::CG< D >.

◆ solve()

template<int D>
virtual int ThunderEgg::Iterative::Solver< 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
pure virtual

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

Implemented in ThunderEgg::PETSc::KSPSolver< D >, ThunderEgg::Iterative::BiCGStab< D >, and ThunderEgg::Iterative::CG< D >.


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