55 void mergeDuplicateBoundaryFaces
73 if (duplicates[bFacei] != -1)
76 label patchi = patches.whichPatch(facei);
78 if (isA<processorPolyPatch>(patches[patchi]))
81 <<
"Duplicate face " << facei
82 <<
" is on a processorPolyPatch." 83 <<
"This is not allowed." <<
nl 85 <<
" is on patch:" << patches[
patchi].name()
97 label otherFacei = duplicates[bFacei];
99 if (otherFacei != -1 && otherFacei > bFacei)
106 label own0 = faceOwner[face0];
107 label own1 = faceOwner[face1];
113 bool zoneFlip =
false;
117 const faceZone& fZone = faceZones[zoneID];
142 bool zoneFlip =
false;
146 const faceZone& fZone = faceZones[zoneID];
172 int main(
int argc,
char *argv[])
176 "Detect faces that share points (baffles)\n" 177 "and merge them into internal faces." 190 runTime.functionObjects().off();
201 if (fields)
Info<<
"Reading geometric fields" <<
nl <<
endl;
211 mergeDuplicateBoundaryFaces(mesh, meshMod);
225 if (map().hasMotionPoints())
235 Info<<
"Writing mesh to time " << runTime.timeName() <<
endl;
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Class containing data for face removal.
#define forAll(list, i)
Loop across all elements in list.
autoPtr< polyTopoChangeMap > changeMesh(polyMesh &mesh, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
List of IOobjects with searching and retrieving facilities.
Class describing modification of a face.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label nInternalFaces() const
const boolList & flipMap() const
Return face flip map.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
Field reading functions for post-processing utilities.
const fileName & pointsInstance() const
Return the current instance directory for points.
A class for handling words, derived from string.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
errorManip< error > abort(error &err)
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
void setInstance(const fileName &)
Set the instance for mesh files.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
const meshFaceZones & faceZones() const
Return face zones.
Direct mesh changes based on v1.3 polyTopoChange syntax.
static labelList findDuplicateFaces(const primitiveMesh &, const labelList &)
Helper routine to find baffles (two boundary faces using the.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
A subset of mesh faces organised as a primitive patch.
static void addNote(const string &)
Add extra notes for the usage information.
virtual bool write(const bool write=true) const
Write using setting from DB.
virtual void setPoints(const pointField &)
Reset the points.
Foam::argList args(argc, argv)
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.