Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes. More...
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes.
Definition at line 60 of file boundaryMesh.H.
Public Member Functions | |
ClassName ("boundaryMesh") | |
Runtime type information.
| |
boundaryMesh () | |
Construct null.
| |
~boundaryMesh () | |
void | clearOut () |
const bMesh & | mesh () const |
const PtrList< boundaryPatch > & | patches () const |
const labelList & | meshFace () const |
Label of original face in polyMesh (before patchify(...))
| |
const pointField & | featurePoints () const |
Feature points.
| |
const edgeList & | featureEdges () const |
Feature edges. Indices into featurePoints.
| |
const labelList & | featureToEdge () const |
From index into featureEdge to index into meshedges,.
| |
const labelList & | edgeToFeature () const |
From edge into featureEdges.
| |
const labelListList & | featureSegments () const |
Lists of connected featureEdges. Indices into featureEdges.
| |
const labelList & | extraEdges () const |
Indices into edges of additional edges.
| |
void | read (const polyMesh &) |
Read from boundaryMesh of polyMesh.
| |
void | readTriSurface (const fileName &) |
Read from triSurface.
| |
void | writeTriSurface (const fileName &) const |
Write to file.
| |
labelList | getNearest (const primitiveMesh &pMesh, const vector &searchSpan) const |
Get bMesh index of nearest face for every boundary face in.
| |
void | patchify (const labelList &nearest, const polyBoundaryMesh &oldPatches, polyMesh &newMesh) const |
Take over patches onto polyMesh from nearest face in *this.
| |
label | whichPatch (const label faceI) const |
Get index of patch face is in.
| |
label | findPatchID (const word &patchName) const |
Get index of patch by name.
| |
wordList | patchNames () const |
Get names of patches.
| |
void | addPatch (const word &patchName) |
Add to back of patch list.
| |
void | deletePatch (const word &patchName) |
Delete from patch list.
| |
void | changePatchType (const word &patchName, const word &type) |
Change patch.
| |
void | changeFaces (const labelList &patchIDs, labelList &oldToNew) |
Recalculate face ordering and patches. Return old to new.
| |
void | setFeatureEdges (const scalar minCos) |
Set featureEdges, edgeToFeature, featureSegments according.
| |
void | setExtraEdges (const label edgeI) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
| |
label | getNTris (const label faceI) const |
Simple triangulation of face subset. Returns number of triangles.
| |
label | getNTris (const label startFaceI, const label nFaces, labelList &nTris) const |
Simple triangulation of face subset. TotalNTris is total number.
| |
void | triangulate (const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts) const |
Simple triangulation of face subset. TotalNTris is total number.
| |
label | getNPoints (const label startFaceI, const label nFaces) const |
Number of points used in face subset.
| |
void | triangulateLocal (const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts, labelList &localToGlobal) const |
Same as triangulate but in local vertex numbering.
| |
void | markFaces (const labelList &protectedEdges, const label faceI, boolList &visited) const |
ClassName ("boundaryMesh") | |
Runtime type information.
| |
boundaryMesh () | |
Construct null.
| |
~boundaryMesh () | |
void | clearOut () |
const bMesh & | mesh () const |
const PtrList< boundaryPatch > & | patches () const |
const labelList & | meshFace () const |
Label of original face in polyMesh (before patchify(...))
| |
const pointField & | featurePoints () const |
Feature points.
| |
const edgeList & | featureEdges () const |
Feature edges. Indices into featurePoints.
| |
const labelList & | featureToEdge () const |
From index into featureEdge to index into meshedges,.
| |
const labelList & | edgeToFeature () const |
From edge into featureEdges.
| |
const labelListList & | featureSegments () const |
Lists of connected featureEdges. Indices into featureEdges.
| |
const labelList & | extraEdges () const |
Indices into edges of additional edges.
| |
void | read (const polyMesh &) |
Read from boundaryMesh of polyMesh.
| |
void | readTriSurface (const fileName &) |
Read from triSurface.
| |
void | writeTriSurface (const fileName &) const |
Write to file.
| |
labelList | getNearest (const primitiveMesh &pMesh, const vector &searchSpan) const |
Get bMesh index of nearest face for every boundary face in.
| |
void | patchify (const labelList &nearest, const polyBoundaryMesh &oldPatches, polyMesh &newMesh) const |
Take over patches onto polyMesh from nearest face in *this.
| |
label | whichPatch (const label faceI) const |
Get index of patch face is in.
| |
label | findPatchID (const word &patchName) const |
Get index of patch by name.
| |
wordList | patchNames () const |
Get names of patches.
| |
void | addPatch (const word &patchName) |
Add to back of patch list.
| |
void | deletePatch (const word &patchName) |
Delete from patch list.
| |
void | changePatchType (const word &patchName, const word &type) |
Change patch.
| |
void | changeFaces (const labelList &patchIDs, labelList &oldToNew) |
Recalculate face ordering and patches. Return old to new.
| |
void | setFeatureEdges (const scalar minCos) |
Set featureEdges, edgeToFeature, featureSegments according.
| |
void | setExtraEdges (const label edgeI) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
| |
label | getNTris (const label faceI) const |
Simple triangulation of face subset. Returns number of triangles.
| |
label | getNTris (const label startFaceI, const label nFaces, labelList &nTris) const |
Simple triangulation of face subset. TotalNTris is total number.
| |
void | triangulate (const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts) const |
Simple triangulation of face subset. TotalNTris is total number.
| |
label | getNPoints (const label startFaceI, const label nFaces) const |
Number of points used in face subset.
| |
void | triangulateLocal (const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts, labelList &localToGlobal) const |
Same as triangulate but in local vertex numbering.
| |
void | markFaces (const labelList &protectedEdges, const label faceI, boolList &visited) const |
boundaryMesh | ( | ) |
Construct null.
Definition at line 433 of file boundaryMesh.C.
~boundaryMesh | ( | ) |
Definition at line 449 of file boundaryMesh.C.
boundaryMesh | ( | ) |
Construct null.
~boundaryMesh | ( | ) |
ClassName | ( | "boundaryMesh" | ) |
Runtime type information.
void clearOut | ( | ) |
Definition at line 455 of file boundaryMesh.C.
const bMesh& mesh | ( | ) | const [inline]
|
Definition at line 204 of file boundaryMesh.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
Referenced by fvPatch::lookupPatchField().
const PtrList<boundaryPatch>& patches | ( | ) | const [inline]
|
Definition at line 215 of file boundaryMesh.H.
const labelList& meshFace | ( | ) | const [inline]
|
Label of original face in polyMesh (before patchify(...))
Definition at line 222 of file boundaryMesh.H.
const pointField& featurePoints | ( | ) | const [inline]
|
Feature points.
Definition at line 228 of file boundaryMesh.H.
const edgeList& featureEdges | ( | ) | const [inline]
|
Feature edges. Indices into featurePoints.
Definition at line 234 of file boundaryMesh.H.
const labelList& featureToEdge | ( | ) | const [inline]
|
From index into featureEdge to index into meshedges,.
Definition at line 240 of file boundaryMesh.H.
const labelList& edgeToFeature | ( | ) | const [inline]
|
From edge into featureEdges.
Definition at line 246 of file boundaryMesh.H.
const labelListList& featureSegments | ( | ) | const [inline]
|
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 252 of file boundaryMesh.H.
const labelList& extraEdges | ( | ) | const [inline]
|
Indices into edges of additional edges.
Definition at line 258 of file boundaryMesh.H.
void read | ( | const polyMesh & | mesh ) |
Read from boundaryMesh of polyMesh.
Definition at line 468 of file boundaryMesh.C.
References polyMesh::boundaryMesh(), Foam::endl(), f(), forAll, patchIdentifier::name(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchIdentifier::physicalType(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), polyMesh::points(), Foam::Pout, PtrList< T >::set(), List< T >::size(), boundaryPatch::size(), PtrList< T >::size(), boundaryPatch::start(), polyPatch::start(), and Vector< Cmpt >::zero.
void readTriSurface | ( | const fileName & | fName ) |
Read from triSurface.
Definition at line 598 of file boundaryMesh.C.
References List< T >::clear(), UList< T >::empty(), Foam::endl(), forAll, geometricSurfacePatch::geometricType(), HashTable< T, Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), OSstream::name(), Foam::name(), geometricSurfacePatch::name(), triSurface::patches(), Foam::Pout, labelledTri::region(), List< T >::setSize(), boundaryPatch::size(), HashTable< T, Key, Hash >::size(), List< T >::size(), and boundaryPatch::start().
void writeTriSurface | ( | const fileName & | fName ) | const |
Write to file.
Definition at line 767 of file boundaryMesh.C.
References forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), points, boundaryPatch::start(), v1, and v2.
Foam::labelList getNearest | ( | const primitiveMesh & | pMesh, |
const vector & | searchSpan | ||
) | const |
Get bMesh index of nearest face for every boundary face in.
pMesh. Gets passed initial search box. If not found returns -1 for the face.
Definition at line 857 of file boundaryMesh.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), boundBox::avgDim(), E(), Foam::endl(), f(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), primitiveMesh::faces(), octree< Type >::findNearest(), forAll, Foam::mag(), Vector< Cmpt >::max, Foam::max(), boundBox::max(), mesh, boundBox::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), primitiveMesh::points(), Foam::Pout, DynamicList< T, SizeInc, SizeMult, SizeDiv >::shrink(), Foam::sign(), List< T >::size(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
void patchify | ( | const labelList & | nearest, |
const polyBoundaryMesh & | oldPatches, | ||
polyMesh & | newMesh | ||
) | const |
Take over patches onto polyMesh from nearest face in *this.
(from call to getNearest). Insert as -new set of patches (newMesh.addPatches) -topoChanges to change faces. nearest is list of nearest face in *this for every boundary face. oldPatches is list of existing patches in mesh. newMesh is the mesh to which the new patches are added. (so has to be constructed without patches).
Definition at line 1090 of file boundaryMesh.C.
References List< T >::append(), polyMesh::boundaryMesh(), repatchPolyTopoChanger::changePatches(), repatchPolyTopoChanger::changePatchID(), polyPatch::clone(), Foam::endl(), forAll, patchIdentifier::name(), polyPatch::New(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), pFaces, patchIdentifier::physicalType(), Foam::Pout, repatchPolyTopoChanger::repatch(), List< T >::size(), HashTable< T, Key, Hash >::size(), and polyPatch::start().
Foam::label whichPatch | ( | const label | faceI ) | const |
Get index of patch face is in.
Definition at line 1512 of file boundaryMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, boundaryPatch::size(), and boundaryPatch::start().
Foam::label findPatchID | ( | const word & | patchName ) | const |
Get index of patch by name.
Definition at line 1533 of file boundaryMesh.C.
References forAll, and Foam::name().
Foam::wordList patchNames | ( | ) | const |
void addPatch | ( | const word & | patchName ) |
Add to back of patch list.
Definition at line 1547 of file boundaryMesh.C.
References Foam::endl(), forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), Foam::Pout, boundaryPatch::size(), and boundaryPatch::start().
void deletePatch | ( | const word & | patchName ) |
Delete from patch list.
Definition at line 1584 of file boundaryMesh.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, patchIdentifier::name(), patchIdentifier::physicalType(), Foam::Pout, PtrList< T >::set(), boundaryPatch::size(), and boundaryPatch::start().
Change patch.
Definition at line 1640 of file boundaryMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, patchIdentifier::index(), patchIdentifier::name(), boundaryPatch::size(), and boundaryPatch::start().
Recalculate face ordering and patches. Return old to new.
mapping.
Definition at line 1691 of file boundaryMesh.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, mesh, patchIdentifier::name(), patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), boundaryPatch::size(), HashTable< T, Key, Hash >::size(), List< T >::size(), and boundaryPatch::start().
void setFeatureEdges | ( | const scalar | minCos ) |
Set featureEdges, edgeToFeature, featureSegments according.
to angle of faces across edge
Definition at line 1296 of file boundaryMesh.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), primitiveMesh::edgeFaces(), primitiveMesh::edges(), edge::end(), forAll, mesh, nPoints, polyMesh::points(), List< T >::size(), and edge::start().
void setExtraEdges | ( | const label | edgeI ) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
to determine 'near'.
Definition at line 1497 of file boundaryMesh.C.
References mesh.
Foam::label getNTris | ( | const label | faceI ) | const |
Simple triangulation of face subset. Returns number of triangles.
needed.
Definition at line 1809 of file boundaryMesh.C.
References f(), mesh, face::nTriangles(), and points.
Foam::label getNTris | ( | const label | startFaceI, |
const label | nFaces, | ||
labelList & | nTris | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles, nTris is per face number of triangles.
Definition at line 1818 of file boundaryMesh.C.
References List< T >::setSize().
void triangulate | ( | const label | startFaceI, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles (from call to getNTris) triVerts is triangle vertices, three per triangle.
Definition at line 1843 of file boundaryMesh.C.
References f(), forAll, mesh, face::nTriangles(), points, List< T >::setSize(), and face::triangles().
Foam::label getNPoints | ( | const label | startFaceI, |
const label | nFaces | ||
) | const |
Number of points used in face subset.
Definition at line 1884 of file boundaryMesh.C.
References mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), and points.
void triangulateLocal | ( | const label | startFaceI, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts, | ||
labelList & | localToGlobal | ||
) | const |
Same as triangulate but in local vertex numbering.
(Map returned).
Definition at line 1899 of file boundaryMesh.C.
References f(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::localPoints(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), face::nTriangles(), points, List< T >::setSize(), and face::triangles().
Definition at line 1946 of file boundaryMesh.C.
References forAll, mesh, and List< T >::setSize().
ClassName | ( | "boundaryMesh" | ) |
Runtime type information.
void clearOut | ( | ) |
const bMesh& mesh | ( | ) | const [inline]
|
Definition at line 204 of file boundaryMesh.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
const PtrList<boundaryPatch>& patches | ( | ) | const [inline]
|
Definition at line 215 of file boundaryMesh.H.
const labelList& meshFace | ( | ) | const [inline]
|
Label of original face in polyMesh (before patchify(...))
Definition at line 222 of file boundaryMesh.H.
const pointField& featurePoints | ( | ) | const [inline]
|
Feature points.
Definition at line 228 of file boundaryMesh.H.
const edgeList& featureEdges | ( | ) | const [inline]
|
Feature edges. Indices into featurePoints.
Definition at line 234 of file boundaryMesh.H.
const labelList& featureToEdge | ( | ) | const [inline]
|
From index into featureEdge to index into meshedges,.
Definition at line 240 of file boundaryMesh.H.
const labelList& edgeToFeature | ( | ) | const [inline]
|
From edge into featureEdges.
Definition at line 246 of file boundaryMesh.H.
const labelListList& featureSegments | ( | ) | const [inline]
|
Lists of connected featureEdges. Indices into featureEdges.
Definition at line 252 of file boundaryMesh.H.
const labelList& extraEdges | ( | ) | const [inline]
|
Indices into edges of additional edges.
Definition at line 258 of file boundaryMesh.H.
void read | ( | const polyMesh & | ) |
Read from boundaryMesh of polyMesh.
void readTriSurface | ( | const fileName & | ) |
Read from triSurface.
void writeTriSurface | ( | const fileName & | ) | const |
Write to file.
labelList getNearest | ( | const primitiveMesh & | pMesh, |
const vector & | searchSpan | ||
) | const |
Get bMesh index of nearest face for every boundary face in.
pMesh. Gets passed initial search box. If not found returns -1 for the face.
void patchify | ( | const labelList & | nearest, |
const polyBoundaryMesh & | oldPatches, | ||
polyMesh & | newMesh | ||
) | const |
Take over patches onto polyMesh from nearest face in *this.
(from call to getNearest). Insert as -new set of patches (newMesh.addPatches) -topoChanges to change faces. nearest is list of nearest face in *this for every boundary face. oldPatches is list of existing patches in mesh. newMesh is the mesh to which the new patches are added. (so has to be constructed without patches).
label whichPatch | ( | const label | faceI ) | const |
Get index of patch face is in.
label findPatchID | ( | const word & | patchName ) | const |
Get index of patch by name.
wordList patchNames | ( | ) | const |
Get names of patches.
void addPatch | ( | const word & | patchName ) |
Add to back of patch list.
void deletePatch | ( | const word & | patchName ) |
Delete from patch list.
Recalculate face ordering and patches. Return old to new.
mapping.
void setFeatureEdges | ( | const scalar | minCos ) |
Set featureEdges, edgeToFeature, featureSegments according.
to angle of faces across edge
void setExtraEdges | ( | const label | edgeI ) |
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
to determine 'near'.
label getNTris | ( | const label | faceI ) | const |
Simple triangulation of face subset. Returns number of triangles.
needed.
label getNTris | ( | const label | startFaceI, |
const label | nFaces, | ||
labelList & | nTris | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles, nTris is per face number of triangles.
void triangulate | ( | const label | startFaceI, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts | ||
) | const |
Simple triangulation of face subset. TotalNTris is total number.
of triangles (from call to getNTris) triVerts is triangle vertices, three per triangle.
label getNPoints | ( | const label | startFaceI, |
const label | nFaces | ||
) | const |
Number of points used in face subset.
void triangulateLocal | ( | const label | startFaceI, |
const label | nFaces, | ||
const label | totalNTris, | ||
labelList & | triVerts, | ||
labelList & | localToGlobal | ||
) | const |
Same as triangulate but in local vertex numbering.
(Map returned).