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

Triangulated surface description with patch information. More...

#include <triSurface/triSurface.H>


Detailed Description

Triangulated surface description with patch information.

Source files

Definition at line 58 of file triSurface.H.

Inheritance diagram for triSurface:
Collaboration diagram for triSurface:

List of all members.

Public Types

typedef bool  BoundaryMesh
 Placeholder only, but do not remove - it is needed for GeoMesh.

Public Member Functions

 ClassName ("triSurface")
 Runtime type information.
 triSurface ()
 Construct null.
 triSurface (const List< labelledTri > &, const geometricSurfacePatchList &, const pointField &)
 Construct from triangles, patches, points.
 triSurface (List< labelledTri > &, const geometricSurfacePatchList &, pointField &, const bool reUse)
 Construct from triangles, patches, points. Reuse storage.
 triSurface (const List< labelledTri > &, const pointField &)
 Construct from triangles, points. Set patchnames to default.
 triSurface (const triFaceList &, const pointField &)
 Construct from triangles, points. Set region to 0 and default.
 triSurface (const fileName &)
 Construct from file name (uses extension to determine type)
 triSurface (Istream &)
 Construct from Istream.
 triSurface (const Time &d)
 Construct from objectRegistry.
 triSurface (const triSurface &)
 Construct as copy.
 ~triSurface ()
