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"))
134 const_cast<word&
>(meshObject.type()) = io.headerClassName();
139 writeOk = meshObject.regIOobject::writeObject
181 bool writeOptionalMeshObject
200 bool writeOk =
false;
202 bool haveFile = io.headerOk();
205 stringList classNames(1, io.headerClassName());
209 if (classNames[0] == T::typeName)
211 Info<<
" Reading " << classNames[0]
213 T meshObject(io,
write && haveFile);
216 writeOk = meshObject.regIOobject::write(
write && haveFile);
223 int main(
int argc,
char *argv[])
229 "exclude the 'constant/' dir in the times list"
243 Info<<
"Excluding the constant directory." <<
nl <<
endl;
275 writeMeshObject<cellCompactIOList, cellIOList>
281 writeMeshObject<labelIOList>(
"owner", meshDir, runTime);
282 writeMeshObject<labelIOList>(
"neighbour", meshDir, runTime);
283 writeMeshObject<faceCompactIOList, faceIOList>
289 writeMeshObject<pointIOField>(
"points", meshDir, runTime);
292 writeZones(
"boundary", meshDir, runTime);
293 writeMeshObject<labelIOList>(
"pointProcAddressing", meshDir, runTime);
294 writeMeshObject<labelIOList>(
"faceProcAddressing", meshDir, runTime);
295 writeMeshObject<labelIOList>(
"cellProcAddressing", meshDir, runTime);
301 writeZones(
"cellZones", meshDir, runTime);
302 writeZones(
"faceZones", meshDir, runTime);
303 writeZones(
"pointZones", meshDir, runTime);
311 const word& headerClassName = iter()->headerClassName();
340 Info<<
" Reading " << headerClassName
341 <<
" : " << iter()->name() <<
endl;
345 Info<<
" Writing " << iter()->name() <<
endl;
346 fDict.regIOobject::write();
370 if (!lagrangianDirs.empty())
378 Info<<
" Create polyMesh for time = "
426 stringList sprayFields(sprayObjs.sortedToc());
429 forAll(sprayFields, fieldi)
431 const word&
name = sprayFields[fieldi];
440 ||
name ==
"origProcId"
447 bool writeOk = writeOptionalMeshObject<labelIOField>
454 if (writeOk)
continue;
456 writeOk = writeOptionalMeshObject<scalarIOField>
463 if (writeOk)
continue;
465 writeOk = writeOptionalMeshObject<vectorIOField>
472 if (writeOk)
continue;
474 writeOk = writeOptionalMeshObject<sphericalTensorIOField>
481 if (writeOk)
continue;
483 writeOk = writeOptionalMeshObject<symmTensorIOField>
490 if (writeOk)
continue;
492 writeOk = writeOptionalMeshObject<tensorIOField>
499 if (writeOk)
continue;
501 writeOk = writeOptionalMeshObject<labelFieldIOField>
508 if (writeOk)
continue;
510 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.
List< bool > boolList
Bool container classes.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
defineTemplateTypeNameAndDebug(IOPtrList< ensightPart >, 0)
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.