mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: updated createZeroDirectory utility and renamed to createZeroFolder
This commit is contained in:
@ -4,4 +4,4 @@ caseInfo.C
|
|||||||
solverTemplate.C
|
solverTemplate.C
|
||||||
createZeroDirectory.C
|
createZeroDirectory.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/createZeroDirectory
|
EXE = $(FOAM_APPBIN)/createZeroFolder
|
||||||
@ -137,17 +137,19 @@ void createFieldFiles
|
|||||||
const_cast<word&>(IOdictionary::typeName) =
|
const_cast<word&>(IOdictionary::typeName) =
|
||||||
getClassType(fieldTypes[i]);
|
getClassType(fieldTypes[i]);
|
||||||
|
|
||||||
IOdictionary field
|
// IOdictionary field
|
||||||
(
|
// (
|
||||||
IOobject
|
// IOobject
|
||||||
(
|
// (
|
||||||
fieldNames[i],
|
// fieldNames[i],
|
||||||
"0",
|
// "0",
|
||||||
regionName,
|
// regionName,
|
||||||
runTime,
|
// runTime,
|
||||||
IOobject::NO_READ
|
// IOobject::NO_READ
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
|
|
||||||
|
dictionary field;
|
||||||
|
|
||||||
word regionPath = "/";
|
word regionPath = "/";
|
||||||
|
|
||||||
@ -180,7 +182,33 @@ void createFieldFiles
|
|||||||
|
|
||||||
field.add("boundaryField", boundaryField);
|
field.add("boundaryField", boundaryField);
|
||||||
|
|
||||||
field.regIOobject::writeObject
|
// expand all of the dictionary redirections and remove unnecessary
|
||||||
|
// entries
|
||||||
|
OStringStream os;
|
||||||
|
os << field;
|
||||||
|
|
||||||
|
entry::disableFunctionEntries = 0;
|
||||||
|
dictionary field2(IStringStream(os.str())());
|
||||||
|
entry::disableFunctionEntries = 1;
|
||||||
|
field2.remove("#include");
|
||||||
|
field2.remove("initialConditions");
|
||||||
|
field2.remove("boundaryConditions");
|
||||||
|
|
||||||
|
// construct and write field dictionary
|
||||||
|
IOdictionary fieldOut
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
fieldNames[i],
|
||||||
|
"0",
|
||||||
|
regionName,
|
||||||
|
runTime,
|
||||||
|
IOobject::NO_READ
|
||||||
|
),
|
||||||
|
field2
|
||||||
|
);
|
||||||
|
|
||||||
|
fieldOut.regIOobject::writeObject
|
||||||
(
|
(
|
||||||
IOstream::ASCII,
|
IOstream::ASCII,
|
||||||
IOstream::currentVersion,
|
IOstream::currentVersion,
|
||||||
Reference in New Issue
Block a user