37template<
class CloudType>
40 const label globalPatchi
43 return patchIDs_.find(globalPatchi);
49template<
class CloudType>
55 procTimes[Pstream::myProcNo()] = times_[i];
56 Pstream::gatherList(procTimes);
59 procData[Pstream::myProcNo()] = patchData_[i];
60 Pstream::gatherList(procData);
62 if (Pstream::master())
67 mkDir(this->writeTimeDir());
69 const word& patchName =
mesh.boundaryMesh()[patchIDs_[i]].name();
73 this->writeTimeDir()/patchName +
".post",
75 IOstream::currentVersion,
76 mesh.time().writeCompression()
80 globalData = ListListOps::combine<List<string>>
87 globalTimes = ListListOps::combine<List<scalar>>
95 string header(
"# Time currentProc " + header_);
96 patchOutFile<< header.c_str() <<
nl;
100 label dataI = indices[i];
103 << globalTimes[dataI] <<
' '
104 << globalData[dataI].c_str()
109 patchData_[i].clearStorage();
110 times_[i].clearStorage();
117template<
class CloudType>
122 const word& modelName
126 maxStoredParcels_(this->coeffDict().getScalar(
"maxStoredParcels")),
141 if (patchIDs_.
empty())
144 <<
"No matching patches found: "
150 Info<<
"Post-process fields "
153 Info<<
"On patches (";
155 for (
const label patchi : patchIDs_)
163 patchData_.setSize(patchIDs_.
size());
164 times_.setSize(patchIDs_.
size());
168template<
class CloudType>
175 maxStoredParcels_(ppm.maxStoredParcels_),
176 fields_(ppm.fields_),
177 patchIDs_(ppm.patchIDs_),
179 patchData_(ppm.patchData_),
186template<
class CloudType>
194 const label patchi = pp.
index();
195 const label localPatchi = applyToPatch(patchi);
200 p.writeProperties(
data, fields_,
" ",
true);
201 header_ =
data.str();
204 if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_)
206 times_[localPatchi].append(this->owner().time().value());
210 p.writeProperties(
data, fields_,
" ",
false);
Various functions to operate on Lists.
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 reference to the mesh.
const word & name() const noexcept
Return the object 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 &val)
Append an element at the end of the list.
Output to file stream, using an OSstream.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.
Standard post-processing.
virtual void postPatch(const parcelType &p, const polyPatch &pp, bool &keepParticle)
Post-patch hook.
void write()
Write post-processing info.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
Database for solution data, solver performance and other reduced data.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Mesh data needed to do the Finite Volume discretisation.
label index() const noexcept
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.
int myProcNo() const noexcept
Return processor number.
Lookup type of boundary radiation properties.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
A List of wordRe with additional matching capabilities.
labelList matching(const UList< StringType > &input, const bool invert=false) const
Return list indices for all matches.
A class for handling words, derived from Foam::string.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
Operations on lists of strings.