SU2
Public Member Functions | List of all members
CSysSolve Class Reference

Class for solving linear systems using classical and Krylov-subspace iterative methods. More...

#include <linear_solvers_structure.hpp>

Public Member Functions

unsigned long CG_LinSolver (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, CPreconditioner &precond, su2double tol, unsigned long m, bool monitoring)
 Conjugate Gradient method. More...
 
unsigned long FGMRES_LinSolver (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, CPreconditioner &precond, su2double tol, unsigned long m, su2double *residual, bool monitoring)
 Flexible Generalized Minimal Residual method. More...
 
unsigned long BCGSTAB_LinSolver (const CSysVector &b, CSysVector &x, CMatrixVectorProduct &mat_vec, CPreconditioner &precond, su2double tol, unsigned long m, su2double *residual, bool monitoring)
 Biconjugate Gradient Stabilized Method (BCGSTAB) More...
 
unsigned long Solve (CSysMatrix &Jacobian, CSysVector &LinSysRes, CSysVector &LinSysSol, CGeometry *geometry, CConfig *config)
 Solve the linear system using a Krylov subspace method. More...
 
void SetExternalSolve (CSysMatrix &Jacobian, CSysVector &LinSysRes, CSysVector &LinSysSol, CGeometry *geometry, CConfig *config)
 Prepare the linear solve during the reverse interpretation of the AD tape. More...
 

Detailed Description

Class for solving linear systems using classical and Krylov-subspace iterative methods.

Author
J. Hicken.
Version
5.0.0 "Raven"

The individual solvers could be stand-alone subroutines, but by creating CSysSolve objects we can more easily assign different matrix-vector products and preconditioners to different problems that may arise in a hierarchical solver (i.e. multigrid).

Member Function Documentation

§ BCGSTAB_LinSolver()

unsigned long CSysSolve::BCGSTAB_LinSolver ( const CSysVector b,
CSysVector x,
CMatrixVectorProduct mat_vec,
CPreconditioner precond,
su2double  tol,
unsigned long  m,
su2double *  residual,
bool  monitoring 
)

Biconjugate Gradient Stabilized Method (BCGSTAB)

Parameters
[in]b- the right hand size vector
[in,out]x- on entry the intial guess, on exit the solution
[in]mat_vec- object that defines matrix-vector product
[in]precond- object that defines preconditioner
[in]tol- tolerance with which to solve the system
[in]m- maximum size of the search subspace
[in]residual
[in]monitoring- turn on priting residuals from solver to screen.

§ CG_LinSolver()

unsigned long CSysSolve::CG_LinSolver ( const CSysVector b,
CSysVector x,
CMatrixVectorProduct mat_vec,
CPreconditioner precond,
su2double  tol,
unsigned long  m,
bool  monitoring 
)

Conjugate Gradient method.

Parameters
[in]b- the right hand size vector
[in,out]x- on entry the intial guess, on exit the solution
[in]mat_vec- object that defines matrix-vector product
[in]precond- object that defines preconditioner
[in]tol- tolerance with which to solve the system
[in]m- maximum size of the search subspace
[in]monitoring- turn on priting residuals from solver to screen.

§ FGMRES_LinSolver()

unsigned long CSysSolve::FGMRES_LinSolver ( const CSysVector b,
CSysVector x,
CMatrixVectorProduct mat_vec,
CPreconditioner precond,
su2double  tol,
unsigned long  m,
su2double *  residual,
bool  monitoring 
)

Flexible Generalized Minimal Residual method.

Parameters
[in]b- the right hand size vector
[in,out]x- on entry the intial guess, on exit the solution
[in]mat_vec- object that defines matrix-vector product
[in]precond- object that defines preconditioner
[in]tol- tolerance with which to solve the system
[in]m- maximum size of the search subspace
[in]residual
[in]monitoring- turn on priting residuals from solver to screen.

§ SetExternalSolve()

void CSysSolve::SetExternalSolve ( CSysMatrix Jacobian,
CSysVector LinSysRes,
CSysVector LinSysSol,
CGeometry geometry,
CConfig config 
)

Prepare the linear solve during the reverse interpretation of the AD tape.

Parameters
[in]Jacobian- Jacobian Matrix for the linear system
[in]LinSysRes- Linear system residual
[in]LinSysSol- Linear system solution
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

§ Solve()

unsigned long CSysSolve::Solve ( CSysMatrix Jacobian,
CSysVector LinSysRes,
CSysVector LinSysSol,
CGeometry geometry,
CConfig config 
)

Solve the linear system using a Krylov subspace method.

Parameters
[in]Jacobian- Jacobian Matrix for the linear system
[in]LinSysRes- Linear system residual
[in]LinSysSol- Linear system solution
[in]geometry- Geometrical definition of the problem.
[in]config- Definition of the particular problem.

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