94const word getClassType(
const word& pType)
128 const word& regionPrefix,
136 Info<<
" Generating field files" <<
nl <<
endl;
141 const_cast<word&
>(IOdictionary::typeName) =
142 getClassType(fieldTypes[i]);
156 "$FOAM_CASE/system" + regionPath +
"caseProperties"
159 field.add(
"dimensions", fieldDimensions[i]);
161 string iField(
"${:initialConditions." + fieldNames[i] +
'}');
162 field.add(
"internalField", iField.c_str());
172 field.add(
"boundaryField", boundaryField);
179 entry::disableFunctionEntries = 0;
181 entry::disableFunctionEntries = 1;
182 field2.remove(
"#include");
183 field2.remove(
"initialConditions");
184 field2.remove(
"boundaryConditions");
200 fieldOut.regIOobject::writeObject
210int main(
int argc,
char *argv[])
214 "Create a 0/ directory with fields appropriate for the chosen"
215 " solver and turbulence model."
222 "Read case set-up templates from specified location"
256 "${WM_PROJECT_DIR}/etc/caseDicts/createZeroDirectoryTemplates"
261 baseDir.toAbsolute();
266 <<
"templateDir " << baseDir <<
nl
267 <<
"Does not point to a folder containing case set-up templates"
274 entry::disableFunctionEntries = 1;
292 const label nRegion =
solver.nRegion();
293 for (label regionI = 0; regionI < nRegion; regionI++)
299 Info<<
"Region: " << polyMesh::defaultRegion <<
" (default)"
316 solver.regionType(regionI),
317 solver.fieldNames(regionI),
318 solver.fieldTypes(regionI),
319 solver.fieldDimensions(regionI),
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
Class to store boundary template specifications.
Class to hold information related to the simaulation case.
void checkPatches(const word ®ionPrefix, const boundaryTemplates &bcTemplates) const
Check patches.
dictionary generateBoundaryField(const word ®ionPrefix, const word &fieldName, const boundaryTemplates &bcTemplates) const
Generate boundary field (dictionary)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
A traits class, which is primarily used for primitives.
Class to store solver template specifications.
Base class for solution control classes.
A class for handling words, derived from Foam::string.
runTime controlDict().readEntry("adjustTimeStep"
Foam::word regionName(Foam::polyMesh::defaultRegion)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.