34 const word& fieldName,
35 const word& outputName,
50 writeTabbed(file, fieldName);
52 file<< token::TAB << minValue
53 << token::TAB << minC;
55 if (Pstream::parRun())
57 file<< token::TAB << minProci;
60 file<< token::TAB << maxValue
61 << token::TAB << maxC;
63 if (Pstream::parRun())
65 file<< token::TAB << maxProci;
70 Log <<
" min(" << outputName <<
") = " << minValue
71 <<
" at location " << minC;
73 if (Pstream::parRun())
75 Log <<
" on processor " << minProci;
78 Log <<
nl <<
" max(" << outputName <<
") = " << maxValue
79 <<
" at location " << maxC;
81 if (Pstream::parRun())
83 Log <<
" on processor " << maxProci;
88 file<< token::TAB << minValue << token::TAB <<
maxValue;
90 Log <<
" min/max(" << outputName <<
") = " 101 const word& fieldName,
107 if (obr_.foundObject<fieldType>(fieldName))
109 const label proci = Pstream::myProcNo();
111 const fieldType& field = obr_.lookupObject<fieldType>(fieldName);
114 const volVectorField::Boundary& CfBoundary =
115 mesh.C().boundaryField();
122 const volScalarField::Boundary& magFieldBoundary =
128 minVs[proci] = magField[minProci];
129 minCs[proci] = field.mesh().C()[minProci];
136 maxVs[proci] = magField[maxProci];
137 maxCs[proci] = field.mesh().C()[maxProci];
147 if (mfp[minPI] < minVs[proci])
149 minVs[proci] = mfp[minPI];
150 minCs[proci] = Cfp[minPI];
154 if (mfp[maxPI] > maxVs[proci])
156 maxVs[proci] = mfp[maxPI];
157 maxCs[proci] = Cfp[maxPI];
162 Pstream::gatherList(minVs);
163 Pstream::gatherList(minCs);
165 Pstream::gatherList(maxVs);
166 Pstream::gatherList(maxCs);
168 if (Pstream::master())
171 scalar minValue = minVs[minI];
172 const vector& minC = minCs[minI];
175 scalar maxValue = maxVs[maxI];
176 const vector& maxC = maxCs[maxI];
181 word(
"mag(" + fieldName +
")"),
194 const typename fieldType::Boundary&
195 fieldBoundary = field.boundaryField();
200 minVs[proci] = field[minProci];
201 minCs[proci] = field.mesh().C()[minProci];
203 Pstream::gatherList(minVs);
204 Pstream::gatherList(minCs);
209 maxVs[proci] = field[maxProci];
210 maxCs[proci] = field.mesh().C()[maxProci];
220 if (fp[minPI] < minVs[proci])
222 minVs[proci] = fp[minPI];
223 minCs[proci] = Cfp[minPI];
227 if (fp[maxPI] > maxVs[proci])
229 maxVs[proci] = fp[maxPI];
230 maxCs[proci] = Cfp[maxPI];
235 Pstream::gatherList(minVs);
236 Pstream::gatherList(minCs);
238 Pstream::gatherList(maxVs);
239 Pstream::gatherList(maxCs);
241 if (Pstream::master())
244 Type minValue = minVs[minI];
245 const vector& minC = minCs[minI];
248 Type maxValue = maxVs[maxI];
249 const vector& maxC = maxCs[maxI];
268 <<
"Unknown min/max mode: " << modeTypeNames_[mode_]
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label findMin(const ListType &, const label start=0)
Find index of min element (and less than given element).
Generic GeometricField class.
void calcMinMaxFields(const word &fieldName, const modeType &mode)
Calculate the field min/max.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A class for handling words, derived from string.
label findMax(const ListType &, const label start=0)
Find index of max element (and larger than given element).
void output(const word &fieldName, const word &outputName, const vector &minC, const vector &maxC, const label minProci, const label maxProci, const Type &minValue, const Type &maxValue)
Helper function to write the output.
Mesh data needed to do the Finite Volume discretisation.
#define Log
Report write to Foam::Info if the local log switch is true.
dimensioned< scalar > mag(const dimensioned< Type > &)