Skip to content
Snippets Groups Projects
Commit 85d79644 authored by andy's avatar andy
Browse files

ENH: updated createZeroDirectory utility and renamed to createZeroFolder

parent 951534b3
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 13 deletions
...@@ -4,4 +4,4 @@ caseInfo.C ...@@ -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 ...@@ -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 ...@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment