SolverPerformance is the class returned by the LduMatrix solver containing performance statistics. More...
Public Member Functions | |
ClassName ("SolverPerformance") | |
SolverPerformance () | |
SolverPerformance (const word &solverName, const word &fieldName, const Type &iRes=pTraits< Type >::zero, const Type &fRes=pTraits< Type >::zero, const labelType &nIter=pTraits< labelType >::zero, const bool converged=false, const bool singular=false) | |
const word & | solverName () const noexcept |
Return solver name. More... | |
word & | solverName () noexcept |
Return solver name. More... | |
const word & | fieldName () const noexcept |
Return field name. More... | |
const Type & | initialResidual () const noexcept |
Return initial residual. More... | |
Type & | initialResidual () noexcept |
Return initial residual. More... | |
const Type & | finalResidual () const noexcept |
Return final residual. More... | |
Type & | finalResidual () noexcept |
Return final residual. More... | |
const labelType & | nIterations () const noexcept |
Return number of iterations. More... | |
labelType & | nIterations () noexcept |
Return number of iterations. More... | |
bool | converged () const noexcept |
Has the solver converged? More... | |
bool | singular () const |
Is the matrix singular? More... | |
bool | checkConvergence (const Type &tolerance, const Type &relTolerance, const int logLevel=0) |
Check, store and return convergence. More... | |
bool | checkSingularity (const Type &residual) |
Singularity test. More... | |
void | print (Ostream &os) const |
Print summary of solver performance to the given stream. More... | |
void | replace (const label cmpt, const SolverPerformance< typename pTraits< Type >::cmptType > &sp) |
Replace component based on the minimal SolverPerformance. More... | |
SolverPerformance< typename pTraits< Type >::cmptType > | max () |
Return the summary maximum of SolverPerformance<Type> More... | |
bool | operator!= (const SolverPerformance< Type > &) const |
template<> | |
Foam::SolverPerformance< Foam::scalar > | max () |
template<> | |
SolverPerformance< scalar > | max () |
Static Public Attributes | |
static const scalar | great_ |
Large Type for the use in solvers. More... | |
static const scalar | small_ |
Small Type for the use in solvers. More... | |
static const scalar | vsmall_ |
Very small Type for the use in solvers. More... | |
Friends | |
SolverPerformance< Type > | Foam::max (const SolverPerformance< Type > &, const SolverPerformance< Type > &) |
Return the element-wise maximum of two SolverPerformance<Type>s. More... | |
Istream & | operator>> (Istream &, SolverPerformance< Type > &) |
Ostream & | operator (Ostream &, const SolverPerformance< Type > &) |
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition at line 48 of file SolverPerformance.H.
|
inline |
Definition at line 118 of file SolverPerformance.H.
|
inline |
Definition at line 129 of file SolverPerformance.H.
ClassName | ( | "SolverPerformance< Type >" | ) |
|
inlinenoexcept |
Return solver name.
Definition at line 154 of file SolverPerformance.H.
Referenced by faMatrix< Type >::solve(), and fvMatrix< Type >::solveSegregated().
|
inlinenoexcept |
Return solver name.
Definition at line 162 of file SolverPerformance.H.
|
inlinenoexcept |
Return field name.
Definition at line 171 of file SolverPerformance.H.
Referenced by data::setSolverPerformance().
|
inlinenoexcept |
Return initial residual.
Definition at line 180 of file SolverPerformance.H.
Referenced by radiativeIntensityRay::correct(), PCG::scalarSolve(), PBiCGStab::scalarSolve(), FPCG::scalarSolve(), PPCG::scalarSolveCG(), SmoothSolver< Type, DType, LUType >::solve(), PBiCG::solve(), smoothSolver::solve(), and GAMGSolver::solve().
|
inlinenoexcept |
Return initial residual.
Definition at line 188 of file SolverPerformance.H.
|
inlinenoexcept |
Return final residual.
Definition at line 197 of file SolverPerformance.H.
Referenced by PCG::scalarSolve(), PBiCGStab::scalarSolve(), FPCG::scalarSolve(), PPCG::scalarSolveCG(), SmoothSolver< Type, DType, LUType >::solve(), PBiCG::solve(), smoothSolver::solve(), and GAMGSolver::solve().
|
inlinenoexcept |
Return final residual.
Definition at line 205 of file SolverPerformance.H.
|
inlinenoexcept |
Return number of iterations.
Definition at line 214 of file SolverPerformance.H.
Referenced by PCG::scalarSolve(), PBiCGStab::scalarSolve(), FPCG::scalarSolve(), PPCG::scalarSolveCG(), SmoothSolver< Type, DType, LUType >::solve(), PBiCG::solve(), smoothSolver::solve(), and GAMGSolver::solve().
|
inlinenoexcept |
Return number of iterations.
Definition at line 222 of file SolverPerformance.H.
|
inlinenoexcept |
Has the solver converged?
Definition at line 231 of file SolverPerformance.H.
bool singular | ( | ) | const |
Is the matrix singular?
Definition at line 44 of file SolverPerformance.C.
bool checkConvergence | ( | const Type & | tolerance, |
const Type & | relTolerance, | ||
const int | logLevel = 0 |
||
) |
Check, store and return convergence.
Definition at line 57 of file SolverPerformance.C.
References Foam::cmptMultiply(), Foam::ensightOutput::debug, Foam::endl(), and Foam::Info.
Referenced by PCG::scalarSolve(), PBiCGStab::scalarSolve(), FPCG::scalarSolve(), PPCG::scalarSolveCG(), SmoothSolver< Type, DType, LUType >::solve(), PBiCG::solve(), smoothSolver::solve(), and GAMGSolver::solve().
bool checkSingularity | ( | const Type & | residual | ) |
Singularity test.
Definition at line 29 of file SolverPerformance.C.
References Foam::component().
Referenced by PCG::scalarSolve(), PBiCGStab::scalarSolve(), FPCG::scalarSolve(), and PBiCG::solve().
void print | ( | Ostream & | os | ) | const |
Print summary of solver performance to the given stream.
Definition at line 86 of file SolverPerformance.C.
References Foam::component(), Foam::endl(), and os().
Referenced by viewFactor::calculate(), fvMatrix< Type >::fvSolver::solve(), GAMGSolver::solve(), faMatrix< Type >::solve(), fvMatrix< Type >::solveCoupled(), and fvMatrix< Type >::solveSegregated().
void replace | ( | const label | cmpt, |
const SolverPerformance< typename pTraits< Type >::cmptType > & | sp | ||
) |
Replace component based on the minimal SolverPerformance.
Definition at line 119 of file SolverPerformance.C.
Foam::SolverPerformance< typename Foam::pTraits< Type >::cmptType > max | ( | ) |
Return the summary maximum of SolverPerformance<Type>
Effectively it will mostly return solverPerformanceScalar
Definition at line 133 of file SolverPerformance.C.
References Foam::cmptMax().
bool operator!= | ( | const SolverPerformance< Type > & | sp | ) | const |
Definition at line 150 of file SolverPerformance.C.
Foam::SolverPerformance< Foam::scalar > max | ( | ) |
Definition at line 36 of file solverPerformance.C.
SolverPerformance< scalar > max | ( | ) |
|
friend |
Return the element-wise maximum of two SolverPerformance<Type>s.
|
friend |
|
friend |
|
static |
Large Type for the use in solvers.
Definition at line 103 of file SolverPerformance.H.
Referenced by PCG::scalarSolve(), and FPCG::scalarSolve().
|
static |
Small Type for the use in solvers.
Definition at line 108 of file SolverPerformance.H.
Referenced by lduMatrix::solver::normFactor().
|
static |
Very small Type for the use in solvers.
Definition at line 113 of file SolverPerformance.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.