MFEM v2.0
Public Member Functions | Private Attributes
HyprePCG Class Reference

PCG solver in hypre. More...

#include <hypre.hpp>

Inheritance diagram for HyprePCG:
Inheritance graph
[legend]
Collaboration diagram for HyprePCG:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HyprePCG (HypreParMatrix &_A)
void SetTol (double tol)
void SetMaxIter (int max_iter)
void SetLogging (int logging)
void SetPrintLevel (int print_lvl)
void SetPreconditioner (HypreSolver &precond)
 Set the hypre solver to be used as a preconditioner.
void SetResidualConvergenceOptions (int res_frequency=-1, double rtol=0.0)
void SetZeroInintialIterate ()
 non-hypre setting
void GetNumIterations (int &num_iterations)
virtual operator HYPRE_Solver () const
 The typecast to HYPRE_Solver returns the internal pcg_solver.
virtual HYPRE_PtrToParSolverFcn SetupFcn () const
 PCG Setup function.
virtual HYPRE_PtrToParSolverFcn SolveFcn () const
 PCG Solve function.
virtual void Mult (const HypreParVector &b, HypreParVector &x) const
 Solve Ax=b with hypre's PCG.
virtual ~HyprePCG ()

Private Attributes

int print_level
int use_zero_initial_iterate
HYPRE_Solver pcg_solver

Detailed Description

PCG solver in hypre.

Definition at line 234 of file hypre.hpp.


Constructor & Destructor Documentation

HyprePCG::HyprePCG ( HypreParMatrix _A)
virtual HyprePCG::~HyprePCG ( ) [virtual]

Member Function Documentation

void HyprePCG::GetNumIterations ( int &  num_iterations) [inline]

Definition at line 259 of file hypre.hpp.

References pcg_solver.

virtual void HyprePCG::Mult ( const HypreParVector b,
HypreParVector x 
) const [virtual]

Solve Ax=b with hypre's PCG.

Reimplemented from HypreSolver.

Referenced by main().

virtual HyprePCG::operator HYPRE_Solver ( ) const [inline, virtual]

The typecast to HYPRE_Solver returns the internal pcg_solver.

Implements HypreSolver.

Definition at line 263 of file hypre.hpp.

References pcg_solver.

void HyprePCG::SetLogging ( int  logging)
void HyprePCG::SetMaxIter ( int  max_iter)

Referenced by main().

void HyprePCG::SetPreconditioner ( HypreSolver precond)

Set the hypre solver to be used as a preconditioner.

Referenced by main().

void HyprePCG::SetPrintLevel ( int  print_lvl)

Referenced by main().

void HyprePCG::SetResidualConvergenceOptions ( int  res_frequency = -1,
double  rtol = 0.0 
)

Use the L2 norm of the residual for measuring PCG convergence, plus (optionally) 1) periodically recompute true residuals from scratch; and 2) enable residual-based stopping criteria.

void HyprePCG::SetTol ( double  tol)

Referenced by main().

virtual HYPRE_PtrToParSolverFcn HyprePCG::SetupFcn ( ) const [inline, virtual]

PCG Setup function.

Implements HypreSolver.

Definition at line 266 of file hypre.hpp.

void HyprePCG::SetZeroInintialIterate ( ) [inline]

non-hypre setting

Definition at line 257 of file hypre.hpp.

References use_zero_initial_iterate.

virtual HYPRE_PtrToParSolverFcn HyprePCG::SolveFcn ( ) const [inline, virtual]

PCG Solve function.

Implements HypreSolver.

Definition at line 269 of file hypre.hpp.


Member Data Documentation

HYPRE_Solver HyprePCG::pcg_solver [private]

Definition at line 238 of file hypre.hpp.

Referenced by GetNumIterations(), and operator HYPRE_Solver().

int HyprePCG::print_level [private]

Definition at line 237 of file hypre.hpp.

Definition at line 237 of file hypre.hpp.

Referenced by SetZeroInintialIterate().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines