Go to the documentation of this file.
94 const word getClassType(
const word& pType)
124 void createFieldFiles
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);
182 field2.remove(
"#include");
183 field2.remove(
"initialConditions");
184 field2.remove(
"boundaryConditions");
200 fieldOut.regIOobject::writeObject
210 int 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"
292 const label nRegion =
solver.nRegion();
293 for (label regionI = 0; regionI < nRegion; regionI++)
316 solver.regionType(regionI),
317 solver.fieldNames(regionI),
318 solver.fieldTypes(regionI),
319 solver.fieldDimensions(regionI),
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,...
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.
static word defaultRegion
T getOrDefault(const word &optName, const T &deflt) const
static void addNote(const string ¬e)
Class to store solver template specifications.
Ostream & endl(Ostream &os)
dictionary generateBoundaryField(const word ®ionPrefix, const word &fieldName, const boundaryTemplates &bcTemplates) const
Base class for solution control classes.
runTime controlDict().readEntry("adjustTimeStep"
The IOstreamOption is a simple container for options an IOstream can normally have.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void checkPatches(const word ®ionPrefix, const boundaryTemplates &bcTemplates) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const wordRes fieldNames(propsDict.getOrDefault< wordRes >("fields", wordRes()))
OBJstream os(runTime.globalPath()/outputName)
static int disableFunctionEntries
Class to hold information related to the simaulation case.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const word & system() const
@ ASCII
"ascii" (normal default)
#define FatalErrorInFunction
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
Generic GeometricField class.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
Class to store boundary template specifications.
localIOdictionary is derived from IOdictionary but excludes parallel master reading.
bool isDir(const fileName &name, const bool followLink=true)