94 Info<<
" Reading " << io.headerClassName()
106 if (meshObject[i].isDict())
110 if (d.
found(
"faceLabels"))
115 if (d.
found(
"flipMap"))
120 if (d.
found(
"cellLabels"))
125 if (d.
found(
"pointLabels"))
135 const_cast<word&
>(meshObject.type()) = io.headerClassName();
140 writeOk = meshObject.regIOobject::writeObject
182 bool writeOptionalMeshObject
201 bool writeOk =
false;
203 const bool haveFile = io.headerOk();
206 stringList classNames(1, io.headerClassName());
210 if (classNames[0] == T::typeName)
212 Info<<
" Reading " << classNames[0]
214 T meshObject(io,
write && haveFile);
217 writeOk = meshObject.regIOobject::write(
write && haveFile);
224 int main(
int argc,
char *argv[])
230 "exclude the 'constant/' dir in the times list"
244 Info<<
"Excluding the constant directory." <<
nl <<
endl;
274 writeMeshObject<cellCompactIOList, cellIOList>
280 writeMeshObject<labelIOList>(
"owner", meshDir, runTime);
281 writeMeshObject<labelIOList>(
"neighbour", meshDir, runTime);
282 if (!writeMeshObject<faceCompactIOList>(
"faces", meshDir, runTime))
284 writeMeshObject<faceCompactIOList, faceIOList>
291 writeMeshObject<pointIOField>(
"points", meshDir, runTime);
294 writeZones(
"boundary", meshDir, runTime);
295 writeMeshObject<labelIOList>(
"pointProcAddressing", meshDir, runTime);
296 writeMeshObject<labelIOList>(
"faceProcAddressing", meshDir, runTime);
297 writeMeshObject<labelIOList>(
"cellProcAddressing", meshDir, runTime);
303 writeZones(
"cellZones", meshDir, runTime);
304 writeZones(
"faceZones", meshDir, runTime);
305 writeZones(
"pointZones", meshDir, runTime);
313 const word& headerClassName = iter()->headerClassName();
342 Info<<
" Reading " << headerClassName
343 <<
" : " << iter()->name() <<
endl;
347 Info<<
" Writing " << iter()->name() <<
endl;
348 fDict.regIOobject::write();
368 if (!lagrangianDirs.empty())
376 Info<<
" Create polyMesh for time = "
424 stringList sprayFields(sprayObjs.sortedToc());
427 forAll(sprayFields, fieldi)
429 const word&
name = sprayFields[fieldi];
438 ||
name ==
"origProcId"
445 bool writeOk = writeOptionalMeshObject<labelIOField>
452 if (writeOk)
continue;
454 writeOk = writeOptionalMeshObject<scalarIOField>
461 if (writeOk)
continue;
463 writeOk = writeOptionalMeshObject<vectorIOField>
470 if (writeOk)
continue;
472 writeOk = writeOptionalMeshObject<sphericalTensorIOField>
479 if (writeOk)
continue;
481 writeOk = writeOptionalMeshObject<symmTensorIOField>
488 if (writeOk)
continue;
490 writeOk = writeOptionalMeshObject<tensorIOField>
497 if (writeOk)
continue;
499 writeOk = writeOptionalMeshObject<labelFieldIOField>
506 if (writeOk)
continue;
508 writeOk = writeOptionalMeshObject<vectorFieldIOField>
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static const char *const typeName
A PtrList of objects of type <Type> with automated input and output.
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static fileCheckTypes fileModificationChecking
Type of file modification checking.
static const versionNumber currentVersion
Current version number.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
word userTimeName() const
Return current user time name with units.
IOstream::streamFormat writeFormat() const
Default write format.
IOstream::compressionType writeCompression() const
Default write compression.
fileName timePath() const
Return current time path.
bool setOption(const word &opt, const string ¶m="")
Set option directly (use with caution)
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
bool unsetOption(const word &opt)
Unset option directly (use with caution)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static const word prefix
The prefix to local: lagrangian.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
void set(entry *)
Assign a new entry, overwrite any existing entry.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const word & name() const
Return const reference to name.
Read field as dictionary (without mesh).
A class for handling file names.
static const fileName null
An empty fileName.
readUpdateState readUpdate(const stitchType stitch=stitchType::geometric)
Update the mesh based on the mesh files saved in time.
Mesh consisting of general polyhedral cells.
static word defaultRegion
Return the default region name.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
A class for handling words, derived from string.
static const word null
An empty word.
int main(int argc, char *argv[])
static instantList timeDirs
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
const fileOperation & fileHandler()
Get current file handler.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const word & regionName(const solver ®ion)
List< bool > boolList
Bool container classes.
defineTemplateTypeNameAndDebug(prghPressure, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
fileNameList readDir(const fileName &, const fileType=fileType::file, const bool filterVariants=true, const bool followLink=true)
Read a directory and return the entries as a string list.
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
Foam::argList args(argc, argv)
Write a mesh object in the format specified in controlDict.