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),
110 outputPath_ /= mesh_.name();
119 Foam::sampledSets::sampledSets
124 const bool loadFromFiles
129 mesh_(refCast<const fvMesh>(obr)),
130 loadFromFiles_(loadFromFiles),
132 searchEngine_(mesh_),
144 outputPath_ /= mesh_.name();
173 const label nFields = classifyFields();
179 Pout<<
"timeName = " << mesh_.time().timeName() <<
nl
180 <<
"scalarFields " << scalarFields_ <<
nl
181 <<
"vectorFields " << vectorFields_ <<
nl
182 <<
"sphTensorFields " << sphericalTensorFields_ <<
nl
183 <<
"symTensorFields " << symmTensorFields_ <<
nl
184 <<
"tensorFields " << tensorFields_ <<
nl;
191 Pout<<
"Creating directory "
192 << outputPath_/mesh_.time().timeName()
196 mkDir(outputPath_/mesh_.time().timeName());
200 Info<<
"No fields to sample" <<
endl;
206 sampleAndWrite(scalarFields_);
207 sampleAndWrite(vectorFields_);
208 sampleAndWrite(sphericalTensorFields_);
209 sampleAndWrite(symmTensorFields_);
210 sampleAndWrite(tensorFields_);
222 if (dict_.found(
"sets"))
224 dict_.
readEntry(
"fields", fieldSelection_);
232 dict_.lookup(
"sets"),
236 combineSampledSets(masterSampledSets_, indexSets_);
240 Info<<
"Reading set description:" <<
nl;
243 Info<<
" " << operator[](setI).name() <<
nl;
251 Pout<<
"sample fields:" << fieldSelection_ <<
nl
252 <<
"sample sets:" <<
nl <<
"(" <<
nl;
256 Pout<<
" " << operator[](setI) <<
endl;
267 if (dict_.found(
"sets"))
269 searchEngine_.correct();
273 dict_.lookup(
"sets"),
277 combineSampledSets(masterSampledSets_, indexSets_);
284 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 (stdout output on master, null elsewhere)
void setSize(const label n)
Alias for resize()
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.
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
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.