44 meshModPtr_.reset(
new polyTopoChange(mesh_));
69 <<
"Cannot change patches after having changed faces. " <<
nl
70 <<
"Please call changePatches first."
73 meshModPtr_.reset(
nullptr);
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;
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;
216 mesh_.faceOwner()[faceID],
236 newFace[i] =
f[fVert++];
238 if (fVert ==
f.
size())
251 mesh_.faceOwner()[faceID],
267 meshMod().changeMesh(mesh_,
false);
270 meshModPtr_.reset(
nullptr);
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label n)
Older name for setAddressableSize.
A subset of mesh faces organised as a primitive patch.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
const boolList & flipMap() const noexcept
Return face flip map.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
Class describing modification of a face.
Direct mesh changes based on v1.3 polyTopoChange syntax.
A mesh which allows changes in the patch distribution of the boundary faces. The change in patching i...
void changeAnchorPoint(const label faceID, const label fp)
Change anchor point (zero'th point of face) for a boundary face.
void changePatchID(const label faceID, const label patchID)
Change patch ID for a boundary face. Note: patchID should be in new.
void changePatches(const List< polyPatch * > &patches)
Change patches.
void repatch()
Re-patch the mesh.
void setFaceZone(const label faceID, const label zoneID, const bool zoneFlip)
Set zone ID for a face.
const polyBoundaryMesh & patches
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelIOList & zoneID
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.