94const word getClassType(
const word& pType)
128 const word& regionPrefix,
136 Info<<
" Generating field files" <<
nl <<
endl;
141 const_cast<word&
>(IOdictionary::typeName) =
152 field.add(
"dimensions", fieldDimensions[i]);
154 string iField(
"${:initialConditions." + fieldNames[i] +
'}');
155 field.add(
"internalField", iField.c_str());
165 field.add(
"boundaryField", boundaryField);
181 field2.remove(
"#include");
182 field2.remove(
"initialConditions");
183 field2.remove(
"boundaryConditions");
202 fieldOut.regIOobject::writeObject
212int main(
int argc,
char *argv[])
216 "Create a 0/ directory with fields appropriate for the chosen"
217 " solver and turbulence model."
224 "Read case set-up templates from specified location"
259 "${WM_PROJECT_DIR}/etc/caseDicts/createZeroDirectoryTemplates"
264 baseDir.toAbsolute();
269 <<
"templateDir " << baseDir <<
nl
270 <<
"Does not point to a folder containing case set-up templates"
295 const label nRegion =
solver.nRegion();
296 for (label regionI = 0; regionI < nRegion; regionI++)
319 solver.regionType(regionI),
320 solver.fieldNames(regionI),
321 solver.fieldTypes(regionI),
322 solver.fieldDimensions(regionI),
static const char *const typeName
Typename for Field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A simple container for options an IOstream can normally have.
@ ASCII
"ascii" (normal default)
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
An OSstream with internal List storage.
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.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
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,...
static int disableFunctionEntries
Enable or disable use of function entries and variable expansions.
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 and vector-space.
static word defaultRegion
Return the default region name.
Class to store solver template specifications.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
runTime controlDict().readEntry("adjustTimeStep"
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Collection of common field types.
List< word > wordList
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
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.