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 &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. | |
| virtual | ~solver ()=default |
| Destructor. | |
| 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. | |
| virtual solverPerformance | solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const =0 |
| Solve with given field and rhs. | |
| virtual solverPerformance | scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const |
| Solve with given field and rhs (in solveScalar precision). | |
| 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. | |
| 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. | |
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. | |
| 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. | |
Protected Member Functions | |
| virtual void | readControls () |
| Read the control parameters from controlDict_. | |
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. | |
| 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 normalisation type. | |
| scalar | tolerance_ |
| Final convergence tolerance. | |
| scalar | relTol_ |
| Convergence tolerance relative to the initial. | |
| profilingTrigger | profiling_ |
| Profiling instrumentation. | |
Abstract base-class for lduMatrix solvers.
Definition at line 151 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 154 of file lduMatrixSolver.C.
References controlDict_, lduMatrix::defaultMaxIter, lduMatrix::defaultTolerance, fieldName(), fieldName_, interfaceBouCoeffs(), interfaceBouCoeffs_, interfaceIntCoeffs(), interfaceIntCoeffs_, interfaces(), interfaces_, lduMatrix::lduMatrix(), log_, matrix(), matrix_, maxIter_, minIter_, normType_, profiling_, readControls(), relTol_, tolerance_, and Foam::Zero.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), FPCG::FPCG(), GAMGSolver::GAMGSolver(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), and smoothSolver::smoothSolver().


|
virtualdefault |
Destructor.
|
protectedvirtual |
Read the control parameters from controlDict_.
Reimplemented in GAMGPreconditioner, and smoothSolver.
Definition at line 186 of file lduMatrixSolver.C.
References controlDict_, lduMatrix::DEFAULT_NORM, lduMatrix::defaultMaxIter, lduMatrix::defaultTolerance, log_, maxIter_, minIter_, normType_, lduMatrix::normTypesNames_, relTol_, and tolerance_.
Referenced by GAMGSolver::GAMGSolver(), read(), GAMGPreconditioner::readControls(), smoothSolver::readControls(), and solver().

|
pure virtual |
Runtime type information.
Referenced by GAMGSolver::GAMGSolver().

| 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) | ) |
References fieldName(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and solver().

| 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) | ) |
References fieldName(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and solver().

|
static |
Return a new solver of given type.
Definition at line 37 of file lduMatrixSolver.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, fieldName(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), and matrix().
Referenced by viewFactor::calculate(), GAMGSolver::GAMGSolver(), parProfilingSolver::parProfilingSolver(), faMatrix< Type >::solve(), faMatrix< scalar >::solve(), fvMatrix< scalar >::solver(), fvMatrix< Type >::solveSegregated(), and fvMatrix< scalar >::solveSegregated().


|
static |
Return a new solver given dictionary.
Definition at line 129 of file lduMatrixSolver.C.
References fieldName(), dictionary::get(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and Foam::New().

|
inlinenoexcept |
Definition at line 323 of file lduMatrix.H.
References fieldName_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), FPCG::FPCG(), GAMGPreconditioner::GAMGPreconditioner(), GAMGSolver::GAMGSolver(), New(), New(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), PPCR::PPCR(), smoothSolver::smoothSolver(), solver(), diagonalSolver::TypeName(), FPCG::TypeName(), GAMGSolver::TypeName(), parProfilingSolver::TypeName(), PBiCG::TypeName(), PBiCGStab::TypeName(), PCG::TypeName(), PPCG::TypeName(), PPCR::TypeName(), and smoothSolver::TypeName().

|
inlinenoexcept |
Definition at line 328 of file lduMatrix.H.
References lduMatrix::lduMatrix(), matrix_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), DICPreconditioner::DICPreconditioner(), DILUPreconditioner::DILUPreconditioner(), distributedDILUPreconditioner::distributedDILUPreconditioner(), FDICPreconditioner::FDICPreconditioner(), FPCG::FPCG(), GAMGPreconditioner::GAMGPreconditioner(), GAMGSolver::GAMGSolver(), lduMatrix::preconditioner::New(), New(), New(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), PPCR::PPCR(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), smoothSolver::smoothSolver(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), solver(), diagonalSolver::TypeName(), FPCG::TypeName(), GAMGSolver::TypeName(), parProfilingSolver::TypeName(), PBiCG::TypeName(), PBiCGStab::TypeName(), PCG::TypeName(), PPCG::TypeName(), PPCR::TypeName(), and smoothSolver::TypeName().


