117 namespace fieldValues
169 void setCellZoneCells();
172 void setPatchCells();
175 scalar volume()
const;
217 const word& fieldName,
218 const bool mustGet =
false 246 const bool loadFromFiles =
false 271 virtual void write();
cellSource(const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles=false)
Construct from components.
operationType operation_
Operation to apply to values.
bool validField(const word &fieldName) const
Return true if the field name is valid.
labelList cellId_
Local list of cell IDs.
Type processValues(const Field< Type > &values, const scalarField &V, const scalarField &weightField) const
Apply the 'operation' to the values.
virtual void write()
Calculate and write.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar volume_
Volume of the cellSource.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dictionary & dict() const
Return the reference to the construction dictionary.
sourceType source_
Source type.
tmp< Field< Type > > setFieldValues(const word &fieldName, const bool mustGet=false) const
Insert field values into values list.
static const NamedEnum< sourceType, 2 > sourceTypeNames_
Source type names.
const word & name() const
Return the name of the geometric source.
void initialise(const dictionary &dict)
Initialise, e.g. cell addressing.
virtual ~cellSource()
Destructor.
const labelList & cellId() const
Return the local list of cell IDs.
Pre-declare SubField and related Field type.
label nCells_
Global number of cells.
virtual void read(const dictionary &)
Read from dictionary.
tmp< Field< Type > > filterField(const Field< Type > &field) const
Filter a field according to cellIds.
sourceType
Source type enumeration.
const objectRegistry & obr() const
Return the reference to the object registry.
const sourceType & source() const
Return the source type.
virtual void writeFileHeader(const label i)
Output file header information.
Registry of regIOobjects.
List< label > labelList
A List of labels.
TypeName("cellSource")
Run-time type information.
bool writeVolume_
Optionally write the volume of the cellSource.
operationType
Operation type enumeration.
bool writeValues(const word &fieldName)
Templated helper function to output field values.
word weightFieldName_
Weight field name - only used for opWeightedAverage mode.
A class for managing temporary objects.
static const NamedEnum< operationType, 11 > operationTypeNames_
Operation type names.