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>
136 this->typeDict().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();
167 const word& patchName =
169 Info<<
"Post-process patch " << patchName <<
endl;
173 patchData_.setSize(patchIndices_.
size());
174 times_.setSize(patchIndices_.
size());
178 template<
class CloudType>
185 maxStoredParcels_(ppm.maxStoredParcels_),
186 patchIndices_(ppm.patchIndices_),
188 patchData_(ppm.patchData_)
194 template<
class CloudType>
201 template<
class CloudType>
211 if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_)
213 times_[localPatchi].append(this->owner().
time().value());
218 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 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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const polyMesh & poly() 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 & boundary() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
const dictionary & typeDict() const
Return const access to the coefficients dictionary.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define WarningInFunction
Report a warning using Foam::Warning.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
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.