83 Info<<
"Reusing existing pointZone "
85 <<
" at index " << zoneID <<
endl;
90 zoneID = pointZones.
size();
91 Info<<
"Adding pointZone " <<
name <<
" at index " << zoneID <<
endl;
117 <<
" at index " << zoneID <<
endl;
122 zoneID = faceZones.
size();
123 Info<<
"Adding faceZone " <<
name <<
" at index " << zoneID <<
endl;
150 <<
" at index " << zoneID <<
endl;
155 zoneID = cellZones.
size();
156 Info<<
"Adding cellZone " <<
name <<
" at index " << zoneID <<
endl;
183 <<
"Cannot find patch " <<
name <<
endl
184 <<
"It should be present and of non-zero size" <<
endl
192 <<
"Patch " <<
name <<
" is present but zero size"
199 int main(
int argc,
char *argv[])
203 "Merge the faces on the specified patches (if geometrically possible)\n"
204 "so the faces become internal.\n"
205 "Integral matching is used when the options -partial and -perfect are "
215 "do not update fields"
224 "couple partially overlapping patches (optional)"
229 "couple perfectly aligned patches (optional)"
235 "dictionary file with tolerances"
244 const word masterPatchName =
args[1];
245 const word slavePatchName =
args[2];
252 if (partialCover && perfectCover)
255 <<
"Cannot supply both partial and perfect." <<
endl
256 <<
"Use perfect match option if the patches perfectly align"
257 <<
" (both vertex positions and face centres)" <<
endl
262 const word mergePatchName(masterPatchName + slavePatchName);
263 const word cutZoneName(mergePatchName +
"CutFaceZone");
269 Info<<
"Coupling partially overlapping patches "
270 << masterPatchName <<
" and " << slavePatchName <<
nl
271 <<
"Resulting internal faces will be in faceZone " << cutZoneName
273 <<
"Any uncovered faces will remain in their patch"
278 else if (perfectCover)
280 Info<<
"Coupling perfectly aligned patches "
281 << masterPatchName <<
" and " << slavePatchName <<
nl
282 <<
"Resulting (internal) faces will be in faceZone " << cutZoneName
284 <<
"Note: both patches need to align perfectly." <<
nl
286 <<
" positions and the face centres need to align to within" <<
nl
287 <<
"a tolerance given by the minimum edge length on the patch"
292 Info<<
"Coupling patches " << masterPatchName <<
" and "
293 << slavePatchName <<
nl
294 <<
"Resulting (internal) faces will be in faceZone " << cutZoneName
296 <<
"Note: the overall area covered by both patches should be"
297 <<
" identical (\"integral\" interface)." <<
endl
298 <<
"If this is not the case use the -partial option" <<
nl <<
endl;
316 slidingTolerances += toleranceFile;
333 isf[i] = masterPatch.
start() + i;
346 label cutZoneID = addFaceZone(mesh, cutZoneName);
348 mesh.
faceZones()[cutZoneID].resetAddressing
374 label masterZoneID = addFaceZone(mesh, mergePatchName +
"MasterZone");
376 mesh.
faceZones()[masterZoneID].resetAddressing
389 osf[i] = slavePatch.
start() + i;
392 label slaveZoneID = addFaceZone(mesh, mergePatchName +
"SlaveZone");
393 mesh.
faceZones()[slaveZoneID].resetAddressing
400 label cutZoneID = addFaceZone(mesh, cutZoneName);
401 mesh.
faceZones()[cutZoneID].resetAddressing
417 mergePatchName +
"MasterZone",
418 mergePatchName +
"SlaveZone",
419 mergePatchName +
"CutPointZone",
458 stitcher.instance() = oldInstance;
461 Info<<
nl <<
"Writing polyMesh to time " << runTime.name() <<
endl;
468 !runTime.objectRegistry::writeObject
470 runTime.writeFormat(),
472 runTime.writeCompression(),
478 <<
"Failed writing polyMesh."
Field reading functions for post-processing utilities.
#define forAll(list, i)
Loop across all elements in list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const word & name() const
Return name.
static const versionNumber currentVersion
Current version number.
static unsigned int defaultPrecision()
Return the default precision.
label findZoneID(const word &zoneName) const
Find zone index given a name.
void clearAddressing()
Clear addressing.
bool set(const label) const
Is element set.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
label size() const
Return the number of elements in the UPtrList.
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 addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
static void noParallel()
Remove the parallel options.
const Foam::HashTable< string > & options() const
Return options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
A subset of mesh faces organised as a primitive patch.
Hack of attachDetach to couple patches when they perfectly align. Does not decouple....
A subset of mesh points. The labels of points in the zone can be obtained from the addressing() list.
label findPatchID(const word &patchName) const
Find patch index given a name.
wordList names() const
Return a list of patch names.
Mesh consisting of general polyhedral cells.
const meshFaceZones & faceZones() const
Return face zones.
const fileName & pointsInstance() const
Return the current instance directory for points.
const meshPointZones & pointZones() const
Return point zones.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void setInstance(const fileName &)
Set the instance for mesh files.
const meshCellZones & cellZones() const
Return cell zones.
virtual void setPoints(const pointField &)
Reset the points.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
List of mesh modifiers defining the mesh dynamics.
virtual bool write(const bool write=true) const
Write using setting from DB.
Sliding interface mesh modifier. Given two face zones, couple the master and slave side using a cutti...
typeOfMatch
Type of match.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
const polyBoundaryMesh & bMesh
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
List< bool > boolList
Bool container classes.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
DynamicID< meshPointZones > pointZoneID
Foam::pointZoneID.
Foam::argList args(argc, argv)