Go to the documentation of this file.
45 if (foundObject<fieldType>(fieldName))
47 writeTabbed(
os, fieldName +
"_solver");
51 mesh_.validComponents<Type>()
54 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
56 if (
component(validComponents, cmpt) != -1)
59 const word fieldBase(fieldName + cmptName);
61 writeTabbed(
os, fieldBase +
"_initial");
62 writeTabbed(
os, fieldBase +
"_final");
63 writeTabbed(
os, fieldBase +
"_iters");
67 writeTabbed(
os, fieldName +
"_converged");
80 if (foundObject<volFieldType>(fieldName))
84 if (solverDict.
found(fieldName))
88 mesh_.validComponents<Type>()
91 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
93 if (
component(validComponents, cmpt) != -1)
100 createResidualField(resultName);
114 if (foundObject<volFieldType>(fieldName))
118 if (solverDict.
found(fieldName))
122 solverDict.
lookup(fieldName)
126 const word& solverName = sp0.solverName();
127 const Type& initialResidual = sp0.initialResidual();
128 const Type& finalResidual = sp0.finalResidual();
129 const labelType nIterations = sp0.nIterations();
130 const Switch converged(sp0.converged());
136 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
138 if (
component(validComponents, cmpt) != -1)
140 const scalar ri =
component(initialResidual, cmpt);
141 const scalar rf =
component(finalResidual, cmpt);
150 const word resultName(fieldName + cmptName);
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
virtual OFstream & file()
Return access to the file (if only 1)
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
void initialiseResidualField(const word &fieldName)
Initialise a residual field.
void updateSolverInfo(const word &fieldName)
Calculate the solver information.
pTraits< Type >::labelType validComponents() const
Return a labelType of valid component indicators.
const dictionary & solverPerformanceDict() const
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
void writeFileHeader(Ostream &os)
Output file header information.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
const fvMesh & mesh_
Reference to the fvMesh.
Various functions to operate on Lists.
void setResult(const word &entryName, const Type &value)
Add result.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...