44 meshModPtr_.reset(
new polyTopoChange(mesh_));
52 Foam::repatchPolyTopoChanger::repatchPolyTopoChanger(polyMesh&
mesh)
69 <<
"Cannot change patches after having changed faces. " <<
nl 70 <<
"Please call changePatches first." 73 meshModPtr_.reset(
nullptr);
74 mesh_.removeBoundary();
102 faceID >= mesh_.faces().size()
103 ||
patchID >= mesh_.boundaryMesh().size()
104 || mesh_.isInternalFace(faceID)
108 <<
" patchID: " <<
patchID <<
". " 109 <<
"Labels out of range or internal face." 114 const label zoneID = mesh_.faceZones().whichZone(faceID);
116 bool zoneFlip =
false;
120 const faceZone& fZone = mesh_.faceZones()[zoneID];
122 zoneFlip = fZone.flipMap()[fZone.whichFace(faceID)];
129 mesh_.faces()[faceID],
131 mesh_.faceOwner()[faceID],
153 if (faceID > mesh_.faces().size())
165 mesh_.faces()[faceID],
167 mesh_.faceOwner()[faceID],
168 mesh_.faceNeighbour()[faceID],
170 mesh_.boundaryMesh().whichPatch(faceID),
188 if (faceID > mesh_.faces().size())
196 const face&
f = mesh_.faces()[faceID];
198 if ((fp < 0) || (fp >=
f.
size()))
201 <<
"Error in definition. Face point: " << fp
202 <<
"indexes out of face " <<
f 206 label
patchID = mesh_.boundaryMesh().whichPatch(faceID);
208 const label zoneID = mesh_.faceZones().whichZone(faceID);
210 bool zoneFlip =
false;
214 const faceZone& fZone = mesh_.faceZones()[zoneID];
216 zoneFlip = fZone.flipMap()[fZone.whichFace(faceID)];
228 mesh_.faceOwner()[faceID],
242 face newFace(
f.
size());
248 newFace[i] =
f[fVert++];
250 if (fVert ==
f.
size())
263 mesh_.faceOwner()[faceID],
279 meshMod().changeMesh(mesh_,
false);
282 meshModPtr_.reset(
nullptr);
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#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...
constexpr char nl
The newline '\n' character (0x0a)
void setFaceZone(const label faceID, const label zoneID, const bool zoneFlip)
Set zone ID for a face.
#define forAll(list, i)
Loop across all elements in list.
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 numbering.
void repatch()
Re-patch the mesh.
void changePatches(polyPatchList &patches)
Change patches.
errorManip< error > abort(error &err)
int debug
Static debugging option.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Direct mesh changes based on v1.3 polyTopoChange syntax.
const polyBoundaryMesh & patches