75 label edgeI = pEdges[pEdgeI];
79 if (
e.otherVertex(v0) == v1)
86 <<
"Cannot find edge between mesh points " << v0 <<
" and " << v1
96 const label patchi =
bMesh.findPatchID(name);
101 <<
"Cannot find patch " <<
name <<
nl
102 <<
"It should be present but of zero size" <<
endl
103 <<
"Valid patches are " <<
bMesh.names()
107 if (
bMesh[patchi].size())
110 <<
"Patch " <<
name <<
" is present but non-zero size"
117int main(
int argc,
char *argv[])
121 "Splits mesh by making internal faces external at defined faceSet"
124 argList::noParallel();
125 argList::noFunctionObjects();
129 argList::addArgument(
"faceSet",
"The faces used for splitting");
130 argList::addArgument(
"master",
"The master patch name");
131 argList::addArgument(
"slave",
"The slave patch name");
137 const word oldInstance =
mesh.pointsInstance();
142 const bool overwrite =
args.
found(
"overwrite");
147 Info<<
"Read " << facesSet.size() <<
" faces to split" <<
endl <<
endl;
156 if (!
mesh.isInternalFace(faces[i]))
159 <<
"Face " << faces[i] <<
" in faceSet " << setName
160 <<
" is not an internal face."
190 const labelList& meshPoints = fPatch.meshPoints();
198 forAll(allEdgeFaces, patchEdgeI)
200 if (allEdgeFaces[patchEdgeI].size() == 1)
202 const edge&
e = fPatch.edges()[patchEdgeI];
208 meshPoints[
e.start()],
212 fenceEdges.insert(edgeI);
217 label startFacei = faces[0];
224 mesh.faceOwner()[startFacei],
233 zoneFlip[i] = !regionInfo.sideOwner().found(faces[i]);
252 Info<<
"Adding point and face zones" <<
endl;
253 mesh.addZones(pz, fz, cz);
275 Info<<
nl <<
"Constructed topologyModifier:" <<
endl;
276 splitter[0].writeDict(Info);
287 mesh.setInstance(oldInstance);
298 <<
"Failed writing polyMesh."
301 topoSet::removeFiles(
mesh);
302 processorMeshes::removeFiles(
mesh);
A list of faces which address into the list of points.
A List with indirect addressing. Like IndirectList but does not store addressing.
bool found(const word &optName) const
Return true if the named option is found.
Attach/detach boundary mesh modifier. This modifier takes a set of internal faces and converts them i...
This class is derived from polyMesh and serves as a tool for statically connecting pieces of a mesh b...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A subset of mesh faces organised as a primitive patch.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Cell-face mesh analysis engine.
Determines the 'side' for every face and connected to a singly-connected (through edges) region of fa...
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void checkPatch(const bool allGeometry, const word &name, const PatchType &pp, pointSet &points)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.