Go to the documentation of this file.
117 namespace fieldValues
217 const word& fieldName,
218 const bool mustGet =
false
246 const bool loadFromFiles =
false
271 virtual void write();
277 const word& fieldName,
label nCells_
Global number of cells.
virtual ~cellSource()
Destructor.
A class for handling words, derived from string.
List< label > labelList
A List of labels.
sourceType
Source type enumeration.
virtual void write()
Calculate and write.
A class for managing temporary objects.
static const NamedEnum< operationType, 11 > operationTypeNames_
Operation type names.
tmp< Field< Type > > setFieldValues(const word &fieldName, const bool mustGet=false) const
Insert field values into values list.
void initialise(const dictionary &dict)
Initialise, e.g. cell addressing.
scalar volume() const
Calculate and return volume of the cellSource: sum(V)
word weightFieldName_
Weight field name - only used for opWeightedAverage mode.
static const NamedEnum< sourceType, 2 > sourceTypeNames_
Source type names.
TypeName("cellSource")
Run-time type information.
bool writeVolume_
Optionally write the volume of the cellSource.
Registry of regIOobjects.
sourceType source_
Source type.
Type processValues(const Field< Type > &values, const scalarField &V, const scalarField &weightField) const
Apply the 'operation' to the values.
const labelList & cellId() const
Return the local list of cell IDs.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const objectRegistry & obr() const
Return the reference to the object registry.
bool writeValues(const word &fieldName, const scalarField &weightField)
Templated helper function to output field values.
void setPatchCells()
Set cells to evaluate based on a patch.
virtual void writeFileHeader(Ostream &os) const
Output file header information.
cellSource(const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles=false)
Construct from components.
const word & name() const
Return the name of the geometric source.
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar volume_
Volume of the cellSource.
const dictionary & dict() const
Return the reference to the construction dictionary.
Base class for field value-based function objects.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
tmp< Field< Type > > filterField(const Field< Type > &field) const
Filter a field according to cellIds.
bool validField(const word &fieldName) const
Return true if the field name is valid.
virtual void read(const dictionary &)
Read from dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
operationType operation_
Operation to apply to values.
operationType
Operation type enumeration.
This function object provides a 'cell source' variant of the fieldValues function object....
const sourceType & source() const
Return the source type.
void setCellZoneCells()
Set cells to evaluate based on a cell zone.
labelList cellId_
Local list of cell IDs.