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