Abstract base-class for lduMatrix solvers. More...
Static Public Member Functions | |
static autoPtr< solver > | New (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 | |
virtual void | readControls () |
Read the control parameters from the controlDict_. More... | |
Protected Attributes | |
word | fieldName_ |
const lduMatrix & | matrix_ |
const FieldField< Field, scalar > & | interfaceBouCoeffs_ |
const FieldField< Field, scalar > & | interfaceIntCoeffs_ |
lduInterfaceFieldPtrsList | interfaces_ |
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... | |
scalar | tolerance_ |
Final convergence tolerance. More... | |
scalar | relTol_ |
Convergence tolerance relative to the initial. More... | |
profilingTrigger | profiling_ |
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 97 of file lduMatrix.H.
solver | ( | const word & | fieldName, |
const lduMatrix & | matrix, | ||
const FieldField< Field, scalar > & | interfaceBouCoeffs, | ||
const FieldField< Field, scalar > & | interfaceIntCoeffs, | ||
const lduInterfaceFieldPtrsList & | interfaces, | ||
const dictionary & | solverControls | ||
) |
Definition at line 140 of file lduMatrixSolver.C.
|
virtualdefault |
Destructor.
|
protectedvirtual |
Read the control parameters from the controlDict_.
Reimplemented in smoothSolver, and GAMGPreconditioner.
Definition at line 163 of file lduMatrixSolver.C.
References lduMatrix::solver::controlDict_, lduMatrix::solver::defaultMaxIter_, Foam::constant::electromagnetic::e, dictionary::getOrDefault(), lduMatrix::solver::maxIter_, lduMatrix::solver::minIter_, lduMatrix::solver::relTol_, and lduMatrix::solver::tolerance_.
Referenced by smoothSolver::readControls().
|
pure virtual |
Runtime type information.
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) | |||
) |
|
static |
Return a new solver.
Definition at line 45 of file lduMatrixSolver.C.
References lduMatrix::asymmetric(), lduMatrix::diagonal(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, dictionary::get(), Foam::name(), and lduMatrix::symmetric().
|
inline |
Definition at line 226 of file lduMatrix.H.
References lduMatrix::solver::fieldName_.
|
inline |
Definition at line 231 of file lduMatrix.H.
References lduMatrix::solver::matrix_.
Referenced by DICPreconditioner::DICPreconditioner(), DILUPreconditioner::DILUPreconditioner(), FDICPreconditioner::FDICPreconditioner(), and lduMatrix::preconditioner::New().
|
inline |
Definition at line 236 of file lduMatrix.H.
References lduMatrix::solver::interfaceBouCoeffs_.
|
inline |
Definition at line 241 of file lduMatrix.H.
References lduMatrix::solver::interfaceIntCoeffs_.
|
inline |
Definition at line 246 of file lduMatrix.H.
References lduMatrix::solver::interfaces_.
|
virtual |
Read and reset the solver parameters from the given stream.
Reimplemented in diagonalSolver.
Definition at line 172 of file lduMatrixSolver.C.
|
pure virtual |
Solve with given field and rhs.
Implemented in GAMGSolver, PPCG, PBiCGStab, PPCR, PCG, smoothSolver, diagonalSolver, and PBiCG.
|
virtual |
Solve with given field and rhs (in solveScalar precision).
Default is to call solve routine
Reimplemented in PBiCGStab, and PCG.
Definition at line 180 of file lduMatrixSolver.C.
References psi, PrecisionAdaptor< Type, InputType, Container >::ref(), and Foam::solve().
Foam::solveScalarField::cmptType normFactor | ( | const solveScalarField & | psi, |
const solveScalarField & | source, | ||
const solveScalarField & | Apsi, | ||
solveScalarField & | tmpField | ||
) | const |
Return the matrix norm used to normalise the residual for the stopping criterion
Definition at line 197 of file lduMatrixSolver.C.
References Foam::gAverage(), Foam::gSum(), Foam::mag(), psi, and SolverPerformance< Type >::small_.
|
protected |
Definition at line 103 of file lduMatrix.H.
Referenced by lduMatrix::solver::fieldName().
|
protected |
Definition at line 104 of file lduMatrix.H.
Referenced by lduMatrix::solver::matrix().
|
protected |
Definition at line 105 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaceBouCoeffs().
|
protected |
Definition at line 106 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaceIntCoeffs().
|
protected |
Definition at line 107 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaces().
|
protected |
Dictionary of controls.
Definition at line 110 of file lduMatrix.H.
Referenced by smoothSolver::readControls(), and lduMatrix::solver::readControls().
|
staticprotected |
Default maximum number of iterations in the solver.
Definition at line 113 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Maximum number of iterations in the solver.
Definition at line 116 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Minimum number of iterations in the solver.
Definition at line 119 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Final convergence tolerance.
Definition at line 122 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Convergence tolerance relative to the initial.
Definition at line 125 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Definition at line 127 of file lduMatrix.H.