Preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditioner. More...
#include <PCICG.H>


Public Member Functions | |
| TypeName ("PCICG") | |
| Runtime type information. | |
| PCICG (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) | |
| Construct from matrix components and solver data dictionary. | |
| virtual | ~PCICG ()=default |
| virtual SolverPerformance< Type > | solve (Field< Type > &psi) const |
| Solve the matrix with this solver. | |
| Public Member Functions inherited from LduMatrix< Type, DType, LUType >::solver | |
| virtual const word & | type () const =0 |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, solver, symMatrix,(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict),(fieldName, matrix, solverDict)) | |
| declareRunTimeSelectionTable (autoPtr, solver, asymMatrix,(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict),(fieldName, matrix, solverDict)) | |
| solver (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) | |
| Construct for given field name, matrix and controls. | |
| virtual | ~solver ()=default |
| Destructor. | |
| const word & | fieldName () const noexcept |
| const LduMatrix< Type, DType, LUType > & | matrix () const noexcept |
| virtual void | read (const dictionary &) |
| Read and reset the solver parameters from the given dictionary. | |
| Type | normFactor (const Field< Type > &psi, const Field< Type > &Apsi, Field< Type > &tmpField, const lduMatrix::normTypes normType) const |
| Return the matrix norm using the specified norm method. | |
| Type | normFactor (const Field< Type > &psi, const Field< Type > &Apsi, Field< Type > &tmpField) const |
| Return the matrix norm used to normalise the residual for the stopping criterion. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from LduMatrix< Type, DType, LUType >::solver | |
| static autoPtr< solver > | New (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) |
| Return a new solver. | |
| Protected Member Functions inherited from LduMatrix< Type, DType, LUType >::solver | |
| virtual void | readControls () |
| Read the control parameters from controlDict_. | |
| template<class T> | |
| void | readControl (const dictionary &dict, T &val, const word &key) |
| Deprecated(2021-09) Read control parameter from dictionary. | |
| Protected Attributes inherited from LduMatrix< Type, DType, LUType >::solver | |
| word | fieldName_ |
| const LduMatrix< Type, DType, LUType > & | matrix_ |
| dictionary | controlDict_ |
| Dictionary of solution controls. | |
| int | log_ |
| Verbosity level for solver output statements. | |
| label | minIter_ |
| Minimum number of iterations in the solver. | |
| label | maxIter_ |
| Maximum number of iterations in the solver. | |
| lduMatrix::normTypes | normType_ |
| The matrix normalisation type. | |
| Type | tolerance_ |
| Final convergence tolerance. | |
| Type | relTol_ |
| Convergence tolerance relative to the initial. | |
Preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditioner.
| PCICG | ( | const word & | fieldName, |
| const LduMatrix< Type, DType, LUType > & | matrix, | ||
| const dictionary & | solverDict ) |
Construct from matrix components and solver data dictionary.
Definition at line 27 of file PCICG.C.
References LduMatrix< Type, DType, LUType >::solver::fieldName(), LduMatrix< Type, DType, LUType >::solver::matrix(), and LduMatrix< Type, DType, LUType >::solver::solver().

|
virtualdefault |
References psi.
| TypeName | ( | "PCICG< Type, DType, LUType >" | ) |
Runtime type information.
References LduMatrix< Type, DType, LUType >::solver::fieldName(), and LduMatrix< Type, DType, LUType >::solver::matrix().

|
virtual |
Solve the matrix with this solver.
Implements LduMatrix< Type, DType, LUType >::solver.
Definition at line 47 of file PCICG.C.
References alpha, UList< T >::begin(), beta(), SolverPerformance< Type >::checkConvergence(), SolverPerformance< Type >::checkSingularity(), Foam::cmptDivide(), Foam::cmptMag(), Foam::cmptMultiply(), LduMatrix< Type, DType, LUType >::solver::controlDict_, Foam::endl(), LduMatrix< Type, DType, LUType >::solver::fieldName_, SolverPerformance< Type >::finalResidual(), Foam::GlobalIOList< Tuple2< scalar, vector > >::typeName, SolverPerformance< Type >::great_, Foam::gSumCmptMag(), Foam::gSumCmptProd(), Foam::Info, SolverPerformance< Type >::initialResidual(), LduMatrix< Type, DType, LUType >::solver::log_, LduMatrix< Type, DType, LUType >::solver::matrix_, LduMatrix< Type, DType, LUType >::solver::maxIter_, LduMatrix< Type, DType, LUType >::solver::minIter_, LduMatrix< Type, DType, LUType >::preconditioner::New(), SolverPerformance< Type >::nIterations(), LduMatrix< Type, DType, LUType >::solver::normFactor(), psi, Foam::stabilise(), and SolverPerformance< Type >::vsmall_.
