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"
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]);
238 List<pointZone*> pz(0);
239 List<faceZone*> fz(1);
240 List<cellZone*> cz(0);
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."
A List with indirect addressing. Like IndirectList but does not store addressing.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void noParallel()
Remove the parallel options.
static void addNote(const string ¬e)
Add extra notes for the usage information.
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 vertex labels. This can correspond to a directed graph edge or an edge on a ...
A subset of mesh faces organised as a primitive patch.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Cell-face mesh analysis engine.
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
Determines the 'side' for every face and connected to a singly-connected (through edges) region of fa...
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
messageStream Info
Information stream (stdout output on master, null elsewhere).
List< face > faceList
List of faces.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
A PrimitivePatch with List storage for the faces, const reference for the point field.
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
PrimitivePatch< List< face >, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points).
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
bool checkPatch(const bool allGeometry, const std::string &name, const polyMesh &mesh, const PatchType &pp, const labelUList &meshEdges, labelHashSet *pointSetPtr=nullptr, labelHashSet *badEdgesPtr=nullptr)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.