38 namespace functionObjects
49 Foam::functionObjects::columnAverage::meshAddressing(
const polyMesh&
mesh)
const 51 if (!meshStructurePtr_)
53 const polyBoundaryMesh&
pbm =
mesh.boundaryMesh();
57 for (
const label patchi : patchIDs_)
59 sz +=
pbm[patchi].size();
65 for (
const label patchi : patchIDs_)
67 label start =
pbm[patchi].start();
68 label size =
pbm[patchi].size();
69 for (label i = 0; i < size; ++i)
71 meshFaces[sz++] = start+i;
81 <<
"Requested patches have zero faces" 87 UIndirectList<face>(
mesh.faces(), meshFaces),
91 globalFaces_.reset(
new globalIndex(uip.size()));
92 globalEdges_.reset(
new globalIndex(uip.nEdges()));
93 globalPoints_.reset(
new globalIndex(uip.nPoints()));
94 meshStructurePtr_.reset
107 return *meshStructurePtr_;
111 const Foam::word Foam::functionObjects::columnAverage::averageName
113 const word& fieldName
116 return scopedName(
"columnAverage(" + fieldName +
")");
144 mesh_.boundaryMesh().patchSet
149 fieldSet_.read(
dict);
158 fieldSet_.updateSelection();
160 for (
const word& fieldName : fieldSet_.selectionNames())
162 columnAverageField<scalar>(fieldName);
163 columnAverageField<vector>(fieldName);
164 columnAverageField<sphericalTensor>(fieldName);
165 columnAverageField<symmTensor>(fieldName);
166 columnAverageField<tensor>(fieldName);
175 for (
const word& fieldName : fieldSet_.selectionNames())
178 obr_.cfindObject<
regIOobject>(averageName(fieldName));
const polyBoundaryMesh & pbm
defineTypeNameAndDebug(ObukhovLength, 0)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Ostream & endl(Ostream &os)
Add newline and flush stream.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
virtual bool execute()
Execute, currently does nothing.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual bool read(const dictionary &dict)
Read the settings.
A class for handling words, derived from Foam::string.
columnAverage(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
A List of wordRe with additional matching capabilities.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
#define WarningInFunction
Report a warning using Foam::Warning.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool read(const dictionary &dict)
Read optional controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
List< label > labelList
A List of labels.
virtual bool write()
Write the results.
Detect extruded mesh structure given a set of faces (uindirectPrimitivePatch).