40 for(
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
53 for(
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
55 if (!singular_[cmpt])
return false;
65 const Type& Tolerance,
66 const Type& RelTolerance,
70 if ((logLevel >= 2) || (debug >= 2))
73 <<
": Iteration " << nIterations_
74 <<
" residual = " << finalResidual_
80 finalResidual_ < Tolerance
83 && finalResidual_ <
cmptMultiply(RelTolerance, initialResidual_)
97 for(
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
99 os << solverName_ <<
": Solving for ";
111 os <<
": solution singularity" <<
endl;
115 os <<
", Initial residual = " <<
component(initialResidual_, cmpt)
116 <<
", Final residual = " <<
component(finalResidual_, cmpt)
117 <<
", No Iterations " << nIterations_
127 const Foam::label cmpt,
131 initialResidual_.replace(cmpt, sp.initialResidual());
132 finalResidual_.replace(cmpt, sp.finalResidual());
133 nIterations_.replace(cmpt, sp.nIterations());
134 singular_[cmpt] = sp.singular();
163 solverName() != sp.solverName()
164 || fieldName() != sp.fieldName()
165 || initialResidual() != sp.initialResidual()
166 || finalResidual() != sp.finalResidual()
167 || nIterations() != sp.nIterations()
168 || converged() != sp.converged()
169 || singular() != sp.singular()
204 >> sp.initialResidual_
209 is.readEnd(
"SolverPerformance");
222 os << token::BEGIN_LIST
223 << sp.solverName_ << token::SPACE
224 << sp.fieldName_ << token::SPACE
225 << sp.initialResidual_ << token::SPACE
226 << sp.finalResidual_ << token::SPACE
227 << sp.nIterations_ << token::SPACE
228 << sp.converged_ << token::SPACE
229 << sp.singular_ << token::SPACE
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
scalar print()
Print to screen.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A traits class, which is primarily used for primitives.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)