81 int main(
int argc,
char *argv[])
96 "'(mesh1 mesh2 ... meshN)'",
97 "list of meshes to merge"
103 "'(region1 region2 ... regionN)'",
104 "list of regions to merge"
110 "'((mesh1 region1) (mesh2 region2) ... (mesh3 regionN))'",
111 "list of mesh regions to merge"
117 "'(\"casePath1\" \"casePath2\" ... \"casePathN\")'",
118 "list of cases to merge"
124 "'((\"casePath1\" mesh1) (\"casePath2\" mesh2)"
125 "... (\"casePathN\" meshN))'",
126 "list of case meshes to merge"
132 "'((\"casePath1\" region1) (\"casePath2\" region2)"
133 "... (\"casePathN\" regionN))'",
134 "list of case regions to merge"
139 "addCaseMeshRegions",
140 "'((\"casePath1\" mesh1 region1) (\"casePath2\" mesh2 region2)"
141 "... (\"casePathN\" meshN regionN))'",
142 "list of case mesh regions to merge"
205 "addCaseMeshRegions",
227 caseMeshRegions.append
230 caseMeshes[i].first(),
239 caseMeshRegions.append
242 caseRegions[i].first(),
272 ?
"meshes"/meshRegions[i].first()
274 const word& addRegion = meshRegions[i].second();
276 Info<<
"Reading polyMesh " << addLocal/addRegion <<
endl;
288 Info<<
"Adding mesh " << meshToAdd.objectPath() <<
endl;
289 mergeMeshes.addMesh(meshToAdd);
293 forAll(caseMeshRegions, i)
295 const fileName& addCase = caseMeshRegions[i].first();
298 ?
"meshes"/caseMeshRegions[i].second()
300 const word& addRegion = caseMeshRegions[i].third();
314 Info<<
"Reading polyMesh for case "
315 << runTimeToAdd.path()/
"constant"/addLocal/addRegion <<
endl;
327 Info<<
"Adding mesh " << meshToAdd.objectPath() <<
endl;
328 mergeMeshes.addMesh(meshToAdd);
#define forAll(list, i)
Loop across all elements in list.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const List< word > & null()
Return a null List.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word controlDictName
The default control dictionary name (normally "controlDict")
A 2-tuple for storing two objects of different types.
A 3-tuple for storing three objects of different types.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
static void noParallel()
Remove the parallel options.
T optionLookupOrDefault(const word &opt, const T &deflt) const
Read a value from the named option if present.
A class for handling file names.
word name() const
Return file name (part beyond last /)
static const fileName null
An empty fileName.
fileName path() const
Return directory path name (part before last /)
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
Merge meshes into a single mesh without stitching.
Mesh consisting of general polyhedral cells.
const fileName & facesInstance() const
Return the current instance directory for faces.
static word defaultRegion
Return the default region name.
const fileName & pointsInstance() const
Return the current instance directory for points.
void setInstance(const fileName &)
Set the instance for mesh files.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
int main(int argc, char *argv[])
Ostream & endl(Ostream &os)
Add newline and flush stream.
labelList second(const UList< labelPair > &p)
Foam::argList args(argc, argv)