FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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...


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

Source files

Definition at line 60 of file boundaryMesh.H.

Collaboration diagram for boundaryMesh:

List of all members.

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

Constructor & Destructor Documentation

boundaryMesh (  )

Construct null.

Definition at line 433 of file boundaryMesh.C.

~boundaryMesh (  )

Definition at line 449 of file boundaryMesh.C.

boundaryMesh (  )

Construct null.

~boundaryMesh (  )

Member Function Documentation

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 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.

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

Get names of patches.

Definition at line 267 of file boundaryMesh.C.

References forAll.

void addPatch ( const word &   patchName  )
void changePatchType ( const word &   patchName,
const word &   type  
)
void changeFaces ( const labelList &   patchIDs,
labelList &   oldToNew  
)
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
void markFaces ( const labelList &   protectedEdges,
const label   faceI,
boolList &   visited  
) const

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.

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.

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).

void markFaces ( const labelList &   protectedEdges,
const label   faceI,
boolList &   visited  
) const

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