OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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

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

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 55 of file boundaryMesh.H.


Constructor & Destructor Documentation

boundaryMesh (  ) 

Construct null.

Definition at line 425 of file boundaryMesh.C.

~boundaryMesh (  ) 

Definition at line 441 of file boundaryMesh.C.


Member Function Documentation

ClassName ( "boundaryMesh"   ) 

Runtime type information.

void clearOut (  ) 

Definition at line 447 of file boundaryMesh.C.

const bMesh& mesh (  )  const [inline]

Definition at line 213 of file boundaryMesh.H.

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

Here is the caller graph for this function:

const PtrList<boundaryPatch>& patches (  )  const [inline]

Definition at line 224 of file boundaryMesh.H.

const labelList& meshFace (  )  const [inline]

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

Definition at line 231 of file boundaryMesh.H.

const pointField& featurePoints (  )  const [inline]

Feature points.

Definition at line 237 of file boundaryMesh.H.

const edgeList& featureEdges (  )  const [inline]

Feature edges. Indices into featurePoints.

Definition at line 243 of file boundaryMesh.H.

const labelList& featureToEdge (  )  const [inline]

From index into featureEdge to index into meshedges,.

Definition at line 249 of file boundaryMesh.H.

const labelList& edgeToFeature (  )  const [inline]

From edge into featureEdges.

Definition at line 255 of file boundaryMesh.H.

const labelListList& featureSegments (  )  const [inline]

Lists of connected featureEdges. Indices into featureEdges.

Definition at line 261 of file boundaryMesh.H.

const labelList& extraEdges (  )  const [inline]

Indices into edges of additional edges.

Definition at line 267 of file boundaryMesh.H.

void read ( const polyMesh &  mesh  ) 

Read from boundaryMesh of polyMesh.

Definition at line 460 of file boundaryMesh.C.

void readTriSurface ( const fileName &  fName  ) 

Read from triSurface.

Definition at line 590 of file boundaryMesh.C.

void writeTriSurface ( const fileName &  fName  )  const

Write to file.

Definition at line 759 of file boundaryMesh.C.

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

Foam::label whichPatch ( const label  faceI  )  const

Get index of patch face is in.

Definition at line 1504 of file boundaryMesh.C.

Foam::label findPatchID ( const word &  patchName  )  const

Get index of patch by name.

Definition at line 1525 of file boundaryMesh.C.

Foam::wordList patchNames (  )  const

Get names of patches.

Definition at line 259 of file boundaryMesh.C.

void addPatch ( const word &  patchName  ) 

Add to back of patch list.

Definition at line 1539 of file boundaryMesh.C.

void deletePatch ( const word &  patchName  ) 

Delete from patch list.

Definition at line 1576 of file boundaryMesh.C.

void changePatchType ( const word &  patchName,
const word &  type 
)

Change patch.

Definition at line 1632 of file boundaryMesh.C.

void changeFaces ( const labelList &  patchIDs,
labelList &  oldToNew 
)

Recalculate face ordering and patches. Return old to new.

mapping.

Definition at line 1683 of file boundaryMesh.C.

void setFeatureEdges ( const scalar  minCos  ) 

Set featureEdges, edgeToFeature, featureSegments according.

to angle of faces across edge

Definition at line 1288 of file boundaryMesh.C.

void setExtraEdges ( const label  edgeI  ) 

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

to determine 'near'.

Definition at line 1489 of file boundaryMesh.C.

Foam::label getNTris ( const label  faceI  )  const

Simple triangulation of face subset. Returns number of triangles.

needed.

Definition at line 1801 of file boundaryMesh.C.

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

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

Here is the call graph for this function:

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

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

Number of points used in face subset.

Definition at line 1876 of file boundaryMesh.C.

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

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

Definition at line 1938 of file boundaryMesh.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd