Abstract base-class for LduMatrix solvers. More...
#include <LduMatrix.H>


Public Member Functions | |
| 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. | |
| virtual SolverPerformance< Type > | solve (Field< Type > &psi) const =0 |
| 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. | |
Static Public Member Functions | |
| static autoPtr< solver > | New (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) |
| Return a new solver. | |
Protected Member Functions | |
| 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 | |
| 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. | |
Abstract base-class for LduMatrix solvers.
Definition at line 136 of file LduMatrix.H.
| solver | ( | const word & | fieldName, |
| const LduMatrix< Type, DType, LUType > & | matrix, | ||
| const dictionary & | solverDict ) |
Construct for given field name, matrix and controls.
Definition at line 113 of file LduMatrixSolver.C.
References controlDict_, fieldName(), fieldName_, LduMatrix< Type, DType, LUType >::LduMatrix(), log_, matrix(), matrix_, maxIter_, minIter_, normType_, readControls(), relTol_, tolerance_, and Foam::Zero.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), DiagonalSolver< Type, DType, LUType >::DiagonalSolver(), PBiCCCG< Type, DType, LUType >::PBiCCCG(), PBiCICG< Type, DType, LUType >::PBiCICG(), PCICG< Type, DType, LUType >::PCICG(), and SmoothSolver< Type, DType, LUType >::SmoothSolver().


|
virtualdefault |
Destructor.
|
protectedvirtual |
Read the control parameters from controlDict_.
Reimplemented in SmoothSolver< Type, DType, LUType >.
Definition at line 139 of file LduMatrixSolver.C.
References controlDict_, lduMatrix::DEFAULT_NORM, log_, maxIter_, minIter_, normType_, lduMatrix::normTypesNames_, relTol_, and tolerance_.
Referenced by read(), SmoothSolver< Type, DType, LUType >::readControls(), and solver().

|
inlineprotected |
Deprecated(2021-09) Read control parameter from dictionary.
Definition at line 197 of file LduMatrix.H.
References dict, and Foam::T().

|
pure virtual |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| solver | , | ||
| symMatrix | , | ||
| (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) | , | ||
| (fieldName, matrix, solverDict) | ) |
References fieldName(), LduMatrix< Type, DType, LUType >::LduMatrix(), matrix(), and solver().

| declareRunTimeSelectionTable | ( | autoPtr | , |
| solver | , | ||
| asymMatrix | , | ||
| (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) | , | ||
| (fieldName, matrix, solverDict) | ) |
References fieldName(), LduMatrix< Type, DType, LUType >::LduMatrix(), matrix(), and solver().

|
static |
Return a new solver.
Definition at line 29 of file LduMatrixSolver.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, fieldName(), dictionary::get(), LduMatrix< Type, DType, LUType >::LduMatrix(), and matrix().
Referenced by fvMatrix< Type >::solveCoupled().


|
inlinenoexcept |
Definition at line 282 of file LduMatrix.H.
References fieldName_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), DiagonalSolver< Type, DType, LUType >::DiagonalSolver(), New(), PBiCCCG< Type, DType, LUType >::PBiCCCG(), PBiCICG< Type, DType, LUType >::PBiCICG(), PCICG< Type, DType, LUType >::PCICG(), SmoothSolver< Type, DType, LUType >::SmoothSolver(), solver(), DiagonalSolver< Type, DType, LUType >::TypeName(), PBiCCCG< Type, DType, LUType >::TypeName(), PBiCICG< Type, DType, LUType >::TypeName(), PCICG< Type, DType, LUType >::TypeName(), and SmoothSolver< Type, DType, LUType >::TypeName().

|
inlinenoexcept |
Definition at line 287 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::LduMatrix(), matrix_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), DiagonalSolver< Type, DType, LUType >::DiagonalSolver(), LduMatrix< Type, DType, LUType >::preconditioner::New(), New(), PBiCCCG< Type, DType, LUType >::PBiCCCG(), PBiCICG< Type, DType, LUType >::PBiCICG(), PCICG< Type, DType, LUType >::PCICG(), SmoothSolver< Type, DType, LUType >::SmoothSolver(), solver(), TDILUPreconditioner< Type, DType, LUType >::TDILUPreconditioner(), DiagonalSolver< Type, DType, LUType >::TypeName(), PBiCCCG< Type, DType, LUType >::TypeName(), PBiCICG< Type, DType, LUType >::TypeName(), PCICG< Type, DType, LUType >::TypeName(), and SmoothSolver< Type, DType, LUType >::TypeName().


|
virtual |
Read and reset the solver parameters from the given dictionary.
Reimplemented in DiagonalSolver< Type, DType, LUType >.
Definition at line 152 of file LduMatrixSolver.C.
References controlDict_, and readControls().

|
pure virtual |
Implemented in DiagonalSolver< Type, DType, LUType >, PBiCCCG< Type, DType, LUType >, PBiCICG< Type, DType, LUType >, PCICG< Type, DType, LUType >, and SmoothSolver< Type, DType, LUType >.
References psi.
| 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.
Definition at line 163 of file LduMatrixSolver.C.
References Foam::cmptMultiply(), lduMatrix::DEFAULT_NORM, Foam::gAverage(), lduMatrix::L1_SCALED_NORM, matrix_, lduMatrix::NO_NORM, psi, and Foam::stabilise().
Referenced by normFactor(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), and SmoothSolver< Type, DType, LUType >::solve().


|
inline |
Return the matrix norm used to normalise the residual for the stopping criterion.
Definition at line 318 of file LduMatrix.H.
References normFactor(), normType_, and psi.

|
protected |
Definition at line 142 of file LduMatrix.H.
Referenced by fieldName(), DiagonalSolver< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
Definition at line 143 of file LduMatrix.H.
Referenced by matrix(), normFactor(), DiagonalSolver< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
Dictionary of solution controls.
Definition at line 148 of file LduMatrix.H.
Referenced by read(), readControls(), SmoothSolver< Type, DType, LUType >::readControls(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
Verbosity level for solver output statements.
Definition at line 153 of file LduMatrix.H.
Referenced by readControls(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
Minimum number of iterations in the solver.
Definition at line 158 of file LduMatrix.H.
Referenced by readControls(), PBiCCCG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
Maximum number of iterations in the solver.
Definition at line 163 of file LduMatrix.H.
Referenced by readControls(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), SmoothSolver< Type, DType, LUType >::solve(), and solver().
|
protected |
The matrix normalisation type.
Definition at line 168 of file LduMatrix.H.
Referenced by normFactor(), readControls(), and solver().
|
protected |
Final convergence tolerance.
Definition at line 173 of file LduMatrix.H.
Referenced by readControls(), and solver().
|
protected |
Convergence tolerance relative to the initial.
Definition at line 178 of file LduMatrix.H.
Referenced by readControls(), and solver().