Go to the documentation of this file.
38 namespace functionObjects
49 Foam::functionObjects::columnAverage::meshAddressing(
const polyMesh&
mesh)
const
51 if (!meshStructurePtr_.valid())
53 const polyBoundaryMesh& pbm =
mesh.boundaryMesh();
58 for (
const label patchi : patchIDs)
60 sz += pbm[patchi].size();
66 for (
const label patchi : patchIDs)
69 label size = pbm[patchi].size();
70 for (
label i = 0; i < size; ++i)
72 meshFaces[sz++] =
start+i;
82 <<
"Requested patches have zero faces"
88 UIndirectList<face>(
mesh.faces(), meshFaces),
92 globalFaces_.set(
new globalIndex(uip.size()));
93 globalEdges_.set(
new globalIndex(uip.nEdges()));
94 globalPoints_.set(
new globalIndex(uip.nPoints()));
107 return meshStructurePtr_();
111 const Foam::word Foam::functionObjects::columnAverage::averageName
113 const word& fieldName
116 return name() +
":columnAverage(" + fieldName +
")";
143 patchSet_ = mesh_.boundaryMesh().patchSet(
dict.get<
wordRes>(
"patches"));
145 fieldSet_.read(
dict);
154 fieldSet_.updateSelection();
156 for (
const word& fieldName : fieldSet_.selectionNames())
158 columnAverageField<scalar>(fieldName);
159 columnAverageField<vector>(fieldName);
160 columnAverageField<sphericalTensor>(fieldName);
161 columnAverageField<symmTensor>(fieldName);
162 columnAverageField<tensor>(fieldName);
171 for (
const word& fieldName : fieldSet_.selectionNames())
173 const word resultName(
"columnAverage(" + fieldName +
")");
175 obr_.lookupObjectPtr<
regIOobject>(averageName(fieldName));
List< label > labelList
A List of labels.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
addToRunTimeSelectionTable(functionObject, add, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual bool write(const bool valid=true) const
Write using setting from DB.
virtual bool read(const dictionary &)
Read the settings.
word name(const complex &c)
Return string representation of complex.
virtual bool write()
Write the results.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
Detect extruded mesh structure given a set of faces (uindirectPrimitivePatch).
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
label ListType::const_reference const label start
A List of wordRe with additional matching capabilities.
PrimitivePatch< face, UIndirectList, const pointField & > uindirectPrimitivePatch
A PrimitivePatch using a UIndirectList for the faces.
columnAverage(const word &name, const Time &runTime, const dictionary &)
Construct from Time and dictionary.
virtual bool execute()
Execute, currently does nothing.
#define WarningInFunction
Report a warning using Foam::Warning.