void  clearOut ()
void  clearTopology ()
void  clearPatchMeshAddr ()
const geometricSurfacePatchList &  patches () const
geometricSurfacePatchList &  patches ()
const labelListList &  sortedEdgeFaces () const
 Return edge-face addressing sorted (for edges with more than.
const labelList &  edgeOwner () const
 If 2 face neighbours: label of face where ordering of edge.
virtual void  movePoints (const pointField &)
 Move points.
virtual void  scalePoints (const scalar &)
 Scale points. A non-positive factor is ignored.
void  checkTriangles (const bool verbose)
 Check/remove duplicate/degenerate triangles.
void  checkEdges (const bool verbose)
 Check triply (or more) connected edges.
void  cleanup (const bool verbose)
 Remove non-valid triangles.
void  markZone (const boolList &borderEdge, const label faceI, const label currentZone, labelList &faceZone) const
 Fill faceZone with currentZone for every face reachable.
label  markZones (const boolList &borderEdge, labelList &faceZone) const
 (size and) fills faceZone with zone of face. Zone is area
void  subsetMeshMap (const boolList &include, labelList &pointMap, labelList &faceMap) const
 'Create' sub mesh, including only faces for which
triSurface  subsetMesh (const boolList &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. Returns pointMap, faceMap from.
void  write (Ostream &) const
 Write to Ostream in simple FOAM format.
void  write (const fileName &, const bool sortByRegion=false) const
 Generic write routine. Chooses writer based on extension.
void  write (const Time &) const
 Write to database.
void  writeDX (const scalarField &, Ostream &) const
 Write to Ostream in OpenDX format.
void  writeDX (const vectorField &, Ostream &) const
void  writeStats (Ostream &) const
 Write some statistics.
void  operator= (const triSurface &)

Static Public Member Functions

static fileName  triSurfInstance (const Time &)
 Name of triSurface directory to use.

Protected Member Functions

pointField &  storedPoints ()
 Non-const access to global points.
List< Face > &  storedFaces ()
 Non-const access to the faces.

Friends

Ostream &  operator<< (Ostream &, const triSurface &)

Member Typedef Documentation

typedef bool BoundaryMesh

Placeholder only, but do not remove - it is needed for GeoMesh.

Definition at line 227 of file triSurface.H.


Constructor & Destructor Documentation

triSurface (  )

Construct null.

Definition at line 605 of file triSurface.C.

triSurface ( const List< labelledTri > &   triangles,
const geometricSurfacePatchList &   patches,
const pointField &   points  
)

Construct from triangles, patches, points.

Definition at line 616 of file triSurface.C.

triSurface ( List< labelledTri > &   triangles,
const geometricSurfacePatchList &   patches,
pointField &   points,
const bool   reUse  
)

Construct from triangles, patches, points. Reuse storage.

Definition at line 630 of file triSurface.C.

triSurface ( const List< labelledTri > &   triangles,
const pointField &   points  
)

Construct from triangles, points. Set patchnames to default.

Definition at line 645 of file triSurface.C.

triSurface ( const triFaceList &   triangles,
const pointField &   points  
)

Construct from triangles, points. Set region to 0 and default.

patchName.

Definition at line 660 of file triSurface.C.

triSurface ( const fileName &   name  )

Construct from file name (uses extension to determine type)

Definition at line 674 of file triSurface.C.

References fileName::ext().

triSurface ( Istream &   is  )

Construct from Istream.

Definition at line 689 of file triSurface.C.

triSurface ( const Time &   d  )

Construct from objectRegistry.

Definition at line 702 of file triSurface.C.

References Time::caseName(), Time::path(), and triSurface::triSurfInstance().

triSurface ( const triSurface &   ts  )

Construct as copy.

Definition at line 721 of file triSurface.C.

~triSurface (  )

Definition at line 732 of file triSurface.C.


Member Function Documentation

pointField& storedPoints (  ) [inline, protected]

Non-const access to global points.

Definition at line 211 of file triSurface.H.

References PrimitivePatch< labelledTri,::Foam::List, pointField, point >::points().

List<Face>& storedFaces (  ) [inline, protected]

Non-const access to the faces.

Definition at line 217 of file triSurface.H.

ClassName ( "triSurface"    )

Runtime type information.

Foam::fileName triSurfInstance ( const Time &   d  ) [static]
void clearOut (  )
void clearTopology (  )
void clearPatchMeshAddr (  )

Reimplemented from PrimitivePatch< labelledTri,::Foam::List, pointField, point >.

Definition at line 748 of file triSurface.C.

geometricSurfacePatchList& patches (  ) [inline]

Definition at line 303 of file triSurface.H.

const Foam::labelListList & sortedEdgeFaces (  ) const

Return edge-face addressing sorted (for edges with more than.

2 faces) according to the angle around the edge. Orientation is anticlockwise looking from edge.vec(localPoints())

Definition at line 763 of file triSurface.C.

const Foam::labelList & edgeOwner (  ) const

If 2 face neighbours: label of face where ordering of edge.

is consistent with righthand walk. If 1 neighbour: label of only face. If >2 neighbours: undetermined.

Definition at line 774 of file triSurface.C.

void movePoints ( const pointField &   newPoints  ) [virtual]

Move points.

Reimplemented in triSurfaceMesh.

Definition at line 786 of file triSurface.C.

References Foam::deleteDemandDrivenData().

Referenced by triSurfaceMesh::movePoints().

void scalePoints ( const scalar &   scaleFactor  ) [virtual]

Scale points. A non-positive factor is ignored.

Definition at line 800 of file triSurface.C.

Referenced by triSurfaceMesh::triSurfaceMesh().

void checkTriangles ( const bool   verbose  )

Check/remove duplicate/degenerate triangles.

Definition at line 187 of file triSurface.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, points, List< T >::size(), Foam::Warning, and WarningIn.

void checkEdges ( const bool   verbose  )

Check triply (or more) connected edges.

Definition at line 321 of file triSurface.C.

References UList< T >::empty(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and WarningIn.

void cleanup ( const bool   verbose  )

Remove non-valid triangles.

Definition at line 817 of file triSurface.C.

References points.

void markZone ( const boolList &   borderEdge,
const label   faceI,
const label   currentZone,
labelList &   faceZone  
) const

Fill faceZone with currentZone for every face reachable.

from faceI without crossing edge marked in borderEdge. Note: faceZone has to be sized nFaces before calling this fun.

Definition at line 834 of file triSurface.C.

References Foam::abort(), List< T >::append(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and List< T >::transfer().

Foam::label markZones ( const boolList &   borderEdge,
labelList &   faceZone  
) const

(size and) fills faceZone with zone of face. Zone is area

reachable by edge crossing without crossing borderEdge (bool for every edge in surface). Returns number of zones.

Definition at line 903 of file triSurface.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, List< T >::setSize(), and List< T >::size().

Referenced by booleanSurface::booleanSurface().

void subsetMeshMap ( const boolList &   include,
labelList &   pointMap,
labelList &   faceMap  
) const

'Create' sub mesh, including only faces for which

boolList entry is true Sets: pointMap: from new to old localPoints faceMap: new to old faces

Definition at line 952 of file triSurface.C.

References b, forAll, nPoints, List< T >::setSize(), and List< T >::size().

Foam::triSurface subsetMesh ( const boolList &   include,
labelList &   pointMap,
labelList &   faceMap  
) const

Return new surface. Returns pointMap, faceMap from.

subsetMeshMap

Definition at line 1010 of file triSurface.C.

References forAll, patches, and List< T >::size().

Referenced by booleanSurface::booleanSurface().

void write ( Ostream &   os  ) const

Write to Ostream in simple FOAM format.

Definition at line 1061 of file triSurface.C.

References IOstream::check(), Foam::endl(), Foam::nl, patches, and points.

Referenced by booleanSurface::booleanSurface().

void write ( const fileName &   name,
const bool   sortByRegion = false  
) const

Generic write routine. Chooses writer based on extension.

Definition at line 1052 of file triSurface.C.

References fileName::ext().

void write ( const Time &   d  ) const

Write to database.

Definition at line 1074 of file triSurface.C.

References Time::caseName(), and Time::path().

void writeDX ( const scalarField &   field,
Ostream &   os  
) const
void writeStats ( Ostream &   os  ) const

Friends And Related Function Documentation

Ostream& operator<< ( Ostream &   ,
const triSurface &    
) [friend]

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