35 namespace functionObjects
69 dict.lookup(
"field") >> fieldName_;
70 dict.lookup(
"max") >> max_;
71 min_ =
dict.lookupOrDefault<scalar>(
"min", 0);
72 dict.lookup(
"nBins") >> nBins_;
99 Log <<
" Looking up field " << fieldName_ <<
endl;
103 Log <<
" Reading field " << fieldName_ <<
endl;
130 const scalar
delta = (max_- min_)/nBins_;
131 scalar
x = min_ + 0.5*
delta;
143 const label bini = (field[celli] - min_)/
delta;
144 if (bini >= 0 && bini < nBins_)
146 volFrac[bini] += V[celli];
154 const scalar sumVol =
sum(volFrac);
160 formatterPtr_().write
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
Holds list of sampling positions.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Abstract base-class for Time/database functionObjects.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Write the volume-weighted histogram of a volScalarField.
virtual wordList fields() const
Return the list of fields required.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Calculate the histogram and write.
virtual bool read(const dictionary &)
Read the histogram data.
histogram(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
A class for handling words, derived from string.
#define Log
Report write to Foam::Info if the local log switch is true.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.