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;
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.timeName() <<
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);
296 writeMeshObject<labelIOList>
298 "boundaryProcAddressing",
304 writeMeshObject<pointIOField>
306 "internalDelaunayVertices",
315 writeZones(
"cellZones", meshDir, runTime);
316 writeZones(
"faceZones", meshDir, runTime);
317 writeZones(
"pointZones", meshDir, runTime);
325 const word& headerClassName = iter()->headerClassName();
354 Info<<
" Reading " << headerClassName
355 <<
" : " << iter()->name() <<
endl;
359 Info<<
" Writing " << iter()->name() <<
endl;
360 fDict.regIOobject::write();
380 if (!lagrangianDirs.empty())
388 Info<<
" Create polyMesh for time = " 389 << runTime.timeName() <<
endl;
425 runTime.writeFormat(),
427 runTime.writeCompression(),
433 IOobjectList sprayObjs(runTime, runTime.timeName(), dir);
436 stringList sprayFields(sprayObjs.sortedToc());
439 forAll(sprayFields, fieldi)
441 const word& name = sprayFields[fieldi];
450 || name ==
"origProcId" 457 bool writeOk = writeOptionalMeshObject<labelIOField>
464 if (writeOk)
continue;
466 writeOk = writeOptionalMeshObject<scalarIOField>
473 if (writeOk)
continue;
475 writeOk = writeOptionalMeshObject<vectorIOField>
482 if (writeOk)
continue;
484 writeOk = writeOptionalMeshObject<sphericalTensorIOField>
491 if (writeOk)
continue;
493 writeOk = writeOptionalMeshObject<symmTensorIOField>
500 if (writeOk)
continue;
502 writeOk = writeOptionalMeshObject<tensorIOField>
509 if (writeOk)
continue;
511 writeOk = writeOptionalMeshObject<labelFieldIOField>
518 if (writeOk)
continue;
520 writeOk = writeOptionalMeshObject<vectorFieldIOField>
530 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)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool typeHeaderOk(const bool checkType=true)
Read header (uses typeFilePath to find file) and check header.
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.
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 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.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
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.
label size() const
Return number of elements in table.
List< bool > boolList
Bool container classes.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in 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)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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.
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...
A primitive field of type <T> with automated input and output.
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.