Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DelaunayMesh< Triangulation > Class Template Reference

The vertex and cell classes must have an index defined. More...

Inheritance diagram for DelaunayMesh< Triangulation >:
Inheritance graph
[legend]
Collaboration diagram for DelaunayMesh< Triangulation >:
Collaboration graph
[legend]

Data Structures

struct  Traits_for_spatial_sort
 Spatial sort traits to use with a pair of point pointers and an int. More...
 

Public Types

typedef Triangulation::Cell_handle Cell_handle
 
typedef Triangulation::Vertex_handle Vertex_handle
 
typedef Triangulation::Edge Edge
 
typedef Triangulation::Point Point
 
typedef Triangulation::Facet Facet
 
typedef Triangulation::Finite_vertices_iterator Finite_vertices_iterator
 
typedef Triangulation::Finite_cells_iterator Finite_cells_iterator
 
typedef Triangulation::Finite_facets_iterator Finite_facets_iterator
 
typedef HashSet< Pair< label >, FixedList< label, 2 >::Hash<> > labelPairHashSet
 
typedef HashTable< label, labelPair, FixedList< label, 2 >::Hash<> > labelTolabelPairHashTable
 

Public Member Functions

 DelaunayMesh (const Time &runTime)
 Construct from components. More...
 
 DelaunayMesh (const Time &runTime, const word &meshName)
 
 ~DelaunayMesh ()
 Destructor. More...
 
const Timetime () const
 Return a reference to the Time object. More...
 
void timeCheck (const string &description, const bool check=true) const
 Write the cpuTime to screen. More...
 
label getNewCellIndex () const
 Create a new unique cell index and return. More...
 
label getNewVertexIndex () const
 Create a new unique vertex index and return. More...
 
label cellCount () const
 Return the cell count (the next unique cell index) More...
 
label vertexCount () const
 Return the vertex count (the next unique vertex index) More...
 
void resetCellCount ()
 Set the cell count to zero. More...
 
void resetVertexCount ()
 Set the vertex count to zero. More...
 
void reset ()
 Clear the entire triangulation. More...
 
Map< labelinsertPoints (const List< Vb > &vertices, const bool reIndex)
 Insert the list of vertices (calls rangeInsertWithInfo) More...
 
template<class PointIterator >
Map< labelrangeInsertWithInfo (PointIterator begin, PointIterator end, bool printErrors=false, bool reIndex=true)
 Function inserting points into a triangulation and setting the. More...
 
void printInfo (Ostream &os) const
 Write mesh statistics to stream. More...
 
void printVertexInfo (Ostream &os) const
 Write vertex statistics in the form of a table to stream. More...
 
autoPtr< polyMeshcreateMesh (const fileName &name, labelTolabelPairHashTable &vertexMap, labelList &cellMap, const bool writeDelaunayData=true) const
 Create an fvMesh from the triangulation. More...
 

Private Member Functions

void sortFaces (faceList &faces, labelList &owner, labelList &neighbour) const
 
void addPatches (const label nInternalFaces, faceList &faces, labelList &owner, PtrList< dictionary > &patchDicts, const List< DynamicList< face > > &patchFaces, const List< DynamicList< label > > &patchOwners) const
 
 DelaunayMesh (const DelaunayMesh< Triangulation > &)
 Disallow default bitwise copy construct. More...
 
void operator= (const DelaunayMesh< Triangulation > &)
 Disallow default bitwise assignment. More...
 

Private Attributes

label vertexCount_
 Keep track of the number of vertices that have been added. More...
 
label cellCount_
 Keep track of the number of cells that have been added. More...
 
const TimerunTime_
 Reference to Time. More...
 

Detailed Description

template<class Triangulation>
class Foam::DelaunayMesh< Triangulation >

The vertex and cell classes must have an index defined.

Source files

Definition at line 60 of file DelaunayMesh.H.

Member Typedef Documentation

◆ Cell_handle

typedef Triangulation::Cell_handle Cell_handle

Definition at line 66 of file DelaunayMesh.H.

◆ Vertex_handle

typedef Triangulation::Vertex_handle Vertex_handle

Definition at line 67 of file DelaunayMesh.H.

◆ Edge

typedef Triangulation::Edge Edge

Definition at line 68 of file DelaunayMesh.H.

◆ Point

typedef Triangulation::Point Point

Definition at line 69 of file DelaunayMesh.H.

◆ Facet

typedef Triangulation::Facet Facet

Definition at line 70 of file DelaunayMesh.H.

◆ Finite_vertices_iterator

typedef Triangulation::Finite_vertices_iterator Finite_vertices_iterator

