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();
155 verbose_ = verbosity;
169 const label nFields = classifyFields();
175 Pout<<
"timeName = " << mesh_.time().timeName() <<
nl
176 <<
"scalarFields " << scalarFields_ <<
nl
177 <<
"vectorFields " << vectorFields_ <<
nl
178 <<
"sphTensorFields " << sphericalTensorFields_ <<
nl
179 <<
"symTensorFields " << symmTensorFields_ <<
nl
180 <<
"tensorFields " << tensorFields_ <<
nl;
187 Pout<<
"Creating directory "
188 << outputPath_/mesh_.time().timeName()
192 mkDir(outputPath_/mesh_.time().timeName());
196 Info<<
"No fields to sample" <<
endl;
202 sampleAndWrite(scalarFields_);
203 sampleAndWrite(vectorFields_);
204 sampleAndWrite(sphericalTensorFields_);
205 sampleAndWrite(symmTensorFields_);
206 sampleAndWrite(tensorFields_);
218 if (dict_.found(
"sets"))
220 dict_.
readEntry(
"fields", fieldSelection_);
228 dict_.lookup(
"sets"),
232 combineSampledSets(masterSampledSets_, indexSets_);
236 Info<<
"Reading set description:" <<
nl;
239 Info<<
" " << operator[](setI).name() <<
nl;
247 Pout<<
"sample fields:" << fieldSelection_ <<
nl
248 <<
"sample sets:" <<
nl <<
"(" <<
nl;
252 Pout<<
" " << operator[](setI) <<
endl;
263 if (dict_.found(
"sets"))
265 searchEngine_.correct();
269 dict_.lookup(
"sets"),
273 combineSampledSets(masterSampledSets_, indexSets_);
280 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.
void verbose(const bool verbosity=true)
Set verbosity level.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool write()
Sample and write.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
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 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.
static bool master(const label communicator=0)
Am I the master process.
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.