50 const bool useGeomLimits
63 for (
const vector&
p :
pbm[patchi].faceCentres())
78 reduce(geomLimits, minMaxOp<scalar>());
80 if (!geomLimits.
good())
83 <<
"No patches/cellZones provided" 89 const scalar adjust(1
e-4*geomLimits.
span());
90 geomLimits.
max() += adjust;
108 <<
"Max bound must be greater than min bound" <<
nl 123 const word& outputPrefix
144 Info<<
" Activating a set of single-direction bins" <<
endl;
150 Info<<
" Employing " << nBin_ <<
" bins" <<
nl;
154 Info<<
" - min : " << binLimits_.min() <<
nl;
158 Info<<
" - max : " << binLimits_.max() <<
nl;
161 cumulative_ = binDict.
getOrDefault<
bool>(
"cumulative",
false);
162 Info<<
" - cumulative : " << cumulative_ <<
nl 163 <<
" - decomposePatchValues : " << decomposePatchValues_ <<
nl;
165 binDir_ = binDict.
get<
vector>(
"direction");
166 if (binDir_.mag() < SMALL)
169 <<
"Input direction should not be zero valued" <<
nl 170 <<
" direction = " << binDir_ <<
nl 175 Info<<
" - direction : " << binDir_ <<
nl <<
endl;
189 processField<scalar>(i)
190 || processField<vector>(i)
191 || processField<sphericalTensor>(i)
192 || processField<symmTensor>(i)
193 || processField<tensor>(i)
199 <<
"Unable to find field " << fieldNames_[i]
200 <<
". Avaliable objects are " 201 << mesh_.objectRegistry::sortedToc()
206 writtenHeader_ =
true;
const polyBoundaryMesh & pbm
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
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.
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.
defineTypeNameAndDebug(singleDirectionUniformBin, 0)
Macros for easy insertion into run-time selection tables.
bool good() const
Range is non-inverted.
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 T & min() const noexcept
The min value (first)
const dimensionedScalar e
Elementary charge.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
labelList patchIDs_
Indices of operand patches.
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
MinMax< T > & add(const MinMax &other)
Extend the range to include the other min/max range.
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 T & max() const noexcept
The max value (second)
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
T span() const
The min to max span. Zero if the range is invalid.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
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)