34 const word& fieldName,
35 const word& outputName,
50 writeTabbed(file, fieldName);
53 << token::TAB << minC;
55 if (Pstream::parRun())
57 file<< token::TAB << minProcI;
61 << token::TAB << maxC;
63 if (Pstream::parRun())
65 file<< token::TAB << maxProcI;
71 <<
" min(" << outputName <<
") = " <<
minValue
72 <<
" at location " << minC;
74 if (Pstream::parRun())
76 if (log_)
Info<<
" on processor " << minProcI;
80 <<
nl <<
" max(" << outputName <<
") = " <<
maxValue
81 <<
" at location " << maxC;
83 if (Pstream::parRun())
85 if (log_)
Info<<
" on processor " << maxProcI;
93 <<
" min/max(" << outputName <<
") = "
100 word nameStr(
'(' + outputName +
')');
101 this->setResult(
"min" + nameStr,
minValue);
102 this->setResult(
"min" + nameStr +
"_position", minC);
103 this->setResult(
"min" + nameStr +
"_processor", minProcI);
104 this->setResult(
"max" + nameStr,
maxValue);
105 this->setResult(
"max" + nameStr +
"_position", maxC);
106 this->setResult(
"max" + nameStr +
"_processor", maxProcI);
113 const word& fieldName,
119 if (obr_.foundObject<fieldType>(fieldName))
121 const label procI = Pstream::myProcNo();
123 const fieldType& field = obr_.lookupObject<fieldType>(fieldName);
127 mesh.C().boundaryField();
140 minVs[procI] = magField[minProcI];
141 minCs[procI] = field.mesh().C()[minProcI];
148 maxVs[procI] = magField[maxProcI];
149 maxCs[procI] = field.mesh().C()[maxProcI];
151 forAll(magFieldBoundary, patchI)
159 if (mfp[minPI] < minVs[procI])
161 minVs[procI] = mfp[minPI];
162 minCs[procI] = Cfp[minPI];
166 if (mfp[maxPI] > maxVs[procI])
168 maxVs[procI] = mfp[maxPI];
169 maxCs[procI] = Cfp[maxPI];
174 Pstream::gatherList(minVs);
175 Pstream::scatterList(minVs);
176 Pstream::gatherList(minCs);
177 Pstream::scatterList(minCs);
179 Pstream::gatherList(maxVs);
180 Pstream::scatterList(maxVs);
181 Pstream::gatherList(maxCs);
182 Pstream::scatterList(maxCs);
186 const vector& minC = minCs[minI];
190 const vector& maxC = maxCs[maxI];
195 word(
"mag(" + fieldName +
")"),
207 const typename fieldType::GeometricBoundaryField&
208 fieldBoundary = field.boundaryField();
213 minVs[procI] = field[minProcI];
214 minCs[procI] = field.mesh().C()[minProcI];
216 Pstream::gatherList(minVs);
217 Pstream::gatherList(minCs);
222 maxVs[procI] = field[maxProcI];
223 maxCs[procI] = field.mesh().C()[maxProcI];
225 forAll(fieldBoundary, patchI)
233 if (fp[minPI] < minVs[procI])
235 minVs[procI] = fp[minPI];
236 minCs[procI] = Cfp[minPI];
240 if (fp[maxPI] > maxVs[procI])
242 maxVs[procI] = fp[maxPI];
243 maxCs[procI] = Cfp[maxPI];
248 Pstream::gatherList(minVs);
249 Pstream::scatterList(minVs);
250 Pstream::gatherList(minCs);
251 Pstream::scatterList(minCs);
253 Pstream::gatherList(maxVs);
254 Pstream::scatterList(maxVs);
255 Pstream::gatherList(maxCs);
256 Pstream::scatterList(maxCs);
260 const vector& minC = minCs[minI];
264 const vector& maxC = maxCs[maxI];