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);
111 this->
setResult(
"max" + nameStr +
"_position", maxC);
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)
166 fieldBoundary[patchi].patch().faceCells();
170 minId = minMaxIds.
first();
171 if (minVs[proci] > fp[minId])
173 minVs[proci] = fp[minId];
175 minCs[proci] = Cfp[minId];
178 maxId = minMaxIds.
second();
179 if (maxVs[proci] < fp[maxId])
181 maxVs[proci] = fp[maxId];
183 maxCs[proci] = Cfp[maxId];
198 const Type&
minValue = minVs[minId];
199 const label minCell = minCells[minId];
200 const vector& minC = minCs[minId];
203 const Type&
maxValue = maxVs[maxId];
204 const label maxCell = maxCells[maxId];
205 const vector& maxC = maxCs[maxId];
226 const word& fieldName,
232 if (obr_.foundObject<fieldType>(fieldName))
234 const fieldType&
field = lookupObject<fieldType>(fieldName);
240 calcMinMaxFieldType<scalar>
243 word(
"mag(" + fieldName +
")")
249 calcMinMaxFieldType(
field, fieldName);
255 <<
"Unknown min/max mode: " << modeTypeNames_[mode_]
Generic templated field type.
T & first() noexcept
The first element of the list, position [0].
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Output to file stream, using an OSstream.
const T & second() const noexcept
Return second element, which is also the last element.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
static void allGatherList(const List< commsStruct > &comms, List< T > &values, const int tag, const label comm)
The TAB Method for Numerical Calculation of Spray Droplet Breakup.
void size(const label n)
Older name for setAddressableSize.
static bool & parRun() noexcept
Test if this a parallel run.
Smooth ATC in cells next to a set of patches supplied by type.
bool location_
Flag to write location of min/max values.
void calcMinMaxFields(const word &fieldName, const modeType &mode)
Calculate the field min/max.
void calcMinMaxFieldType(const GeometricField< Type, fvPatchField, volMesh > &field, const word &outputFieldName)
Calculate the field min/max for a given field type.
Computes the magnitude of an input field.
void setResult(const word &entryName, const Type &value)
Add result.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
virtual OFstream & file()
Return access to the file (if only 1)
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
A traits class, which is primarily used for primitives.
int myProcNo() const noexcept
Return processor number.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
word outputName("finiteArea-edges.obj")
label findMin(const ListType &input, label start=0)
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
labelPair findMinMax(const ListType &input, label start=0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static Ostream & output(Ostream &os, const IntRange< T > &range)
static constexpr const zero Zero
Global zero (0)
label findMax(const ListType &input, label start=0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.