71 nBins_ = ranges_.size();
75 const auto&
range = ranges_[bini];
80 <<
"Histogram bin-" << bini
81 <<
" has invalid range: " <<
range
89 <<
"Invalid number of histogram bins: " << nBins_
107 midBin[bini].x() = ranges_[bini].centre();
120 const auto&
range = ranges_[bini];
126 dataNormalised[bini] += V[celli];
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void listGather(UList< T > &values, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Gather (reduce) list elements, applying bop to each list element.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
A base class for histogram models.
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
volScalarField & getOrReadField(const word &fieldName) const
Return requested field from the object registry or read+register the field to the object registry.
void write(scalarField &dataNormalised, const labelField &dataCount, const scalarField &magMidBin)
Write histogram data.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
const word & fieldName() const noexcept
Return const reference to the operand field name.
histogramModel(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from components.
Histogram model which groups data into bins of unequal widths.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
unequalBinWidth(const word &name, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool write(const bool log)
Write data to stream and files.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A namespace for various histogram model implementations.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
Field< label > labelField
Specialisation of Field<T> for label.
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).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
#define forAll(list, i)
Loop across all elements in list.