Abstract base-class for LduMatrix solvers. More...


Public Member Functions | |
| virtual const word & | type () const =0 |
| Runtime type information. More... | |
| 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. More... | |
| virtual | ~solver ()=default |
| Destructor. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions | |
| static autoPtr< solver > | New (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict) |
| Return a new solver. More... | |
Protected Member Functions | |
| virtual void | readControls () |
| Read the control parameters from controlDict_. More... | |
| template<class T > | |
| void | readControl (const dictionary &dict, T &val, const word &key) |
| Deprecated(2021-09) Read control parameter from dictionary. More... | |
Protected Attributes | |
| word | fieldName_ |
| const LduMatrix< Type, DType, LUType > & | matrix_ |
| dictionary | controlDict_ |
| Dictionary of solution controls. More... | |
| int | log_ |
| Verbosity level for solver output statements. More... | |
| label | minIter_ |
| Minimum number of iterations in the solver. More... | |
| label | maxIter_ |
| Maximum number of iterations in the solver. More... | |
| lduMatrix::normTypes | normType_ |
| The matrix normalisation type. More... | |
| Type | tolerance_ |
| Final convergence tolerance. More... | |
| Type | relTol_ |
| Convergence tolerance relative to the initial. More... | |
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 114 of file LduMatrixSolver.C.
|
virtualdefault |
Destructor.
|
protectedvirtual |
Read the control parameters from controlDict_.
Reimplemented in SmoothSolver< Type, DType, LUType >.
Definition at line 139 of file LduMatrixSolver.C.
References LduMatrix< Type, DType, LUType >::solver::controlDict_, lduMatrix::DEFAULT_NORM, LduMatrix< Type, DType, LUType >::solver::log_, LduMatrix< Type, DType, LUType >::solver::maxIter_, LduMatrix< Type, DType, LUType >::solver::minIter_, LduMatrix< Type, DType, LUType >::solver::normType_, lduMatrix::normTypesNames_, Enum< EnumType >::readIfPresent(), dictionary::readIfPresent(), LduMatrix< Type, DType, LUType >::solver::relTol_, and LduMatrix< Type, DType, LUType >::solver::tolerance_.

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

|
pure virtual |
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) | |||
| ) |
|
static |
Return a new solver.
Definition at line 30 of file LduMatrixSolver.C.
References LduMatrix< Type, DType, LUType >::asymmetric(), LduMatrix< Type, DType, LUType >::diagonal(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, dictionary::get(), and LduMatrix< Type, DType, LUType >::symmetric().

|
inlinenoexcept |
Definition at line 282 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::solver::fieldName_.
|
inlinenoexcept |
Definition at line 287 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::solver::matrix_.
Referenced by LduMatrix< Type, DType, LUType >::preconditioner::New(), and TDILUPreconditioner< Type, DType, LUType >::TDILUPreconditioner().

|
virtual |
Read and reset the solver parameters from the given dictionary.
Reimplemented in DiagonalSolver< Type, DType, LUType >.
Definition at line 153 of file LduMatrixSolver.C.
|
pure virtual |
| 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 164 of file LduMatrixSolver.C.
References Foam::cmptMag(), Foam::cmptMultiply(), lduMatrix::DEFAULT_NORM, Foam::gAverage(), Foam::gSum(), lduMatrix::L1_SCALED_NORM, lduMatrix::NO_NORM, psi, and Foam::stabilise().
Referenced by LduMatrix< Type, DType, LUType >::solver::normFactor().


|
inline |
Return the matrix norm used to normalise the residual for the stopping criterion.
Definition at line 319 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::solver::normFactor(), and LduMatrix< Type, DType, LUType >::solver::normType_.

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