Go to the documentation of this file.
37 const word& fieldName,
76 <<
" in cell " << minCell
77 <<
" at location " << minC;
81 Log <<
" on processor " << minProci;
85 <<
" in cell " << maxCell
86 <<
" at location " << maxC;
90 Log <<
" on processor " << maxProci;
106 this->
setResult(
"min" + nameStr +
"_cell", minCell);
107 this->
setResult(
"min" + nameStr +
"_position", minC);
108 this->
setResult(
"min" + nameStr +
"_processor", minProci);
110 this->
setResult(
"max" + nameStr +
"_cell", maxCell);
112 this->
setResult(
"max" + nameStr +
"_processor", maxProci);
120 const word& outputFieldName
137 label minId = minMaxIds.first();
140 minVs[proci] =
field[minId];
141 minCells[proci] = minId;
142 minCs[proci] = mesh_.C()[minId];
145 label maxId = minMaxIds.
second();
148 maxVs[proci] =
field[maxId];
149 maxCells[proci] = maxId;
150 maxCs[proci] = mesh_.C()[maxId];
155 const auto& fieldBoundary =
field.boundaryField();
156 const auto& CfBoundary = mesh_.C().boundaryField();
158 forAll(fieldBoundary, patchi)
160 const Field<Type>& fp = fieldBoundary[patchi];
166 fieldBoundary[patchi].patch().faceCells();
170 minId = minMaxIds.first();
171 if (minVs[proci] > fp[minId])
173 minVs[proci] = fp[minId];
174 minCells[proci] = faceCells[minId];
175 minCs[proci] = Cfp[minId];
178 maxId = minMaxIds.
second();
179 if (maxVs[proci] < fp[maxId])
181 maxVs[proci] = fp[maxId];
182 maxCells[proci] = faceCells[maxId];
183 maxCs[proci] = Cfp[maxId];
204 const Type&
minValue = minVs[minId];
205 const label minCell = minCells[minId];
206 const vector& minC = minCs[minId];
209 const Type&
maxValue = maxVs[maxId];
210 const label maxCell = maxCells[maxId];
211 const vector& maxC = maxCs[maxId];
232 const word& fieldName,
238 if (obr_.foundObject<fieldType>(fieldName))
240 const fieldType&
field = lookupObject<fieldType>(fieldName);
246 calcMinMaxFieldType<scalar>
249 word(
"mag(" + fieldName +
")")
255 calcMinMaxFieldType(
field, fieldName);
261 <<
"Unknown min/max mode: " << modeTypeNames_[mode_]
List< label > labelList
A List of labels.
virtual void writeCurrentTime(Ostream &os) const
static Ostream & output(Ostream &os, const IntRange< T > &range)
A class for handling words, derived from Foam::string.
virtual OFstream & file()
static constexpr const zero Zero
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
void calcMinMaxFieldType(const GeometricField< Type, fvPatchField, volMesh > &field, const word &outputFieldName)
Ostream & endl(Ostream &os)
Field< vector > vectorField
Specialisation of Field<T> for vector.
mode_t mode(const fileName &name, const bool followLink=true)
word outputName("finiteArea-edges.obj")
labelPair findMinMax(const ListType &input, label start=0)
void output(const word &fieldName, const word &outputName, const label minCell, const label maxCell, const vector &minC, const vector &maxC, const label minProci, const label maxProci, const Type &minValue, const Type &maxValue)
void calcMinMaxFields(const word &fieldName, const modeType &mode)
Vector< scalar > vector
A scalar version of the templated Vector.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Output to file stream, using an OSstream.
#define FatalErrorInFunction
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
static int myProcNo(const label communicator=worldComm)
An ordered pair of two objects of type <T> with first() and second() elements.
const T & second() const noexcept
label findMax(const ListType &input, label start=0)
static bool & parRun() noexcept
A traits class, which is primarily used for primitives.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void setResult(const word &entryName, const Type &value)
Generic GeometricField class.
label findMin(const ListType &input, label start=0)
Smooth ATC in cells next to a set of patches supplied by type.
virtual void writeTabbed(Ostream &os, const string &str) const
static label nProcs(const label communicator=worldComm)