42 if (meshModPtr_.empty())
44 meshModPtr_.reset(
new polyTopoChange(mesh_));
52 Foam::repatchPolyTopoChanger::repatchPolyTopoChanger(
polyMesh&
mesh)
66 if (meshModPtr_.valid())
69 <<
"Cannot change patches after having changed faces. " <<
nl 70 <<
"Please call changePatches first." 85 if (polyTopoChanger::debug)
96 <<
" patchID: " << patchID <<
". " 97 <<
"Labels out of range or internal face." 104 bool zoneFlip =
false;
117 mesh_.
faces()[faceID],
138 if (polyTopoChanger::debug)
153 mesh_.
faces()[faceID],
173 if (polyTopoChanger::debug)
186 if ((fp < 0) || (fp >= f.
size()))
189 <<
"Error in definition. Face point: " << fp
190 <<
"indexes out of face " << f
198 bool zoneFlip =
false;
236 newFace[i] = f[fVert++];
238 if (fVert == f.
size())
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const faceZoneMesh & faceZones() const
Return face zone mesh.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Class describing modification of a face.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelList & faceNeighbour() const
Return face neighbour.
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)
Override size to be inconsistent with allocated storage.
const boolList & flipMap() const
Return face flip map.
void setFaceZone(const label faceID, const label zoneID, const bool zoneFlip)
Set zone ID for a face.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
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 repatch()
Re-patch the mesh.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
void changePatches(const List< polyPatch *> &patches)
Change patches.
errorManip< error > abort(error &err)
void addPatches(const List< polyPatch *> &, const bool validBoundary=true)
Add boundary patches.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void removeBoundary()
Remove boundary patches.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
label size() const
Return the number of elements in the UPtrList.
Direct mesh changes based on v1.3 polyTopoChange syntax.
Mesh consisting of general polyhedral cells.
A subset of mesh faces organised as a primitive patch.
autoPtr< mapPolyMesh > 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.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.