Go to the documentation of this file.
112 bool writeOk =
false;
116 Info<<
" Reading " << io.headerClassName()
132 if (d.
found(
"faceLabels"))
137 if (d.
found(
"flipMap"))
142 if (d.
found(
"cellLabels"))
147 if (d.
found(
"pointLabels"))
173 template<
class StringType>
189 if (!
y[i].empty() && !
x.found(
y[i]))
201 bool writeOptionalMeshObject
220 bool writeOk =
false;
225 wordList classNames(1, io.headerClassName());
229 if (classNames[0] == T::typeName)
231 Info<<
" Reading " << classNames[0]
236 writeOk =
meshObject.regIOobject::write(valid && haveFile);
243 int main(
int argc,
char *argv[])
247 "Converts all IOobjects associated with a case into the format"
248 " specified in the controlDict"
254 "Exclude the 'constant/' dir in the times list"
258 "enableFunctionEntries",
259 "Enable expansion of dictionary directives - #include, #codeStream etc"
273 Info<<
"Excluding the constant directory." <<
nl <<
endl;
281 const bool enableEntries =
args.
found(
"enableFunctionEntries");
284 Info<<
"Allowing dictionary preprocessing ('#include', '#codeStream')."
318 writeMeshObject<cellCompactIOList, cellIOList>
325 writeMeshObject<labelIOList>(
"owner", meshDir,
runTime);
326 writeMeshObject<labelIOList>(
"neighbour", meshDir,
runTime);
327 writeMeshObject<faceCompactIOList, faceIOList>
334 writeMeshObject<pointIOField>(
"points", meshDir,
runTime);
338 writeMeshObject<labelIOList>(
"pointProcAddressing", meshDir,
runTime);
339 writeMeshObject<labelIOList>(
"faceProcAddressing", meshDir,
runTime);
340 writeMeshObject<labelIOList>(
"cellProcAddressing", meshDir,
runTime);
341 writeMeshObject<labelIOList>
343 "boundaryProcAddressing",
349 writeMeshObject<pointIOField>
351 "internalDelaunayVertices",
362 writeZones(
"cellZones", meshDir,
runTime, compress);
363 writeZones(
"faceZones", meshDir,
runTime, compress);
364 writeZones(
"pointZones", meshDir,
runTime, compress);
372 const word& headerClassName = (*iter)->headerClassName();
376 headerClassName == volScalarField::typeName
377 || headerClassName == volVectorField::typeName
378 || headerClassName == volSphericalTensorField::typeName
379 || headerClassName == volSymmTensorField::typeName
380 || headerClassName == volTensorField::typeName
382 || headerClassName == surfaceScalarField::typeName
383 || headerClassName == surfaceVectorField::typeName
384 || headerClassName == surfaceSphericalTensorField::typeName
385 || headerClassName == surfaceSymmTensorField::typeName
386 || headerClassName == surfaceTensorField::typeName
388 || headerClassName == pointScalarField::typeName
389 || headerClassName == pointVectorField::typeName
390 || headerClassName == pointSphericalTensorField::typeName
391 || headerClassName == pointSymmTensorField::typeName
392 || headerClassName == pointTensorField::typeName
401 Info<<
" Reading " << headerClassName
402 <<
" : " << (*iter)->name() <<
endl;
406 Info<<
" Writing " << (*iter)->name() <<
endl;
407 fDict.regIOobject::write();
427 if (!lagrangianDirs.empty())
435 Info<<
" Create polyMesh for time = "
490 for (
const word&
name : cloudFields)
499 ||
name ==
"coordinates"
500 ||
name ==
"origProcId"
507 bool writeOk = writeOptionalMeshObject<labelIOField>
514 if (writeOk)
continue;
516 writeOk = writeOptionalMeshObject<scalarIOField>
523 if (writeOk)
continue;
525 writeOk = writeOptionalMeshObject<vectorIOField>
532 if (writeOk)
continue;
534 writeOk = writeOptionalMeshObject<sphericalTensorIOField>
541 if (writeOk)
continue;
543 writeOk = writeOptionalMeshObject<symmTensorIOField>
550 if (writeOk)
continue;
552 writeOk = writeOptionalMeshObject<tensorIOField>
559 if (writeOk)
continue;
561 writeOk = writeOptionalMeshObject<labelFieldIOField>
568 if (writeOk)
continue;
570 writeOk = writeOptionalMeshObject<vectorFieldIOField>
@ UNCOMPRESSED
compression = false
IOstream::compressionType writeCompression() const
List< label > labelList
A List of labels.
label size() const noexcept
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for handling file names.
A primitive field of type <T> with automated input and output.
A PtrList of objects of type <T> with automated input and output.
static word defaultRegion
Read field as dictionary (without mesh).
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
IOstream::streamFormat writeFormat() const
static word timeName(const scalar t, const int precision=precision_)
static fileCheckTypes fileModificationChecking
static void addNote(const string ¬e)
wordList sortedNames() const
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
List< bool > boolList
A List of bools.
const fileOperation & fileHandler()
defineTemplateTypeNameAndDebug(faScalarMatrix, 0)
Ostream & endl(Ostream &os)
entry * set(entry *entryPtr)
Write a mesh object in the format specified in controlDict.
bool readIfPresent(const word &optName, T &val) const
Mesh consisting of general polyhedral cells.
bool setOption(const word &optName, const string ¶m="")
fileName timePath() const
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
The IOstreamOption is a simple container for options an IOstream can normally have.
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static int disableFunctionEntries
List of IOobjects with searching and retrieving facilities.
bool unsetOption(const word &optName)
void reset(autoPtr< T > &&other) noexcept
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
@ ASCII
"ascii" (normal default)
forAllConstIters(mixture.phases(), phase)
static void addOptions(const bool constant=true, const bool withZero=false)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual void setTime(const Time &t)
word name(const expressions::valueTypeCode typeCode)
const word typeName("volScalarField::Internal")
static instantList select0(Time &runTime, const argList &args)
Foam::argList args(argc, argv)
fileNameList readDir(const fileName &directory, const fileName::Type type=fileName::FILE, const bool filtergz=true, const bool followLink=true)
Foam::autoPtr< Foam::fvMesh > meshPtr(nullptr)
bool found(const word &optName) const