Go to the documentation of this file.
39 #ifndef DelaunayMesh_H
40 #define DelaunayMesh_H
44 #include "indexedVertex.H"
60 template<
class Triangulation>
69 typedef typename Triangulation::Edge
Edge;
71 typedef typename Triangulation::Facet
Facet;
73 typedef typename Triangulation::Finite_vertices_iterator
75 typedef typename Triangulation::Finite_cells_iterator
77 typedef typename Triangulation::Finite_facets_iterator
86 mutable label vertexCount_;
90 mutable label cellCount_;
98 struct Traits_for_spatial_sort
100 public Triangulation::Geom_traits
102 typedef typename Triangulation::Geom_traits Gt;
104 typedef std::pair<const typename Triangulation::Point*, label>
109 bool operator()(
const Point_3&
p,
const Point_3& q)
const;
114 bool operator()(
const Point_3&
p,
const Point_3& q)
const;
119 bool operator()(
const Point_3&
p,
const Point_3& q)
const;
139 const label nInternalFaces,
185 const string& description,
186 const bool check =
true
229 template<
class Po
intIterator>
234 bool printErrors =
false,
254 const bool writeDelaunayData =
true
void timeCheck(const string &description, const bool check=true) const
Write the cpuTime to screen.
label getNewVertexIndex() const
Create a new unique vertex index and return.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
A class for handling file names.
bool operator()(const Point_3 &p, const Point_3 &q) const
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
autoPtr< polyMesh > createMesh(const fileName &name, labelPairLookup &vertexMap, labelList &cellMap, const bool writeDelaunayData=true) const
Create an fvMesh from the triangulation.
void resetVertexCount()
Set the vertex count to zero.
const Time & time() const
Return a reference to the Time object.
void resetCellCount()
Set the cell count to zero.
Map< label > rangeInsertWithInfo(PointIterator begin, PointIterator end, bool printErrors=false, bool reIndex=true)
Function inserting points into a triangulation and setting the.
PtrList< dictionary > patchDicts
Triangulation::Finite_vertices_iterator Finite_vertices_iterator
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
label vertexCount() const
Return the vertex count (the next unique vertex index)
label getNewCellIndex() const
Create a new unique cell index and return.
static void check(const int retVal, const char *what)
bool operator()(const Point_3 &p, const Point_3 &q) const
label cellCount() const
Return the cell count (the next unique cell index)
Map< label > insertPoints(const List< Vb > &vertices, const bool reIndex)
Insert the list of vertices (calls rangeInsertWithInfo)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Triangulation::Facet Facet
pointField vertices(const blockVertexList &bvl)
OBJstream os(runTime.globalPath()/outputName)
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
~DelaunayMesh()
Destructor.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Triangulation::Cell_handle Cell_handle
Triangulation::Finite_cells_iterator Finite_cells_iterator
bool operator()(const Point_3 &p, const Point_3 &q) const
void printInfo(Ostream &os) const
Write mesh statistics to stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
The vertex and cell classes must have an index defined.
void printVertexInfo(Ostream &os) const
Write vertex statistics in the form of a table to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
CGAL data structures used for 3D Delaunay meshing.
Triangulation::Finite_facets_iterator Finite_facets_iterator
Triangulation::Vertex_handle Vertex_handle
void reset()
Clear the entire triangulation.
Triangulation::Point Point