PBiCGStab Class Reference

Preconditioned bi-conjugate gradient stabilized solver for asymmetric lduMatrices using a run-time selectable preconditioner. More...

Inheritance diagram for PBiCGStab:
[legend]
Collaboration diagram for PBiCGStab:
[legend]

Public Member Functions

 TypeName ("PBiCGStab")
 Runtime type information. More...
 
 PBiCGStab (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Construct from matrix components and solver data stream. More...
 
virtual ~PBiCGStab ()=default
 Destructor. More...
 
virtual solverPerformance scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
 Solve the matrix with this solver. More...
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const
 Solve the matrix with this solver. More...
 
- Public Member Functions inherited from lduMatrix::solver
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, solver, symMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
 
 declareRunTimeSelectionTable (autoPtr, solver, asymMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
 
 solver (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 
virtual ~solver ()=default
 Destructor. More...
 
const wordfieldName () const noexcept
 
const lduMatrixmatrix () const noexcept
 
const FieldField< Field, scalar > & interfaceBouCoeffs () const noexcept
 
const FieldField< Field, scalar > & interfaceIntCoeffs () const noexcept
 
const lduInterfaceFieldPtrsListinterfaces () const noexcept
 
virtual void read (const dictionary &)
 Read and reset the solver parameters from the given stream. More...
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const =0
 Solve with given field and rhs. More...
 
virtual solverPerformance scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
 Solve with given field and rhs (in solveScalar precision). More...
 
solveScalarField::cmptType normFactor (const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField) const
 

Additional Inherited Members

- Static Public Member Functions inherited from lduMatrix::solver
static autoPtr< solverNew (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Return a new solver. More...
 
- Protected Member Functions inherited from lduMatrix::solver
virtual void readControls ()
 Read the control parameters from the controlDict_. More...
 
- Protected Attributes inherited from lduMatrix::solver
word fieldName_
 
const lduMatrixmatrix_
 
const FieldField< Field, scalar > & interfaceBouCoeffs_
 
const FieldField< Field, scalar > & interfaceIntCoeffs_
 
lduInterfaceFieldPtrsList interfaces_
 
dictionary controlDict_
 Dictionary of controls. More...
 
int log_
 Level of verbosity in the solver output statements. More...
 
label minIter_
 Minimum number of iterations in the solver. More...
 
label maxIter_
 Maximum number of iterations in the solver. More...
 
scalar tolerance_
 Final convergence tolerance. More...
 
scalar relTol_
 Convergence tolerance relative to the initial. More...
 
profilingTrigger profiling_
 
- Static Protected Attributes inherited from lduMatrix::solver
static const label defaultMaxIter_ = 1000
 Default maximum number of iterations in the solver. More...
 

Detailed Description

Preconditioned bi-conjugate gradient stabilized solver for asymmetric lduMatrices using a run-time selectable preconditioner.

References:

    Van der Vorst, H. A. (1992).
    Bi-CGSTAB: A fast and smoothly converging variant of Bi-CG
    for the solution of nonsymmetric linear systems.
    SIAM Journal on scientific and Statistical Computing, 13(2), 631-644.

    Barrett, R., Berry, M. W., Chan, T. F., Demmel, J., Donato, J.,
    Dongarra, J., Eijkhout, V., Pozo, R., Romine, C. & Van der Vorst, H.
    (1994).
    Templates for the solution of linear systems:
    building blocks for iterative methods
    (Vol. 43). Siam.
Source files

Definition at line 67 of file PBiCGStab.H.

Constructor & Destructor Documentation

◆ PBiCGStab()

PBiCGStab ( const word fieldName,
const lduMatrix matrix,
const FieldField< Field, scalar > &  interfaceBouCoeffs,
const FieldField< Field, scalar > &  interfaceIntCoeffs,
const lduInterfaceFieldPtrsList interfaces,
const dictionary solverControls 
)

Construct from matrix components and solver data stream.

Definition at line 48 of file PBiCGStab.C.

◆ ~PBiCGStab()

virtual ~PBiCGStab ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "PBiCGStab"  )

Runtime type information.

◆ scalarSolve()

Foam::solverPerformance scalarSolve ( solveScalarField psi,
const solveScalarField source,
const direction  cmpt = 0 
) const
virtual

Solve the matrix with this solver.

Reimplemented from lduMatrix::solver.

Definition at line 72 of file PBiCGStab.C.

References alpha, UList< T >::begin(), beta(), SolverPerformance< Type >::checkConvergence(), SolverPerformance< Type >::checkSingularity(), Foam::endl(), SolverPerformance< Type >::finalResidual(), NURBS3DCurve::getName(), Foam::gSumMag(), Foam::gSumProd(), Foam::gSumSqr(), Foam::Info, SolverPerformance< Type >::initialResidual(), Foam::mag(), mesh, Time::New(), SolverPerformance< Type >::nIterations(), psi, and UList< T >::size().

Here is the call graph for this function:

◆ solve()

Foam::solverPerformance solve ( scalarField psi,
const scalarField source,
const direction  cmpt = 0 
) const
virtual

Solve the matrix with this solver.

Implements lduMatrix::solver.

Definition at line 278 of file PBiCGStab.C.

References refPtr< T >::ref().

Here is the call graph for this function:

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