35 template<
class CloudType>
38 const label globalPatchi
43 if (patchIndices_[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())
73 mkDir(this->writeTimeDir());
75 const word& patchName =
80 this->writeTimeDir()/patchName +
".post",
82 IOstream::currentVersion,
87 globalData = ListListOps::combine<List<string>>
94 globalTimes = ListListOps::combine<List<scalar>>
103 string header(
"# Time currentProc " + parcelType::propertyList_);
104 patchOutFile<< header.c_str() <<
nl;
108 label dataI = indices[i];
111 << globalTimes[dataI] <<
' '
112 << globalData[dataI].c_str()
117 patchData_[i].clearStorage();
118 times_[i].clearStorage();
125 template<
class CloudType>
130 const word& modelName
136 this->coeffDict().template lookup<scalar>(
"maxStoredParcels")
150 if (patchIDs.
empty())
153 <<
"Cannot find any patch names matching " << patchName[i]
157 uniquePatchIDs.
insert(patchIDs);
160 patchIndices_ = uniquePatchIDs.
toc();
168 Info<<
"Post-process patch " << patchName <<
endl;
172 patchData_.setSize(patchIndices_.
size());
173 times_.setSize(patchIndices_.
size());
177 template<
class CloudType>
184 maxStoredParcels_(ppm.maxStoredParcels_),
185 patchIndices_(ppm.patchIndices_),
187 patchData_(ppm.patchData_)
193 template<
class CloudType>
200 template<
class CloudType>
210 if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_)
212 times_[localPatchi].append(this->owner().time().value());
217 patchData_[localPatchi].
append(data.
str());
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.
string str() const
Return the string.
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.
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)
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.
const polyMesh & mesh() const
Return reference to polyMesh.
label index() const
Return the index of this patch in the boundaryMesh.
wordList names() const
Return the 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.