35 namespace functionObjects
69 dict.
lookup(
"field") >> fieldName_;
70 dict.
lookup(
"max") >> max_;
72 dict.
lookup(
"nBins") >> nBins_;
99 Log <<
" Looking up field " << fieldName_ <<
endl;
103 Log <<
" Reading field " << fieldName_ <<
endl;
111 mesh_.time().timeName(),
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
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Calculate the histogram and write.
const word & name() const
Return name.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
A list of keyword definitions, which are a keyword followed by any number of values (e...
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const label communicator=0)
Am I the master process.
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.
virtual bool execute()
Execute, currently does nothing.
Macros for easy insertion into run-time selection tables.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual wordList fields() const
Return the list of fields required.
bool read(const char *, int32_t &)
virtual bool read(const dictionary &)
Read the histogram data.
histogram(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Holds list of sampling positions.
A class for handling words, derived from string.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
List< word > wordList
A List of words.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
#define Log
Report write to Foam::Info if the local log switch is true.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.