94 Info<<
" Reading " << io.headerClassName()
95 <<
" : " << name <<
endl;
110 if (d.
found(
"faceLabels"))
115 if (d.
found(
"flipMap"))
120 if (d.
found(
"cellLabels"))
125 if (d.
found(
"pointLabels"))
143 runTime.writeCompression(),
169 if (!y[i].empty() &&
findIndex(x, y[i]) == -1)
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]
212 <<
" : " << name <<
endl;
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;
262 Info<<
"Using region " << regionName <<
nl <<
endl;
271 runTime.setTime(timeDirs[timeI], timeI);
272 Info<<
"Time = " << runTime.userTimeName() <<
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);
298 writeMeshObject<pointIOField>
300 "internalDelaunayVertices",
309 writeZones(
"cellZones", meshDir, runTime);
310 writeZones(
"faceZones", meshDir, runTime);
311 writeZones(
"pointZones", meshDir, runTime);
319 const word& headerClassName = iter()->headerClassName();
348 Info<<
" Reading " << headerClassName
349 <<
" : " << iter()->name() <<
endl;
353 Info<<
" Writing " << iter()->name() <<
endl;
354 fDict.regIOobject::write();
378 if (!lagrangianDirs.empty())
386 Info<<
" Create polyMesh for time = " 387 << runTime.timeName() <<
endl;
423 runTime.writeFormat(),
425 runTime.writeCompression(),
431 IOobjectList sprayObjs(runTime, runTime.timeName(), dir);
434 stringList sprayFields(sprayObjs.sortedToc());
437 forAll(sprayFields, fieldi)
439 const word& name = sprayFields[fieldi];
448 || name ==
"origProcId" 455 bool writeOk = writeOptionalMeshObject<labelIOField>
462 if (writeOk)
continue;
464 writeOk = writeOptionalMeshObject<scalarIOField>
471 if (writeOk)
continue;
473 writeOk = writeOptionalMeshObject<vectorIOField>
480 if (writeOk)
continue;
482 writeOk = writeOptionalMeshObject<sphericalTensorIOField>
489 if (writeOk)
continue;
491 writeOk = writeOptionalMeshObject<symmTensorIOField>
498 if (writeOk)
continue;
500 writeOk = writeOptionalMeshObject<tensorIOField>
507 if (writeOk)
continue;
509 writeOk = writeOptionalMeshObject<labelFieldIOField>
516 if (writeOk)
continue;
518 writeOk = writeOptionalMeshObject<vectorFieldIOField>
528 Info<<
" Failed converting " << name <<
endl;
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
bool setOption(const word &opt, const string ¶m="")
Set option directly (use with caution)
#define forAll(list, i)
Loop across all elements in list.
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
A class for handling file names.
List of IOobjects with searching and retrieving facilities.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
bool unsetOption(const word &opt)
Unset option directly (use with caution)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Write a mesh object in the format specified in controlDict.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static const char *const typeName
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
void size(const label)
Override size to be inconsistent with allocated storage.
static const fileName null
An empty fileName.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
List< bool > boolList
Bool container classes.
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
A class for handling words, derived from string.
static const word null
An empty word.
List< label > labelList
A List of labels.
const fileOperation & fileHandler()
Get current file handler.
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.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
defineTemplateTypeNameAndDebug(IOPtrList< ensightPart >, 0)
Read field as dictionary (without mesh).
static fileCheckTypes fileModificationChecking
Type of file modification checking.
static const word prefix
The prefix to local: lagrangian.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
readUpdateState readUpdate(const stitchType stitch=stitchType::geometric)
Update the mesh based on the mesh files saved in time.
void setSize(const label)
Reset size of List.
A PtrList of objects of type <T> with automated input and output.
static const versionNumber currentVersion
Current version number.
void set(entry *)
Assign a new entry, overwrite any existing entry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.