|
inlinenoexcept |
Definition at line 333 of file lduMatrix.H.
References interfaceBouCoeffs_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), distributedDILUPreconditioner::distributedDILUPreconditioner(), FPCG::FPCG(), GAMGPreconditioner::GAMGPreconditioner(), GAMGSolver::GAMGSolver(), New(), New(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), PPCR::PPCR(), smoothSolver::smoothSolver(), solver(), diagonalSolver::TypeName(), FPCG::TypeName(), GAMGSolver::TypeName(), parProfilingSolver::TypeName(), PBiCG::TypeName(), PBiCGStab::TypeName(), PCG::TypeName(), PPCG::TypeName(), PPCR::TypeName(), and smoothSolver::TypeName().

|
inlinenoexcept |
Definition at line 338 of file lduMatrix.H.
References interfaceIntCoeffs_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), FPCG::FPCG(), GAMGPreconditioner::GAMGPreconditioner(), GAMGSolver::GAMGSolver(), New(), New(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), PPCR::PPCR(), smoothSolver::smoothSolver(), solver(), diagonalSolver::TypeName(), FPCG::TypeName(), GAMGSolver::TypeName(), parProfilingSolver::TypeName(), PBiCG::TypeName(), PBiCGStab::TypeName(), PCG::TypeName(), PPCG::TypeName(), PPCR::TypeName(), and smoothSolver::TypeName().

|
inlinenoexcept |
Definition at line 343 of file lduMatrix.H.
References interfaces_, and Foam::noexcept.
Referenced by declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), diagonalSolver::diagonalSolver(), distributedDILUPreconditioner::distributedDILUPreconditioner(), FPCG::FPCG(), GAMGPreconditioner::GAMGPreconditioner(), GAMGSolver::GAMGSolver(), New(), New(), parProfilingSolver::parProfilingSolver(), PBiCG::PBiCG(), PBiCGStab::PBiCGStab(), PCG::PCG(), PPCG::PPCG(), PPCR::PPCR(), smoothSolver::smoothSolver(), solver(), diagonalSolver::TypeName(), FPCG::TypeName(), GAMGSolver::TypeName(), parProfilingSolver::TypeName(), PBiCG::TypeName(), PBiCGStab::TypeName(), PCG::TypeName(), PPCG::TypeName(), PPCR::TypeName(), and smoothSolver::TypeName().

|
virtual |
Read and reset the solver parameters from the given stream.
Reimplemented in diagonalSolver.
Definition at line 204 of file lduMatrixSolver.C.
References controlDict_, and readControls().

|
pure virtual |
Solve with given field and rhs.
Implemented in diagonalSolver, FPCG, GAMGSolver, parProfilingSolver, PBiCG, PBiCGStab, PCG, PPCG, PPCR, and smoothSolver.
References psi.
|
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 211 of file lduMatrixSolver.C.
References psi, refPtr< T >::ref(), and 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 228 of file lduMatrixSolver.C.
References lduMatrix::DEFAULT_NORM, Foam::gAverage(), Foam::gSum(), interfaceBouCoeffs_, interfaces_, lduMatrix::L1_SCALED_NORM, Foam::mag(), matrix_, lduMatrix::NO_NORM, psi, and SolverPerformance< scalar >::small_.
Referenced by normFactor(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), and smoothSolver::solve().


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

|
protected |
Definition at line 157 of file lduMatrix.H.
Referenced by fieldName(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), diagonalSolver::solve(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Definition at line 158 of file lduMatrix.H.
Referenced by GAMGSolver::GAMGSolver(), matrix(), normFactor(), GAMGPreconditioner::precondition(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), diagonalSolver::solve(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Definition at line 159 of file lduMatrix.H.
Referenced by interfaceBouCoeffs(), normFactor(), GAMGPreconditioner::precondition(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Definition at line 160 of file lduMatrix.H.
Referenced by interfaceIntCoeffs(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Definition at line 161 of file lduMatrix.H.
Referenced by interfaces(), normFactor(), GAMGPreconditioner::precondition(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Dictionary of solution controls.
Definition at line 166 of file lduMatrix.H.
Referenced by GAMGSolver::GAMGSolver(), read(), GAMGPreconditioner::readControls(), readControls(), smoothSolver::readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Verbosity level for solver output statements.
Definition at line 171 of file lduMatrix.H.
Referenced by GAMGSolver::GAMGSolver(), readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Minimum number of iterations in the solver.
Definition at line 176 of file lduMatrix.H.
Referenced by readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Maximum number of iterations in the solver.
Definition at line 181 of file lduMatrix.H.
Referenced by readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
The normalisation type.
Definition at line 186 of file lduMatrix.H.
Referenced by normFactor(), readControls(), and solver().
|
protected |
Final convergence tolerance.
Definition at line 191 of file lduMatrix.H.
Referenced by GAMGSolver::GAMGSolver(), readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |
Convergence tolerance relative to the initial.
Definition at line 196 of file lduMatrix.H.
Referenced by GAMGSolver::GAMGSolver(), readControls(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), smoothSolver::solve(), and solver().
|
protected |