Go to the documentation of this file.
55 masterSampledSets_.clear();
56 masterSampledSets_.setSize(size());
57 indexSets_.setSize(size());
67 gatheredPts[Pstream::myProcNo()] = samplePts;
68 Pstream::gatherList(gatheredPts);
71 gatheredSegments[Pstream::myProcNo()] = samplePts.
segments();
72 Pstream::gatherList(gatheredSegments);
75 gatheredDist[Pstream::myProcNo()] = samplePts.
curveDist();
76 Pstream::gatherList(gatheredDist);
89 ListListOps::combine<labelList>
96 ListListOps::combine<scalarList>
103 if (Pstream::master() && allCurveDist.
size() == 0)
106 <<
"Sample set " << samplePts.
name()
107 <<
" has zero points." <<
endl;
112 indexSets[setI] = sortedDist.
indices();
114 masterSampledSets.
set
136 const bool loadFromFiles
141 mesh_(refCast<const fvMesh>(obr)),
142 loadFromFiles_(loadFromFiles),
143 outputPath_(fileName::null),
144 searchEngine_(mesh_),
145 interpolationScheme_(word::null),
146 writeFormat_(word::null)
148 if (Pstream::parRun())
150 outputPath_ = mesh_.time().path()/
".."/
"postProcessing"/name_;
154 outputPath_ = mesh_.time().path()/
"postProcessing"/name_;
156 if (mesh_.name() != fvMesh::defaultRegion)
158 outputPath_ = outputPath_/mesh_.name();
175 verbose_ = verbosity;
201 const label nFields = classifyFields();
207 Pout<<
"timeName = " << mesh_.time().timeName() <<
nl
208 <<
"scalarFields " << scalarFields_ <<
nl
209 <<
"vectorFields " << vectorFields_ <<
nl
210 <<
"sphTensorFields " << sphericalTensorFields_ <<
nl
211 <<
"symTensorFields " << symmTensorFields_ <<
nl
212 <<
"tensorFields " << tensorFields_ <<
nl;
219 Pout<<
"Creating directory "
220 << outputPath_/mesh_.time().timeName()
224 mkDir(outputPath_/mesh_.time().timeName());
230 sampleAndWrite(scalarFields_);
231 sampleAndWrite(vectorFields_);
232 sampleAndWrite(sphericalTensorFields_);
233 sampleAndWrite(symmTensorFields_);
234 sampleAndWrite(tensorFields_);
244 bool setsFound = dict_.
found(
"sets");
247 dict_.lookup(
"fields") >> fieldSelection_;
250 dict.
lookup(
"interpolationScheme") >> interpolationScheme_;
255 dict_.lookup(
"sets"),
259 combineSampledSets(masterSampledSets_, indexSets_);
263 Info<<
"Reading set description:" <<
nl;
266 Info<<
" " << operator[](setI).name() <<
nl;
274 Pout<<
"sample fields:" << fieldSelection_ <<
nl
275 <<
"sample sets:" <<
nl <<
"(" <<
nl;
279 Pout<<
" " << operator[](setI) <<
endl;
288 bool setsFound = dict_.found(
"sets");
291 searchEngine_.correct();
295 dict_.lookup(
"sets"),
299 combineSampledSets(masterSampledSets_, indexSets_);
Holds list of sampling points which is filled at construction time. Various implementations of this b...
virtual ~sampledSets()
Destructor.
const word & name() const
virtual void readUpdate(const polyMesh::readUpdateState state)
Update for changes of mesh due to readUpdate.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
virtual void execute()
Execute, currently does nothing.
A class for handling words, derived from string.
Base class for function objects, adding functionality to read/write state information (data required ...
#define forAll(list, i)
Loop across all elements in list.
Set of sets to sample. Call sampledSets.write() to sample&write files.
virtual void end()
Execute at the final time-loop, currently does nothing.
virtual void read(const dictionary &)
Read the sampledSets.
bool read(const char *, int32_t &)
void verbose(const bool verbosity=true)
Set verbosity level.
AccessType combine(const List< T > &, AccessOp aop=accessOp< T >())
Combines sublists into one big list.
virtual void write()
Sample and write.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
Registry of regIOobjects.
bool set(const label) const
Is element set.
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 found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const scalarList & curveDist() const
Cumulative distance.
const labelList & segments() const
A list of keyword definitions, which are a keyword followed by any number of values (e....
A list that is sorted upon construction or when explicitly requested with the sort() method.
void combineSampledSets(PtrList< coordSet > &masterSampledSets, labelListList &indexSets)
Combine points from all processors. Sort by curveDist and produce.
Holds list of sampling positions.
void correct()
Correct for mesh changes.
static bool master(const label communicator=0)
Am I the master process.
readUpdateState
Enumeration defining the state of the mesh after a read update.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A List with indirect addressing.
void size(const label)
Override size to be inconsistent with allocated storage.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
static bool verbose_
Output verbosity.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.
Class used for the read-construction of.
sampledSets(const sampledSets &)
Disallow default bitwise copy construct and assignment.