Go to the documentation of this file.
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->outputTimeDir());
74 const word& patchName =
mesh.boundaryMesh()[patchIDs_[i]].name();
78 this->outputTimeDir()/patchName +
".post",
80 IOstream::currentVersion,
81 mesh.time().writeCompression()
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
132 maxStoredParcels_(
readScalar(this->coeffDict().
lookup(
"maxStoredParcels"))),
145 if (patchIDs.empty())
148 <<
"Cannot find any patch names matching " << patchName[i]
152 uniquePatchIDs.
insert(patchIDs);
155 patchIDs_ = uniquePatchIDs.
toc();
161 const label patchI = patchIDs_[i];
163 Info<<
"Post-process patch " << patchName <<
endl;
167 patchData_.setSize(patchIDs_.size());
168 times_.setSize(patchIDs_.size());
172 template<
class CloudType>
188 template<
class CloudType>
195 template<
class CloudType>
206 const label localPatchI = applyToPatch(patchI);
208 if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_)
210 times_[localPatchI].append(this->owner().time().value());
213 data<< Pstream::myProcNo() <<
' ' <<
p;
215 patchData_[localPatchI].append(
data.str());
A class for handling words, derived from string.
List< DynamicList< scalar > > times_
List of time for each data record.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
CloudType::particleType parcelType
virtual void postPatch(const parcelType &p, const polyPatch &pp, const scalar trackFraction, const tetIndices &tetIs, bool &keepParticle)
Post-patch hook.
labelList patchIDs_
List of patch indices to post-process.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< DynamicList< string > > patchData_
List of output data per patch.
wordList names() const
Return a list of patch names.
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const fvMesh & mesh() const
Return refernce to the mesh.
A patch is a list of labels that address the faces in the global face list.
const word & name() const
Return name.
Templated base class for dsmc cloud.
Standard post-processing.
A list of keyword definitions, which are a keyword followed by any number of values (e....
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Mesh data needed to do the Finite Volume discretisation.
label applyToPatch(const label globalPatchI) const
Returns local patchI if patch is in patchIds_ list.
scalar maxStoredParcels_
Maximum number of parcels to store - set as a scalar for I/O.
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
virtual ~PatchPostProcessing()
Destructor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Output to memory buffer stream.
Templated cloud function object base class.
bool insert(const Key &key)
Insert a new entry.
void write()
Write post-processing info.
Operations on lists of strings.
PatchPostProcessing(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Various functions to operate on Lists.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
#define WarningInFunction
Report a warning using Foam::Warning.
label index() const
Return the index of this patch in the boundaryMesh.
Database for solution data, solver performance and other reduced data.
stressControl lookup("compactNormalStress") >> compactNormalStress