BiCGstab
This class is used to manage the Preconditioned Bi-Coniugate Gradient Stab. More…
#include "BiCGstab.h"
Inherits from LinSolver
Inherited by BiCGstab_CPU
Public Functions
| Name | |
|---|---|
| virtual | ~BiCGstab() =0 Deletes the BiCGstab object. |
| virtual void | Set_Solver(MatrixProd & MAT, DDMat & RHS, MatrixProd & PREC) =0 Sets the solver for monolithic preconditoning. |
| virtual void | Set_Solver(MatrixProd & MAT, DDMat & RHS, MatrixProd & PREC_L, MatrixProd & PREC_R) =0 Sets the solver for split preconditoning. |
| virtual void | Solve(MatrixProd & MAT, DDMat & RHS, DDMat & SOL, MatrixProd & PREC, const string *restrict filename =nullptr) =0 Solves the linear system with monolithic preconditoning. |
| virtual void | Solve(MatrixProd & MAT, DDMat & RHS, DDMat & SOL, MatrixProd & PREC_L, MatrixProd & PREC_R, const string *restrict filename =nullptr) =0 Solves the linear system with split preconditoning. |
Protected Attributes
| Name | |
|---|---|
| DDMat * | RES0 Arrays used in BiCGstab solution loop. |
| DDMat * | PK |
| DDMat * | PK1 |
| DDMat * | APK |
| DDMat * | SK1 |
| DDMat * | ASK |
| DDMat * | reduc1 first scratch array for reduction. |
| DDMat * | reduc2 second scratch array for reduction. |
Additional inherited members
Public Functions inherited from LinSolver
| Name | |
|---|---|
| virtual | ~LinSolver() =0 Deletes the object. |
| void | Set_use_PrecRes(const bool input_use_PrecRes) Sets the the use of preconditioned residual in controlling convergence. |
| void | Set_maxITER(const int input_maxITER) Sets the maximum number of iterations. |
| void | Set_exitTOL(const double input_exitTOL) Sets the exit tolerance. |
| void | Set_initial_sol(const int input_initial_sol) Sets the flag for initial solution. |
| void | Set_printConvProfile(const bool input_printConvProfile) Sets the flag for Convergence Profile printing. |
| void | Set_restart(int const input_restart) Sets the restart frequency. |
| void | SetParms_from_XML(xml_document & input_xml) Sets the parameters from the XML file. |
| int | get_ITER() const Returns the number of iterations performed in previous solution. |
| const rExt * | get_ptr_normRES0() const Returns an handle to the Euclidean norm of the initial residual for each RHS. |
| const rExt * | get_ptr_normRESiter() const Returns an handle to the Euclidean norm of the final iterative residual for each RHS. |
| const rExt * | get_ptr_normRESreal() const Returns an handle to the Euclidean norm of the final real residual for each RHS. |
| const rExt * | get_ptr_normRHS() const Returns an handle to the Euclidean norm of each RHS. |
Protected Attributes inherited from LinSolver
| Name | |
|---|---|
| bool | Set_flag flag for Set_Solver. |
| bool | use_PrecRes parameter to decide whether to use standard or preconditioned residual |
| int | maxITER maximum number of iterations. |
| double | exitTOL exit tolerance. |
| int | initial_sol flag to set the initial solution. |
| int | restart |
| bool | printConvProfile flag for Convergence Profile printing. |
| DDMat * | RES residual array. |
| DDMat * | SCR1 array for scratch 1. |
| int | ITER total number of iterations. |
| VEC_CPU< rExt > | normRES0 euclidean norm of the initial residual. |
| VEC_CPU< rExt > | normRESiter euclidean norm of the final iterative residual. |
| VEC_CPU< rExt > | normRESreal euclidean norm of the final real residual. |
| VEC_CPU< rExt > | normRHS euclidean norm of the Right Hand Side. |
Detailed Description
class BiCGstab;
This class is used to manage the Preconditioned Bi-Coniugate Gradient Stab.
class BiCGstab.
Public Functions Documentation
function ~BiCGstab
virtual ~BiCGstab() =0
Deletes the BiCGstab object.
function Set_Solver
virtual void Set_Solver(
MatrixProd & MAT,
DDMat & RHS,
MatrixProd & PREC
) =0
Sets the solver for monolithic preconditoning.
Parameters:
- MAT system matrix.
- RHS Right Hand Side.
- PREC preconditioner.
Reimplements: LinSolver::Set_Solver
Reimplemented by: BiCGstab_CPU::Set_Solver
function Set_Solver
virtual void Set_Solver(
MatrixProd & MAT,
DDMat & RHS,
MatrixProd & PREC_L,
MatrixProd & PREC_R
) =0
Sets the solver for split preconditoning.
Parameters:
- MAT system matrix.
- RHS Right Hand Side.
- PREC_L LEFT preconditioner.
- PREC_R RIGHT preconditioner.
Reimplements: LinSolver::Set_Solver
Reimplemented by: BiCGstab_CPU::Set_Solver
function Solve
virtual void Solve(
MatrixProd & MAT,
DDMat & RHS,
DDMat & SOL,
MatrixProd & PREC,
const string *__restrict__ filename =nullptr
) =0
Solves the linear system with monolithic preconditoning.
Parameters:
- MAT system matrix.
- RHS system Right Hand Side.
- SOL solution array.
- PREC preconditioner.
- filename file name where the convergence profile is printed (optional).
Reimplements: LinSolver::Solve
Reimplemented by: BiCGstab_CPU::Solve
function Solve
virtual void Solve(
MatrixProd & MAT,
DDMat & RHS,
DDMat & SOL,
MatrixProd & PREC_L,
MatrixProd & PREC_R,
const string *__restrict__ filename =nullptr
) =0
Solves the linear system with split preconditoning.
Parameters:
- MAT system matrix.
- RHS system Right Hand Side.
- SOL solution array.
- PREC_L LEFT preconditioner.
- PREC_R RIGHT preconditioner.
- filename file name where the convergence profile is printed (optional).
Reimplements: LinSolver::Solve
Reimplemented by: BiCGstab_CPU::Solve
Protected Attributes Documentation
variable RES0
DDMat * RES0 = nullptr;
Arrays used in BiCGstab solution loop.
variable PK
DDMat * PK = nullptr;
variable PK1
DDMat * PK1 = nullptr;
variable APK
DDMat * APK = nullptr;
variable SK1
DDMat * SK1 = nullptr;
variable ASK
DDMat * ASK = nullptr;
variable reduc1
DDMat * reduc1;
first scratch array for reduction.
variable reduc2
DDMat * reduc2;
second scratch array for reduction.
Updated on 19 November 2024 at 10:20:48 CET