Definition at line 73 of file DelaunayMesh.H.

◆ Finite_cells_iterator

typedef Triangulation::Finite_cells_iterator Finite_cells_iterator

Definition at line 75 of file DelaunayMesh.H.

◆ Finite_facets_iterator

typedef Triangulation::Finite_facets_iterator Finite_facets_iterator

Definition at line 77 of file DelaunayMesh.H.

◆ labelPairHashSet

Definition at line 83 of file DelaunayMesh.H.

◆ labelTolabelPairHashTable

Definition at line 90 of file DelaunayMesh.H.

Constructor & Destructor Documentation

◆ DelaunayMesh() [1/3]

DelaunayMesh ( const DelaunayMesh< Triangulation > &  )
private

Disallow default bitwise copy construct.

◆ DelaunayMesh() [2/3]

DelaunayMesh ( const Time runTime)
explicit

Construct from components.

◆ DelaunayMesh() [3/3]

DelaunayMesh ( const Time runTime,
const word meshName 
)

◆ ~DelaunayMesh()

Destructor.

Member Function Documentation

◆ sortFaces()

void sortFaces ( faceList faces,
labelList owner,
labelList neighbour 
) const
private

◆ addPatches()

void addPatches ( const label  nInternalFaces,
faceList faces,
labelList owner,
PtrList< dictionary > &  patchDicts,
const List< DynamicList< face > > &  patchFaces,
const List< DynamicList< label > > &  patchOwners 
) const
private

◆ operator=()

void operator= ( const DelaunayMesh< Triangulation > &  )
private

Disallow default bitwise assignment.

◆ time()

const Foam::Time & time
inline

Return a reference to the Time object.

Definition at line 29 of file DelaunayMeshI.H.

◆ timeCheck()

void timeCheck ( const string description,
const bool  check = true 
) const
inline

Write the cpuTime to screen.

Definition at line 37 of file DelaunayMeshI.H.

◆ getNewCellIndex()

Foam::label getNewCellIndex
inline

Create a new unique cell index and return.

Definition at line 63 of file DelaunayMeshI.H.

◆ getNewVertexIndex()

Foam::label getNewVertexIndex
inline

Create a new unique vertex index and return.

Definition at line 78 of file DelaunayMeshI.H.

◆ cellCount()

Foam::label cellCount
inline

Return the cell count (the next unique cell index)

Definition at line 93 of file DelaunayMeshI.H.

◆ vertexCount()

Foam::label vertexCount
inline

Return the vertex count (the next unique vertex index)

Definition at line 100 of file DelaunayMeshI.H.

◆ resetCellCount()

void resetCellCount
inline

Set the cell count to zero.

Definition at line 107 of file DelaunayMeshI.H.

◆ resetVertexCount()

void resetVertexCount
inline

Set the vertex count to zero.

Definition at line 114 of file DelaunayMeshI.H.

◆ reset()

void reset ( )

Clear the entire triangulation.

◆ insertPoints()

Map<label> insertPoints ( const List< Vb > &  vertices,
const bool  reIndex 
)

Insert the list of vertices (calls rangeInsertWithInfo)

◆ rangeInsertWithInfo()

Map<label> rangeInsertWithInfo ( PointIterator  begin,
PointIterator  end,
bool  printErrors = false,
bool  reIndex = true 
)

Function inserting points into a triangulation and setting the.

index and type data of the point in the correct order. This is faster than inserting points individually.

Adapted from a post on the CGAL lists: 2010-01/msg00004.html by Sebastien Loriot (Geometry Factory).

◆ printInfo()

void printInfo ( Ostream os) const

Write mesh statistics to stream.

◆ printVertexInfo()

void printVertexInfo ( Ostream os) const

Write vertex statistics in the form of a table to stream.

◆ createMesh()

autoPtr<polyMesh> createMesh ( const fileName name,
labelTolabelPairHashTable vertexMap,
labelList cellMap,
const bool  writeDelaunayData = true 
) const

Create an fvMesh from the triangulation.

The mesh is not parallel consistent - only used for viewing

Field Documentation

◆ vertexCount_

label vertexCount_
mutableprivate

Keep track of the number of vertices that have been added.

This allows a unique index to be assigned to each vertex.

Definition at line 99 of file DelaunayMesh.H.

◆ cellCount_

label cellCount_
mutableprivate

Keep track of the number of cells that have been added.

This allows a unique index to be assigned to each cell.

Definition at line 103 of file DelaunayMesh.H.

◆ runTime_

const Time& runTime_
private

Reference to Time.

Definition at line 106 of file DelaunayMesh.H.


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