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 &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)) | |
solver (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls) | |
Construct solver for given field name, matrix etc. More... | |
virtual | ~solver ()=default |
Destructor. More... | |
const word & | fieldName () const noexcept |
const lduMatrix & | matrix () const noexcept |
const FieldField< Field, scalar > & | interfaceBouCoeffs () const noexcept |
const FieldField< Field, scalar > & | interfaceIntCoeffs () const noexcept |
const lduInterfaceFieldPtrsList & | interfaces () const noexcept |
virtual void | read (const dictionary &) |
Read and reset the solver parameters from the given stream. More... | |
virtual solverPerformance | solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const =0 |
Solve with given field and rhs. More... | |
virtual solverPerformance | scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const |
Solve with given field and rhs (in solveScalar precision). More... | |
solveScalarField::cmptType | normFactor (const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField, const lduMatrix::normTypes normType) const |
Return the matrix norm using the specified norm method. More... | |
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. More... | |
Static Public Member Functions | |
static autoPtr< solver > | New (const word &solverName, 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 of given type. More... | |
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 given dictionary. More... | |
Protected Member Functions | |
virtual void | readControls () |
Read the control parameters from 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 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 normalisation type. More... | |
scalar | tolerance_ |
Final convergence tolerance. More... | |
scalar | relTol_ |
Convergence tolerance relative to the initial. More... | |
profilingTrigger | profiling_ |
Profiling instrumentation. More... | |
Abstract base-class for lduMatrix solvers.
Definition at line 141 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 | ||
) |
Construct solver for given field name, matrix etc.
Definition at line 155 of file lduMatrixSolver.C.
|
virtualdefault |
Destructor.
|
protectedvirtual |
Read the control parameters from controlDict_.
Reimplemented in smoothSolver, and GAMGPreconditioner.
Definition at line 186 of file lduMatrixSolver.C.
References lduMatrix::solver::controlDict_, lduMatrix::DEFAULT_NORM, lduMatrix::defaultMaxIter, lduMatrix::defaultTolerance, lduMatrix::solver::log_, lduMatrix::solver::maxIter_, lduMatrix::solver::minIter_, lduMatrix::solver::normType_, lduMatrix::normTypesNames_, Enum< EnumType >::readIfPresent(), dictionary::readIfPresent(), 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 of given type.
Definition at line 38 of file lduMatrixSolver.C.
References lduMatrix::asymmetric(), lduMatrix::diagonal(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, and lduMatrix::symmetric().
Referenced by viewFactor::calculate().
|
static |
Return a new solver given dictionary.
Definition at line 130 of file lduMatrixSolver.C.
References dictionary::get(), and Foam::New().
|
inlinenoexcept |
Definition at line 313 of file lduMatrix.H.
References lduMatrix::solver::fieldName_.
|
inlinenoexcept |
Definition at line 318 of file lduMatrix.H.
References lduMatrix::solver::matrix_.
Referenced by DICPreconditioner::DICPreconditioner(), DILUPreconditioner::DILUPreconditioner(), distributedDILUPreconditioner::distributedDILUPreconditioner(), FDICPreconditioner::FDICPreconditioner(), and lduMatrix::preconditioner::New().
|
inlinenoexcept |
Definition at line 323 of file lduMatrix.H.
References lduMatrix::solver::interfaceBouCoeffs_.
Referenced by distributedDILUPreconditioner::distributedDILUPreconditioner().
|
inlinenoexcept |
Definition at line 328 of file lduMatrix.H.
References lduMatrix::solver::interfaceIntCoeffs_.
|
inlinenoexcept |
Definition at line 333 of file lduMatrix.H.
References lduMatrix::solver::interfaces_.
Referenced by distributedDILUPreconditioner::distributedDILUPreconditioner().
|
virtual |
Read and reset the solver parameters from the given stream.
Reimplemented in diagonalSolver.
Definition at line 204 of file lduMatrixSolver.C.
|
pure virtual |
Solve with given field and rhs.
Implemented in GAMGSolver, PPCG, FPCG, PBiCGStab, parProfilingSolver, PCG, PPCR, smoothSolver, PBiCG, and diagonalSolver.
|
virtual |
Solve with given field and rhs (in solveScalar precision).
Default is to call solve routine
Reimplemented in FPCG, PBiCGStab, and PCG.
Definition at line 212 of file lduMatrixSolver.C.
References psi, refPtr< Container< Type > >::ref(), and Foam::solve().
Foam::solveScalarField::cmptType normFactor | ( | const solveScalarField & | psi, |
const solveScalarField & | source, | ||
const solveScalarField & | Apsi, | ||
solveScalarField & | tmpField, | ||
const lduMatrix::normTypes | normType | ||
) | const |
Return the matrix norm using the specified norm method.
Definition at line 229 of file lduMatrixSolver.C.
References lduMatrix::DEFAULT_NORM, Foam::gAverage(), Foam::gSum(), lduMatrix::L1_SCALED_NORM, Foam::mag(), lduMatrix::NO_NORM, psi, and SolverPerformance< Type >::small_.
Referenced by lduMatrix::solver::normFactor().
|
inline |
Return the matrix norm used to normalise the residual for the stopping criterion.
Definition at line 383 of file lduMatrix.H.
References lduMatrix::solver::normFactor(), and lduMatrix::solver::normType_.
|
protected |
Definition at line 147 of file lduMatrix.H.
Referenced by lduMatrix::solver::fieldName().
|
protected |
Definition at line 148 of file lduMatrix.H.
Referenced by lduMatrix::solver::matrix().
|
protected |
Definition at line 149 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaceBouCoeffs().
|
protected |
Definition at line 150 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaceIntCoeffs().
|
protected |
Definition at line 151 of file lduMatrix.H.
Referenced by lduMatrix::solver::interfaces().
|
protected |
Dictionary of solution controls.
Definition at line 156 of file lduMatrix.H.
Referenced by GAMGPreconditioner::readControls(), smoothSolver::readControls(), and lduMatrix::solver::readControls().
|
protected |
Verbosity level for solver output statements.
Definition at line 161 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Minimum number of iterations in the solver.
Definition at line 166 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Maximum number of iterations in the solver.
Definition at line 171 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
The normalisation type.
Definition at line 176 of file lduMatrix.H.
Referenced by lduMatrix::solver::normFactor(), and lduMatrix::solver::readControls().
|
protected |
Final convergence tolerance.
Definition at line 181 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Convergence tolerance relative to the initial.
Definition at line 186 of file lduMatrix.H.
Referenced by lduMatrix::solver::readControls().
|
protected |
Profiling instrumentation.
Definition at line 191 of file lduMatrix.H.