Go to the documentation of this file.
51 bool Foam::sampledSets::verbose_ =
false;
56 void Foam::sampledSets::combineSampledSets
58 PtrList<coordSet>& masterSampledSets,
66 masterSampledSets_.clear();
67 masterSampledSets_.setSize(size());
70 const PtrList<sampledSet>& sampledSets = *
this;
78 sampledSets[setI].gather(indexSets[setI], segments)
86 Foam::sampledSets::sampledSets
95 mesh_(refCast<const fvMesh>(obr_)),
96 loadFromFiles_(
false),
109 outputPath_ = outputPath_/mesh_.name();
118 Foam::sampledSets::sampledSets
123 const bool loadFromFiles
128 mesh_(refCast<const fvMesh>(obr)),
129 loadFromFiles_(loadFromFiles),
131 searchEngine_(mesh_),
142 outputPath_ = outputPath_/mesh_.name();
171 const label nFields = classifyFields();
177 Pout<<
"timeName = " << mesh_.time().timeName() <<
nl
178 <<
"scalarFields " << scalarFields_ <<
nl
179 <<
"vectorFields " << vectorFields_ <<
nl
180 <<
"sphTensorFields " << sphericalTensorFields_ <<
nl
181 <<
"symTensorFields " << symmTensorFields_ <<
nl
182 <<
"tensorFields " << tensorFields_ <<
nl;
189 Pout<<
"Creating directory "
190 << outputPath_/mesh_.time().timeName()
194 mkDir(outputPath_/mesh_.time().timeName());
198 Info<<
"No fields to sample" <<
endl;
204 sampleAndWrite(scalarFields_);
205 sampleAndWrite(vectorFields_);
206 sampleAndWrite(sphericalTensorFields_);
207 sampleAndWrite(symmTensorFields_);
208 sampleAndWrite(tensorFields_);
220 if (dict_.found(
"sets"))
222 dict_.
readEntry(
"fields", fieldSelection_);
230 dict_.lookup(
"sets"),
234 combineSampledSets(masterSampledSets_, indexSets_);
238 Info<<
"Reading set description:" <<
nl;
241 Info<<
" " << operator[](setI).name() <<
nl;
249 Pout<<
"sample fields:" << fieldSelection_ <<
nl
250 <<
"sample sets:" <<
nl <<
"(" <<
nl;
254 Pout<<
" " << operator[](setI) <<
endl;
265 if (dict_.found(
"sets"))
267 searchEngine_.correct();
271 dict_.lookup(
"sets"),
275 combineSampledSets(masterSampledSets_, indexSets_);
282 if (&mpm.
mesh() == &mesh_)
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< label > labelList
A List of labels.
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.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
static word defaultRegion
Return the default region name.
bool read(const char *buf, int32_t &val)
Same as readInt32.
static bool master(const label communicator=worldComm)
Am I the master process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool write()
Sample and write.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
Registry of regIOobjects.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
bool verbose(const bool on)
Enable/disable verbose output.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
static word outputPrefix
Directory prefix.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
void correct()
Correct for mesh changes.
static const fileName null
An empty fileName.
readUpdateState
Enumeration defining the state of the mesh after a read update.
List< labelList > labelListList
A List of labelList.
virtual bool execute()
Execute, currently does nothing.
virtual void movePoints(const polyMesh &)
Update for mesh point-motion.
static const word null
An empty word.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
void setSize(const label newSize)
Alias for resize(const label)
const polyMesh & mesh() const
Return polyMesh.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
defineTypeNameAndDebug(combustionModel, 0)
Class used for the read-construction of.
virtual bool read(const dictionary &)
Read the sampledSets.