50 scalar geomMin = GREAT;
51 scalar geomMax = -GREAT;
56 geomMin =
min(
min(d), geomMin);
57 geomMax =
max(
max(d), geomMax);
66 geomMin =
min(
min(d), geomMin);
67 geomMax =
max(
max(d), geomMax);
70 reduce(geomMin, minOp<scalar>());
71 reduce(geomMax, maxOp<scalar>());
74 geomMax = 1.0001*(geomMax - geomMin) + geomMin;
85 <<
"Max bound must be greater than min bound" <<
nl 100 const word& outputPrefix
122 Info<<
" Activating a set of single-direction bins" <<
endl;
128 Info<<
" Employing " << nBin_ <<
" bins" <<
endl;
131 Info<<
" - min : " << binMin_ <<
endl;
135 Info<<
" - max : " << binMax_ <<
endl;
138 cumulative_ = binDict.
getOrDefault<
bool>(
"cumulative",
false);
139 Info<<
" - cumulative : " << cumulative_ <<
endl;
140 Info<<
" - decomposePatchValues : " << decomposePatchValues_ <<
endl;
142 binDir_ = binDict.
get<
vector>(
"direction");
145 if (
mag(binDir_) == 0)
148 <<
"Input direction should not be zero valued" <<
nl 149 <<
" direction = " << binDir_ <<
nl 153 Info<<
" - direction : " << binDir_ <<
nl <<
endl;
166 processField<scalar>(i)
167 || processField<vector>(i)
168 || processField<sphericalTensor>(i)
169 || processField<symmTensor>(i)
170 || processField<tensor>(i);
175 <<
"Unable to find field " << fieldNames_[i]
176 <<
". Avaliable objects are " 177 << mesh_.objectRegistry::sortedToc()
182 writtenHeader_ =
true;
const polyBoundaryMesh & pbm
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const fvMesh & mesh_
Reference to the mesh.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
T getCheck(const word &keyword, const Predicate &pred, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T with additional checking FatalIOError if not found, or if the number of tokens is...
Ostream & endl(Ostream &os)
Add newline and flush stream.
label nBin_
Total number of bins.
Vector< Cmpt > & normalise(const scalar tol=ROOTVSMALL)
Inplace normalise the vector by its magnitude.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
labelHashSet patchSet_
Indices of operand patches.
defineTypeNameAndDebug(singleDirectionUniformBin, 0)
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
#define forAll(list, i)
Loop across all elements in list.
Base class for bin models to handle general bin characteristics.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
addToRunTimeSelectionTable(binModel, singleDirectionUniformBin, dictionary)
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Mesh data needed to do the Finite Volume discretisation.
virtual bool read(const dictionary &dict)
Read the dictionary.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
Reduce inplace (cf. MPI Allreduce) using specified communication schedule.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const volVectorField & C() const
Return cell centres as volVectorField.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
labelList cellZoneIDs_
Indices of operand cell zones.
A patch is a list of labels that address the faces in the global face list.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)