boundaryMesh Class Reference

Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes. More...

Public Member Functions

 ClassName ("boundaryMesh")
 Runtime type information. More...
 
 boundaryMesh ()
 Construct null. More...
 
 boundaryMesh (const boundaryMesh &)=delete
 Disallow default bitwise copy construction. More...
 
 ~boundaryMesh ()
 Destructor. More...
 
void clearOut ()
 
const bMeshmesh () const
 
const PtrList< boundaryPatch > & patches () const
 
const labelListmeshFace () const
 Label of original face in polyMesh (before patchify(...)) More...
 
const pointFieldfeaturePoints () const
 Feature points. More...
 
const edgeListfeatureEdges () const
 Feature edges. Indices into featurePoints. More...
 
const labelListfeatureToEdge () const
 From index into featureEdge to index into meshedges,. More...
 
const labelListedgeToFeature () const
 From edge into featureEdges. More...
 
const labelListListfeatureSegments () const
 Lists of connected featureEdges. Indices into featureEdges. More...
 
const labelListextraEdges () const
 Indices into edges of additional edges. More...
 
void read (const polyMesh &)
 Read from boundaryMesh of polyMesh. More...
 
void readTriSurface (const fileName &)
 Read from triSurface. More...
 
void writeTriSurface (const fileName &) const
 Write to file. More...
 
labelList getNearest (const primitiveMesh &pMesh, const vector &searchSpan) const
 Get bMesh index of nearest face for every boundary face in. More...
 
void patchify (const labelList &nearest, const polyBoundaryMesh &oldPatches, polyMesh &newMesh) const
 Take over patches onto polyMesh from nearest face in *this. More...
 
label whichPatch (const label facei) const
 Get index of patch face is in. More...
 
label findPatchID (const word &patchName) const
 Get index of patch by name. More...
 
wordList patchNames () const
 Get names of patches. More...
 
void addPatch (const word &patchName)
 Add to back of patch list. More...
 
void deletePatch (const word &patchName)
 Delete from patch list. More...
 
void changePatchType (const word &patchName, const word &type)
 Change patch. More...
 
void changeFaces (const labelList &patchIDs, labelList &oldToNew)
 Recalculate face ordering and patches. Return old to new. More...
 
void setFeatureEdges (const scalar minCos)
 Set featureEdges, edgeToFeature, featureSegments according. More...
 
void setExtraEdges (const label edgeI)
 Set extraEdges to edges 'near' to edgeI. Uses point-edge walk. More...
 
label getNTris (const label facei) const
 Simple triangulation of face subset. Returns number of triangles. More...
 
label getNTris (const label startFacei, const label nFaces, labelList &nTris) const
 Simple triangulation of face subset. TotalNTris is total number. More...
 
void triangulate (const label startFacei, const label nFaces, const label totalNTris, labelList &triVerts) const
 Simple triangulation of face subset. TotalNTris is total number. More...
 
label getNPoints (const label startFacei, const label nFaces) const
 Number of points used in face subset. More...
 
void triangulateLocal (const label startFacei, const label nFaces, const label totalNTris, labelList &triVerts, labelList &localToGlobal) const
 Same as triangulate but in local vertex numbering. More...
 
void markFaces (const labelList &protectedEdges, const label facei, boolList &visited) const
 
void operator= (const boundaryMesh &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface. Used for repatching existing meshes.

Source files

Definition at line 59 of file boundaryMesh.H.

Constructor & Destructor Documentation

◆ boundaryMesh() [1/2]

Construct null.

Definition at line 437 of file boundaryMesh.C.

◆ boundaryMesh() [2/2]

boundaryMesh ( const boundaryMesh )
delete

Disallow default bitwise copy construction.

◆ ~boundaryMesh()

Destructor.

Definition at line 453 of file boundaryMesh.C.

References boundaryMesh::clearOut().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "boundaryMesh"  )

Runtime type information.

◆ clearOut()

void clearOut ( )

Definition at line 459 of file boundaryMesh.C.

Referenced by boundaryMesh::changeFaces(), boundaryMesh::read(), boundaryMesh::readTriSurface(), and boundaryMesh::~boundaryMesh().

Here is the caller graph for this function:

◆ mesh()

◆ patches()

const PtrList<boundaryPatch>& patches ( ) const
inline

Definition at line 210 of file boundaryMesh.H.

◆ meshFace()

const labelList& meshFace ( ) const
inline

Label of original face in polyMesh (before patchify(...))

Definition at line 217 of file boundaryMesh.H.

◆ featurePoints()

const pointField& featurePoints ( ) const
inline

Feature points.

Definition at line 223 of file boundaryMesh.H.

◆ featureEdges()

const edgeList& featureEdges ( ) const
inline

Feature edges. Indices into featurePoints.

Definition at line 229 of file boundaryMesh.H.

◆ featureToEdge()

const labelList& featureToEdge ( ) const
inline

From index into featureEdge to index into meshedges,.

Definition at line 235 of file boundaryMesh.H.

◆ edgeToFeature()

const labelList& edgeToFeature ( ) const
inline

From edge into featureEdges.

Definition at line 241 of file boundaryMesh.H.

◆ featureSegments()

const labelListList& featureSegments ( ) const
inline

Lists of connected featureEdges. Indices into featureEdges.

Definition at line 247 of file boundaryMesh.H.

◆ extraEdges()

◆ read()

◆ readTriSurface()

◆ writeTriSurface()

void writeTriSurface ( const fileName fName) const

Write to file.

Definition at line 771 of file boundaryMesh.C.

References forAll, boundaryMesh::getNearest(), boundaryMesh::getNTris(), boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), points, boundaryPatch::start(), and boundaryMesh::triangulate().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNearest()

