Go to the documentation of this file.
50 if (casePath.empty() || casePath ==
".")
55 else if (casePath[0] !=
'/' && casePath.
name() ==
"..")
58 casePath =
cwd()/casePath;
66 int main(
int argc,
char *argv[])
80 "Specify alternative mesh region for the master mesh"
88 "Specify alternative mesh region for the additional mesh"
94 "Specify a time for the resulting mesh"
103 const bool overwrite =
args.
found(
"overwrite");
108 const word masterRegion =
111 const word addRegion =
117 const auto pos = cName.find(
"processor");
118 if (
pos != string::npos &&
pos != 0)
121 masterCase +=
'/' + processorName;
122 addCase +=
'/' + processorName;
126 getRootCase(masterCase);
127 getRootCase(addCase);
129 Info<<
"Master: " << masterCase <<
" region " << masterRegion <<
nl
130 <<
"mesh to add: " << addCase <<
" region " << addRegion <<
endl;
132 #include "createTimes.H"
134 Info<<
"Reading master mesh for time = " << runTimeMaster.timeName() <<
nl;
142 runTimeMaster.timeName(),
147 Info<<
"Reading mesh to add for time = " << runTimeToAdd.timeName() <<
nl;
154 runTimeToAdd.timeName(),
159 word meshInstance = masterMesh.pointsInstance();
161 const bool specifiedInstance =
167 if (specifiedInstance)
169 runTimeMaster.setTime(
instant(meshInstance), 0);
176 Info<<
"Writing combined mesh to " << runTimeMaster.timeName() <<
endl;
178 masterMesh.addMesh(meshToAdd);
181 if (overwrite || specifiedInstance)
183 masterMesh.setInstance(meshInstance);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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
const fileName & caseName() const noexcept
static std::string name(const std::string &str)
static void addNote(const string ¬e)
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
T get(const label index) const
bool readIfPresent(const word &optName, T &val) const
Mesh consisting of general polyhedral cells.
static void addArgument(const string &argName, const string &usage="")
Add a given mesh to the original mesh to create a single new mesh.
virtual bool write(const token &tok)=0
void exit(const int errNo=1)
static void removeFiles(const polyMesh &mesh)
static bool clean(std::string &str)
An instant of time. Contains the time value and name.
bool check(bool checkArgs=argList::argsMandatory(), bool checkOpts=true) const
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
static void removeFiles(const polyMesh &)
bool found(const word &optName) const
dimensionedScalar pos(const dimensionedScalar &ds)