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 label nIter=0, const bool converged=false, const bool singular=false) | |
const word & | solverName () const |
Return solver name. More... | |
word & | solverName () |
Return solver name. More... | |
const word & | fieldName () const |
Return field name. More... | |
const Type & | initialResidual () const |
Return initial residual. More... | |
Type & | initialResidual () |
Return initial residual. More... | |
const Type & | finalResidual () const |
Return final residual. More... | |
Type & | finalResidual () |
Return final residual. More... | |
label | nIterations () const |
Return number of iterations. More... | |
label & | nIterations () |
Return number of iterations. More... | |
bool | converged () const |
Has the solver converged? More... | |
bool | singular () const |
Is the matrix singular? More... | |
bool | checkConvergence (const Type &tolerance, const Type &relTolerance) |
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 |
Foam::SolverPerformance< Foam::scalar > | max () |
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... | |
Private Attributes | |
word | solverName_ |
word | fieldName_ |
Type | initialResidual_ |
Type | finalResidual_ |
label | noIterations_ |
bool | converged_ |
FixedList< bool, pTraits< Type >::nComponents > | singular_ |
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 49 of file SolverPerformance.H.
|
inline |
Definition at line 110 of file SolverPerformance.H.
|
inline |
Definition at line 121 of file SolverPerformance.H.
ClassName | ( | "SolverPerformance" | ) |
|
inline |
Return solver name.
Definition at line 144 of file SolverPerformance.H.
References SolverPerformance::solverName_.
|
inline |
Return solver name.
Definition at line 150 of file SolverPerformance.H.
References SolverPerformance::solverName_.
|
inline |
Return field name.
Definition at line 157 of file SolverPerformance.H.
References SolverPerformance::fieldName_.
Referenced by data::setSolverPerformance().
|
inline |
Return initial residual.
Definition at line 164 of file SolverPerformance.H.
References SolverPerformance::initialResidual_.
Referenced by radiativeIntensityRay::correct(), SmoothSolver< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCG::solve(), PBiCGSTAB::solve(), PBiCG::solve(), smoothSolver::solve(), PBiCGStab::solve(), and GAMGSolver::solve().
|
inline |
Return initial residual.
Definition at line 170 of file SolverPerformance.H.
References SolverPerformance::initialResidual_.
|
inline |
Return final residual.
Definition at line 177 of file SolverPerformance.H.
References SolverPerformance::finalResidual_.
Referenced by SmoothSolver< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCG::solve(), PBiCGSTAB::solve(), PBiCG::solve(), smoothSolver::solve(), PBiCGStab::solve(), and GAMGSolver::solve().
|
inline |
Return final residual.
Definition at line 183 of file SolverPerformance.H.
References SolverPerformance::finalResidual_.
|
inline |
Return number of iterations.
Definition at line 190 of file SolverPerformance.H.
References SolverPerformance::noIterations_.
Referenced by SmoothSolver< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCG::solve(), PBiCGSTAB::solve(), PBiCG::solve(), smoothSolver::solve(), PBiCGStab::solve(), and GAMGSolver::solve().
|
inline |
Return number of iterations.
Definition at line 196 of file SolverPerformance.H.
References SolverPerformance::noIterations_.
|
inline |
Has the solver converged?
Definition at line 203 of file SolverPerformance.H.
References SolverPerformance::converged_.
bool singular | ( | ) | const |
Is the matrix singular?
Definition at line 48 of file SolverPerformance.C.
bool checkConvergence | ( | const Type & | tolerance, |
const Type & | relTolerance | ||
) |
Check, store and return convergence.
Definition at line 61 of file SolverPerformance.C.
References Foam::cmptMultiply(), Foam::endl(), and Foam::Info.
Referenced by SmoothSolver< Type, DType, LUType >::solve(), PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PCG::solve(), PBiCGSTAB::solve(), PBiCG::solve(), smoothSolver::solve(), PBiCGStab::solve(), and GAMGSolver::solve().
bool checkSingularity | ( | const Type & | residual | ) |
Singularity test.
Definition at line 33 of file SolverPerformance.C.
References Foam::component().
Referenced by PBiCCCG< Type, DType, LUType >::solve(), PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PBiCGSTAB::solve(), PBiCG::solve(), PCG::solve(), and PBiCGStab::solve().
void print | ( | Ostream & | os | ) | const |
Print summary of solver performance to the given stream.
Definition at line 97 of file SolverPerformance.C.
References Foam::component(), and Foam::endl().
Referenced by fvMatrix::fvSolver::solve(), GAMGSolver::solve(), GAMGSolver::solveCoarsestLevel(), 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 131 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 144 of file SolverPerformance.C.
References Foam::cmptMax().
bool operator!= | ( | const SolverPerformance< Type > & | sp | ) | const |
Definition at line 161 of file SolverPerformance.C.
Foam::SolverPerformance< Foam::scalar > max | ( | ) |
Definition at line 41 of file solverPerformance.C.
SolverPerformance< scalar > max | ( | ) |
|
friend |
Return the element-wise maximum of two SolverPerformance<Type>s.
|
friend |
|
friend |
|
private |
Definition at line 82 of file SolverPerformance.H.
Referenced by SolverPerformance::solverName().
|
private |
Definition at line 83 of file SolverPerformance.H.
Referenced by SolverPerformance::fieldName().
|
private |
Definition at line 84 of file SolverPerformance.H.
Referenced by SolverPerformance::initialResidual().
|
private |
Definition at line 85 of file SolverPerformance.H.
Referenced by SolverPerformance::finalResidual().
|
private |
Definition at line 86 of file SolverPerformance.H.
Referenced by SolverPerformance::nIterations().
|
private |
Definition at line 87 of file SolverPerformance.H.
Referenced by SolverPerformance::converged().
Definition at line 88 of file SolverPerformance.H.
|
static |
Large Type for the use in solvers.
Definition at line 99 of file SolverPerformance.H.
Referenced by PBiCICG< Type, DType, LUType >::solve(), PCICG< Type, DType, LUType >::solve(), PCG::solve(), PBiCG::solve(), and PBiCGSTAB::solve().
|
static |
Small Type for the use in solvers.
Definition at line 102 of file SolverPerformance.H.
Referenced by lduMatrix::solver::normFactor().
|
static |
Very small Type for the use in solvers.
Definition at line 105 of file SolverPerformance.H.
Referenced by PBiCICG< Type, DType, LUType >::solve(), and PCICG< Type, DType, LUType >::solve().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.