Go to the documentation of this file.
88 const word getClassType(
const word& pType)
118 void createFieldFiles
122 const word& regionPrefix,
130 Info<<
" Generating field files" <<
nl <<
endl;
136 const_cast<word&
>(IOdictionary::typeName) =
137 getClassType(fieldTypes[i]);
151 "${FOAM_CASE}/system" + regionPath +
"caseProperties"
154 field.
add(
"dimensions", fieldDimensions[i]);
156 string iField(
"${:initialConditions." +
fieldNames[i] +
'}');
157 field.
add(
"internalField", iField.c_str());
177 field2.remove(
"#include");
178 field2.remove(
"initialConditions");
179 field2.remove(
"boundaryConditions");
195 fieldOut.regIOobject::writeObject
206 int main(
int argc,
char *argv[])
212 "read case set-up templates from specified location"
234 "${WM_PROJECT_DIR}/etc/caseDicts/createZeroDirectoryTemplates"
238 baseDir =
args[
"templateDir"];
242 baseDir.toAbsolute();
247 <<
"templateDir " << baseDir
248 <<
" should point to the folder containing the "
272 const label nRegion = solver.nRegion();
273 for (
label regionI = 0; regionI < nRegion; regionI++)
290 cInfo.
checkPatches(solver.regionType(regionI), bcTemplates);
296 solver.regionType(regionI),
297 solver.fieldNames(regionI),
298 solver.fieldTypes(regionI),
299 solver.fieldDimensions(regionI),
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
A class for handling file names.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static word defaultRegion
Return the default region name.
#define forAll(list, i)
Loop across all elements in list.
Class to store solver template specifications.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const versionNumber currentVersion
Current version number.
string str() const
Return the string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dictionary generateBoundaryField(const word ®ionPrefix, const word &fieldName, const boundaryTemplates &bcTemplates) const
Generate boundary field (dictionary)
const word & system() const
Return system name.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
int main(int argc, char *argv[])
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void checkPatches(const word ®ionPrefix, const boundaryTemplates &bcTemplates) const
Check patches.
A list of keyword definitions, which are a keyword followed by any number of values (e....
cellIbMask *cellIbMaskExt *faceIbMask *cellIbMask boundaryField().evaluateCoupled()
Input from memory buffer stream.
static int disableFunctionEntries
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
Class to hold information related to the simaulation case.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
fileName path() const
Return path.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
wordList fieldNames(const IOobjectList &objects, const bool syncPar)
Get sorted names of fields of type. If syncPar and running in parallel.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Traits class for primitives.
Output to memory buffer stream.
static const word null
An empty word.
bool optionFound(const word &opt) const
Return true if the named option is found.
Generic GeometricField class.
Foam::argList args(argc, argv)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Class to store boundary template specifications.
bool add(entry *, bool mergeEntry=false)
Add a new entry.