34 template<
class CloudType>
37 const label globalPatchi
42 if (patchIDs_[i] == globalPatchi)
54 template<
class CloudType>
60 procTimes[Pstream::myProcNo()] = times_[i];
61 Pstream::gatherList(procTimes);
64 procData[Pstream::myProcNo()] = patchData_[i];
65 Pstream::gatherList(procData);
67 if (Pstream::master())
72 mkDir(this->writeTimeDir());
78 this->writeTimeDir()/patchName +
".post",
80 IOstream::currentVersion,
85 globalData = ListListOps::combine<List<string>>
92 globalTimes = ListListOps::combine<List<scalar>>
101 string header(
"# Time currentProc " + parcelType::propertyList_);
102 patchOutFile<< header.c_str() <<
nl;
106 label dataI = indices[i];
109 << globalTimes[dataI] <<
' ' 110 << globalData[dataI].c_str()
115 patchData_[i].clearStorage();
116 times_[i].clearStorage();
123 template<
class CloudType>
128 const word& modelName
134 this->coeffDict().template lookup<scalar>(
"maxStoredParcels")
140 const wordList allPatchNames = owner.mesh().boundaryMesh().names();
148 if (patchIDs.
empty())
151 <<
"Cannot find any patch names matching " << patchName[i]
155 uniquePatchIDs.
insert(patchIDs);
158 patchIDs_ = uniquePatchIDs.
toc();
165 const word& patchName = owner.mesh().boundaryMesh()[
patchi].name();
166 Info<<
"Post-process patch " << patchName <<
endl;
170 patchData_.setSize(patchIDs_.size());
171 times_.setSize(patchIDs_.size());
175 template<
class CloudType>
182 maxStoredParcels_(ppm.maxStoredParcels_),
183 patchIDs_(ppm.patchIDs_),
185 patchData_(ppm.patchData_)
191 template<
class CloudType>
198 template<
class CloudType>
207 const label localPatchi = applyToPatch(patchi);
209 if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_)
211 times_[localPatchi].append(this->owner().time().value());
214 data<< Pstream::myProcNo() <<
' ' <<
p;
216 patchData_[localPatchi].append(data.
str());
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
void write()
Write post-processing info.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
virtual ~PatchPostProcessing()
Destructor.
Operations on lists of strings.
const Time & time() const
Return the top-level database.
bool insert(const Key &key)
Insert a new entry.
Various functions to operate on Lists.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
stressControl lookup("compactNormalStress") >> compactNormalStress
A class for handling words, derived from string.
IOstream::compressionType writeCompression() const
Default write compression.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
Database for solution and other reduced data.
#define WarningInFunction
Report a warning using Foam::Warning.
Mesh data needed to do the Finite Volume discretisation.
label index() const
Return the index of this patch in the boundaryMesh.
string str() const
Return the string.
Standard post-processing.
List< Key > toc() const
Return the table of contents.
A patch is a list of labels that address the faces in the global face list.
Templated base class for dsmc cloud.
Output to memory buffer stream.
Templated cloud function object base class.
PatchPostProcessing(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.