35 template<
class CloudType>
38 const label globalPatchi
43 if (patchIDs_[i] == globalPatchi)
55 template<
class CloudType>
61 procTimes[Pstream::myProcNo()] = times_[i];
62 Pstream::gatherList(procTimes);
65 procData[Pstream::myProcNo()] = patchData_[i];
66 Pstream::gatherList(procData);
68 if (Pstream::master())
70 const fvMesh& mesh = this->owner().mesh();
73 mkDir(this->writeTimeDir());
79 this->writeTimeDir()/patchName +
".post",
81 IOstream::currentVersion,
86 globalData = ListListOps::combine<List<string>>
93 globalTimes = ListListOps::combine<List<scalar>>
102 string header(
"# Time currentProc " + parcelType::propertyList_);
103 patchOutFile<< header.c_str() <<
nl;
107 label dataI = indices[i];
110 << globalTimes[dataI] <<
' '
111 << globalData[dataI].c_str()
116 patchData_[i].clearStorage();
117 times_[i].clearStorage();
124 template<
class CloudType>
129 const word& modelName
135 this->coeffDict().template lookup<scalar>(
"maxStoredParcels")
152 <<
"Cannot find any patch names matching " << patchName[i]
159 patchIDs_ = uniquePatchIDs.
toc();
167 Info<<
"Post-process patch " << patchName <<
endl;
171 patchData_.setSize(patchIDs_.
size());
172 times_.setSize(patchIDs_.
size());
176 template<
class CloudType>
183 maxStoredParcels_(ppm.maxStoredParcels_),
184 patchIDs_(ppm.patchIDs_),
186 patchData_(ppm.patchData_)
192 template<
class CloudType>
199 template<
class CloudType>
209 if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_)
211 times_[localPatchi].append(this->owner().time().value());
Various functions to operate on Lists.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
const fvMesh & mesh() const
Return references to the mesh.
bool insert(const Key &key)
Insert a new entry.
List< Key > toc() const
Return the table of contents.
const word & name() const
Return name.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
Output to memory buffer stream.
Standard post-processing.
virtual void postPatch(const parcelType &p, const polyPatch &pp)
Post-patch hook.
PatchPostProcessing(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
const labelList & patchIDs() const
Return const mapping from local to global patch ids.
virtual ~PatchPostProcessing()
Destructor.
void write()
Write post-processing info.
IOstream::compressionType writeCompression() const
Default write compression.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Database for solution and other reduced data.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
label index() const
Return the index of this patch in the boundaryMesh.
wordList names() const
Return a list of patch names.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
A class for handling words, derived from string.
#define WarningInFunction
Report a warning using Foam::Warning.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
Operations on lists of strings.