◆ patchify()

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 1116 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(), patchi, pFaces, patchIdentifier::physicalType(), Foam::Pout, repatchPolyTopoChanger::repatch(), List< T >::size(), and polyPatch::start().

Referenced by boundaryMesh::extraEdges(), and boundaryMesh::getNearest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ whichPatch()

Foam::label whichPatch ( const label  facei) const

Get index of patch face is in.

Definition at line 1535 of file boundaryMesh.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, patchi, boundaryPatch::size(), and boundaryPatch::start().

Here is the call graph for this function:

◆ findPatchID()

Foam::label findPatchID ( const word patchName) const

Get index of patch by name.

Definition at line 1556 of file boundaryMesh.C.

References forAll, Foam::name(), and patchi.

Here is the call graph for this function:

◆ patchNames()

Foam::wordList patchNames ( ) const

Get names of patches.

Definition at line 271 of file boundaryMesh.C.

References primitiveMesh::edgeFaces(), UList< T >::empty(), Foam::endl(), primitiveMesh::faceEdges(), forAll, mesh, patchi, Foam::Pout, List< T >::setSize(), List< T >::size(), and polyPatch::start().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addPatch()

void addPatch ( const word patchName)

Add to back of patch list.

Definition at line 1570 of file boundaryMesh.C.

References Foam::endl(), forAll, boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, boundaryPatch::size(), and boundaryPatch::start().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deletePatch()

void deletePatch ( const word patchName)

Delete from patch list.

Definition at line 1607 of file boundaryMesh.C.

References Foam::abort(), boundaryMesh::changePatchType(), Foam::clone(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::name(), patchi, patchIdentifier::physicalType(), Foam::Pout, PtrList< T >::set(), boundaryPatch::size(), and boundaryPatch::start().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changePatchType()

void changePatchType ( const word patchName,
const word type 
)

Change patch.

Definition at line 1663 of file boundaryMesh.C.

References Foam::abort(), boundaryMesh::changeFaces(), Foam::clone(), Foam::FatalError, FatalErrorInFunction, forAll, patchIdentifier::index(), patchIdentifier::name(), patchi, boundaryPatch::size(), and boundaryPatch::start().

Referenced by boundaryMesh::deletePatch(), and boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeFaces()

void changeFaces ( const labelList patchIDs,
labelList oldToNew 
)

Recalculate face ordering and patches. Return old to new.

mapping.

Definition at line 1714 of file boundaryMesh.C.

References Foam::abort(), boundaryMesh::clearOut(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, boundaryMesh::mesh(), patchIdentifier::name(), patchi, patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), boundaryPatch::size(), List< T >::size(), boundaryPatch::start(), and List< T >::transfer().

Referenced by boundaryMesh::changePatchType(), and boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFeatureEdges()

void setFeatureEdges ( const scalar  minCos)

Set featureEdges, edgeToFeature, featureSegments according.

to angle of faces across edge

Definition at line 1319 of file boundaryMesh.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), PrimitivePatch< FaceList, PointField >::edgeFaces(), PrimitivePatch< FaceList, PointField >::edges(), edge::end(), PrimitivePatch< FaceList, PointField >::faceNormals(), forAll, boundaryMesh::mesh(), nPoints, PrimitivePatch< FaceList, PointField >::points(), List< T >::setSize(), List< T >::size(), and edge::start().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setExtraEdges()

void setExtraEdges ( const label  edgeI)

Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.

to determine 'near'.

Definition at line 1520 of file boundaryMesh.C.

References boundaryMesh::mesh(), and List< T >::transfer().

Referenced by boundaryMesh::extraEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNTris() [1/2]

Foam::label getNTris ( const label  facei) const

Simple triangulation of face subset. Returns number of triangles.

needed.

Definition at line 1832 of file boundaryMesh.C.

References f(), boundaryMesh::mesh(), face::nTriangles(), and points.

Referenced by boundaryMesh::extraEdges(), boundaryMesh::getNTris(), and boundaryMesh::writeTriSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNTris() [2/2]

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 1841 of file boundaryMesh.C.

References boundaryMesh::getNTris(), List< T >::setSize(), and boundaryMesh::triangulate().

Here is the call graph for this function:

◆ triangulate()

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 1866 of file boundaryMesh.C.

References f(), forAll, boundaryMesh::getNPoints(), boundaryMesh::mesh(), face::nTriangles(), points, List< T >::setSize(), and face::triangles().

Referenced by boundaryMesh::extraEdges(), boundaryMesh::getNTris(), and boundaryMesh::writeTriSurface().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNPoints()

Foam::label getNPoints ( const label  startFacei,
const label  nFaces 
) const

Number of points used in face subset.

Definition at line 1907 of file boundaryMesh.C.

References boundaryMesh::mesh(), PrimitivePatch< FaceList, PointField >::nPoints(), points, and boundaryMesh::triangulateLocal().

Referenced by boundaryMesh::extraEdges(), and boundaryMesh::triangulate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triangulateLocal()

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 1922 of file boundaryMesh.C.

References f(), forAll, PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), boundaryMesh::markFaces(), boundaryMesh::mesh(), PrimitivePatch< FaceList, PointField >::meshPoints(), face::nTriangles(), points, List< T >::setSize(), and face::triangles().

Referenced by boundaryMesh::extraEdges(), and boundaryMesh::getNPoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ markFaces()

void markFaces ( const labelList protectedEdges,
const label  facei,
boolList visited 
) const

Definition at line 1969 of file boundaryMesh.C.

References forAll, boundaryMesh::mesh(), and List< T >::setSize().

Referenced by boundaryMesh::extraEdges(), and boundaryMesh::triangulateLocal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const boundaryMesh )
delete

Disallow default bitwise assignment.

Referenced by boundaryMesh::extraEdges().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: