38namespace functionObjects
49Foam::functionObjects::columnAverage::meshAddressing(
const polyMesh&
mesh)
const
51 if (!meshStructurePtr_)
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_;
111const 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));
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const noexcept
The number of elements in the list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Computes the arithmetic average of given quantities along columns of cells in a given direction for s...
virtual bool read(const dictionary &dict)
Read the settings.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the results.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Detect extruded mesh structure given a set of faces (uindirectPrimitivePatch).
virtual const faceList & faces() const
Return raw faces.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool write(const bool valid=true) const
Write using setting from DB.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.