Go to the documentation of this file.
66 if (meshModPtr_.valid())
69 <<
"Cannot change patches after having changed faces. " <<
nl
70 <<
"Please call changePatches first."
74 mesh_.removeBoundary();
85 if (polyTopoChanger::debug)
90 faceID >= mesh_.faces().size()
91 || patchID >= mesh_.boundaryMesh().size()
92 || mesh_.isInternalFace(faceID)
96 <<
" patchID: " << patchID <<
". "
97 <<
"Labels out of range or internal face."
102 const label zoneID = mesh_.faceZones().whichZone(faceID);
104 bool zoneFlip =
false;
108 const faceZone& fZone = mesh_.faceZones()[zoneID];
117 mesh_.faces()[faceID],
119 mesh_.faceOwner()[faceID],
138 if (polyTopoChanger::debug)
141 if (faceID > mesh_.faces().size())
153 mesh_.faces()[faceID],
155 mesh_.faceOwner()[faceID],
156 mesh_.faceNeighbour()[faceID],
158 mesh_.boundaryMesh().whichPatch(faceID),
173 if (polyTopoChanger::debug)
176 if (faceID > mesh_.faces().size())
184 const face&
f = mesh_.faces()[faceID];
186 if ((fp < 0) || (fp >=
f.
size()))
189 <<
"Error in definition. Face point: " << fp
190 <<
"indexes out of face " <<
f
194 label patchID = mesh_.boundaryMesh().whichPatch(faceID);
196 const label zoneID = mesh_.faceZones().whichZone(faceID);
198 bool zoneFlip =
false;
202 const faceZone& fZone = mesh_.faceZones()[zoneID];
216 mesh_.faceOwner()[faceID],
236 newFace[i] =
f[fVert++];
238 if (fVert ==
f.
size())
251 mesh_.faceOwner()[faceID],
267 meshMod().changeMesh(mesh_,
false);
void changeAnchorPoint(const label faceID, const label fp)
Change anchor point (zero'th point of face) for a boundary face.
void setFaceZone(const label faceID, const label zoneID, const bool zoneFlip)
Set zone ID for a face.
autoPtr< polyTopoChange > meshModPtr_
Topological change to accumulated all mesh changes.
#define forAll(list, i)
Loop across all elements in list.
Direct mesh changes based on v1.3 polyTopoChange syntax.
Class describing modification of a face.
Mesh consisting of general polyhedral cells.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A subset of mesh faces organised as a primitive patch.
repatchPolyTopoChanger(const repatchPolyTopoChanger &)
Disallow default bitwise copy construct.
void changePatches(const List< polyPatch * > &patches)
Change patches.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
polyTopoChange & meshMod()
Demand driven access to polyTopoChange.
polyMesh & mesh_
The polyMesh to be repatched.
A face is a list of labels corresponding to mesh vertices.
void repatch()
Re-patch the mesh.
void size(const label)
Override size to be inconsistent with allocated storage.
void changePatchID(const label faceID, const label patchID)
Change patch ID for a boundary face. Note: patchID should be in new.
const boolList & flipMap() const
Return face flip map.