40 if (meshModPtr_.empty())
42 meshModPtr_.reset(
new polyTopoChange(mesh_));
70 if (meshModPtr_.valid())
73 <<
"Cannot change patches after faces have changed"
77 mesh_.removeBoundary();
88 if (polyTopoChange::debug)
93 faceID >= mesh_.faces().size()
94 || patchID >= mesh_.boundaryMesh().size()
95 || mesh_.isInternalFace(faceID)
99 <<
" patchID: " << patchID <<
". "
100 <<
"Labels out of range or internal face."
107 mesh_.faces()[faceID],
109 mesh_.faceOwner()[faceID],
123 if (polyTopoChange::debug)
126 if (faceID > mesh_.faces().size())
134 const face&
f = mesh_.faces()[faceID];
136 if ((fp < 0) || (fp >=
f.
size()))
139 <<
"Error in definition. Face point: " << fp
140 <<
"indexes out of face " <<
f
144 label patchID = mesh_.boundaryMesh().whichPatch(faceID);
153 mesh_.faceOwner()[faceID],
169 newFace[i] =
f[fVert++];
171 if (fVert ==
f.
size())
181 mesh_.faceOwner()[faceID],
193 meshMod().changeMesh(mesh_);
#define forAll(list, i)
Loop across all elements in list.
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.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
Direct mesh changes based on v1.3 polyTopoChange syntax.
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.
virtual ~repatcher()
Destructor.
void repatch()
Re-patch the mesh.
repatcher(polyMesh &mesh)
Construct for given mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)