Public Member Functions | List of all members
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 ()
 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
 

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

Construct null.

Definition at line 437 of file boundaryMesh.C.

Destructor.

Definition at line 453 of file boundaryMesh.C.

References boundaryMesh::clearOut().

Here is the call graph for this function:

Member Function Documentation

ClassName ( "boundaryMesh"  )

Runtime type information.

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:

const bMesh& mesh ( ) const
inline
const PtrList<boundaryPatch>& patches ( ) const
inline

Definition at line 213 of file boundaryMesh.H.

const labelList& meshFace ( ) const
inline

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

Definition at line 220 of file boundaryMesh.H.

const pointField& featurePoints ( ) const
inline

Feature points.

Definition at line 226 of file boundaryMesh.H.

const edgeList& featureEdges ( ) const
inline

Feature edges. Indices into featurePoints.

Definition at line 232 of file boundaryMesh.H.

const labelList& featureToEdge ( ) const
inline

From index into featureEdge to index into meshedges,.

Definition at line 238 of file boundaryMesh.H.

const labelList& edgeToFeature ( ) const
inline

From edge into featureEdges.

Definition at line 244 of file boundaryMesh.H.

const labelListList& featureSegments ( ) const
inline

Lists of connected featureEdges. Indices into featureEdges.

Definition at line 250 of file boundaryMesh.H.

const labelList& extraEdges ( ) const
inline
void read ( const polyMesh mesh)
void readTriSurface ( const fileName fName)
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(), 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:

Foam::labelList getNearest ( const primitiveMesh pMesh,
const vector searchSpan 
) const
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(), 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:

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, FatalErrorIn, forAll, boundaryPatch::size(), and boundaryPatch::start().

Here is the call graph for this function:

Foam::label findPatchID ( const word patchName) const

Get index of patch by name.

Definition at line 1556 of file boundaryMesh.C.

References forAll, and Foam::name().

Here is the call graph for this function:

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, 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:

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(), 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:

void deletePatch ( const word patchName)

Delete from patch list.

Definition at line 1607 of file boundaryMesh.C.

References Foam::abort(), boundaryMesh::changePatchType(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, patchIdentifier::name(), 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:

void changePatchType ( const word patchName,
const word type 
)

Change patch.

Definition at line 1663 of file boundaryMesh.C.

References Foam::abort(), boundaryMesh::changeFaces(), Foam::FatalError, FatalErrorIn, forAll, patchIdentifier::index(), patchIdentifier::name(), 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:

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, FatalErrorIn, forAll, boundaryMesh::mesh(), patchIdentifier::name(), patchIdentifier::physicalType(), points, Foam::Pout, List< T >::setSize(), List< T >::size(), boundaryPatch::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:

void setFeatureEdges ( const scalar  minCos)
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:

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:

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:

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:

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< Face, FaceList, PointField, PointType >::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:

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


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