38 namespace functionObjects
73 dict.lookup(
"field") >> fieldName_;
74 dict.lookup(
"max") >> max_;
75 min_ =
dict.lookupOrDefault<scalar>(
"min", 0);
76 dict.lookup(
"nBins") >> nBins_;
109 const scalar
delta = (max_- min_)/nBins_;
110 scalar
x = min_ + 0.5*
delta;
124 const label bini = (field[celli] - min_)/
delta;
125 if (bini >= 0 && bini < nBins_)
127 volFrac[bini] += V[celli];
133 const labelList& zoneCells = zone_.zone();
136 const label celli = zoneCells[i];
137 const label bini = (field[celli] - min_)/
delta;
138 if (bini >= 0 && bini < nBins_)
140 volFrac[bini] += V[celli];
149 const scalar sumVol =
sum(volFrac);
155 formatterPtr_().write
189 zone_.topoChange(map);
213 zone_.distribute(map);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
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.
Holds list of sampling positions.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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 void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void movePoints(const polyMesh &)
Update for mesh motion.
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.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const polyMesh & mesh() const
Return polyMesh.
Class containing mesh-to-mesh mapping information.
const polyMesh & mesh() const
Return polyMesh.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyMesh & mesh() const
Return polyMesh.
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define Log
Report write to Foam::Info if the local log switch is true.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, 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.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.