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) | |
virtual | ~solver () |
const word & | fieldName () const |
const LduMatrix< Type, DType, LUType > & | matrix () const |
virtual void | read (const dictionary &solverDict) |
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 |
Return the matrix norm used to normalise the residual for the. 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 | |
template<class T > | |
void | readControl (const dictionary &controlDict, T &control, const word &controlName) |
Read a control parameter from controlDict. More... | |
virtual void | readControls () |
Read the control parameters from the controlDict_. More... | |
Protected Attributes | |
word | fieldName_ |
const LduMatrix< Type, DType, LUType > & | matrix_ |
dictionary | controlDict_ |
Dictionary of controls. More... | |
label | maxIter_ |
Maximum number of iterations in the solver. More... | |
label | minIter_ |
Minimum number of iterations in the solver. More... | |
Type | tolerance_ |
Final convergence tolerance. More... | |
Type | relTol_ |
Convergence tolerance relative to the initial. More... | |
Static Protected Attributes | |
static const label | defaultMaxIter_ = 1000 |
Default maximum number of iterations in the solver. More... | |
Abstract base-class for LduMatrix solvers.
Definition at line 112 of file LduMatrix.H.
solver | ( | const word & | fieldName, |
const LduMatrix< Type, DType, LUType > & | matrix, | ||
const dictionary & | solverDict | ||
) |
Definition at line 123 of file LduMatrixSolver.C.
Referenced by LduMatrix< Type, DType, LUType >::solver::New().
|
inlinevirtual |
Definition at line 222 of file LduMatrix.H.
|
inlineprotected |
Read a control parameter from controlDict.
Definition at line 31 of file LduMatrixI.H.
References dictionary::found(), and dictionary::lookup().
Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().
|
protectedvirtual |
Read the control parameters from the controlDict_.
Reimplemented in SmoothSolver< Type, DType, LUType >.
Definition at line 146 of file LduMatrixSolver.C.
References LduMatrix< Type, DType, LUType >::solver::controlDict_, LduMatrix< Type, DType, LUType >::solver::maxIter_, LduMatrix< Type, DType, LUType >::solver::minIter_, LduMatrix< Type, DType, LUType >::solver::read(), LduMatrix< Type, DType, LUType >::solver::readControl(), LduMatrix< Type, DType, LUType >::solver::relTol_, and LduMatrix< Type, DType, LUType >::solver::tolerance_.
Referenced by LduMatrix< Type, DType, LUType >::solver::read().
|
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 34 of file LduMatrixSolver.C.
References LduMatrix< Type, DType, LUType >::asymmetric(), LduMatrix< Type, DType, LUType >::diagonal(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), LduMatrix< Type, DType, LUType >::solver::solver(), and LduMatrix< Type, DType, LUType >::symmetric().
Referenced by LduMatrix< Type, DType, LUType >::preconditioner::preconditioner().
|
inline |
Definition at line 230 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::solver::fieldName_.
|
inline |
Definition at line 235 of file LduMatrix.H.
References LduMatrix< Type, DType, LUType >::solver::matrix_, LduMatrix< Type, DType, LUType >::solver::normFactor(), psi, LduMatrix< Type, DType, LUType >::solver::read(), and LduMatrix< Type, DType, LUType >::solver::solve().
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 157 of file LduMatrixSolver.C.
References LduMatrix< Type, DType, LUType >::solver::controlDict_, LduMatrix< Type, DType, LUType >::solver::normFactor(), and LduMatrix< Type, DType, LUType >::solver::readControls().
Referenced by LduMatrix< Type, DType, LUType >::solver::matrix(), LduMatrix< Type, DType, LUType >::solver::readControls(), and LduMatrix< Type, DType, LUType >::preconditioner::~preconditioner().
|
pure virtual |
Implemented in PBiCCCG< Type, DType, LUType >, PBiCICG< Type, DType, LUType >, PCICG< Type, DType, LUType >, SmoothSolver< Type, DType, LUType >, and DiagonalSolver< Type, DType, LUType >.
Referenced by LduMatrix< Type, DType, LUType >::solver::matrix().
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
Definition at line 168 of file LduMatrixSolver.C.
References Foam::cmptMag(), Foam::cmptMultiply(), Foam::gAverage(), Foam::gSum(), LduMatrix< Type, DType, LUType >::solver::matrix_, and Foam::stabilise().
Referenced by LduMatrix< Type, DType, LUType >::solver::matrix(), and LduMatrix< Type, DType, LUType >::solver::read().
|
protected |
Definition at line 118 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::fieldName(), and LduMatrix< Type, DType, LUType >::smoother::fieldName().
|
protected |
Definition at line 119 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::matrix(), LduMatrix< Type, DType, LUType >::smoother::matrix(), and LduMatrix< Type, DType, LUType >::solver::normFactor().
|
protected |
Dictionary of controls.
Definition at line 122 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::read(), and LduMatrix< Type, DType, LUType >::solver::readControls().
|
staticprotected |
Default maximum number of iterations in the solver.
Definition at line 125 of file LduMatrix.H.
|
protected |
Maximum number of iterations in the solver.
Definition at line 128 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().
|
protected |
Minimum number of iterations in the solver.
Definition at line 131 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().
|
protected |
Final convergence tolerance.
Definition at line 134 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().
|
protected |
Convergence tolerance relative to the initial.
Definition at line 137 of file LduMatrix.H.
Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().