42template<
class Triangulation>
52template<
class Triangulation>
64 Info<<
"Reading " << meshName <<
" from " <<
runTime.timeName() <<
endl;
72 meshName/polyMesh::meshSubDir,
74 IOobject::READ_IF_PRESENT,
79 if (pts.typeHeaderOk<pointIOField>(
true))
121 List<Vb> pointsToInsert(pts.size());
123 forAll(pointsToInsert, pI)
130 static_cast<indexedVertexEnum::vertexType
>(types[pI]),
137 pointsToInsert.begin(),
138 pointsToInsert.end(),
143 vertexCount_ = Triangulation::number_of_vertices();
150template<
class Triangulation>
163template<
class Triangulation>
166 Info<<
"Clearing triangulation" <<
endl;
172 Finite_vertices_iterator vit = Triangulation::finite_vertices_begin();
173 vit != Triangulation::finite_vertices_end();
199 insertPoints(vertices,
false);
201 Info<<
"Inserted " << vertexCount() <<
" fixed points" <<
endl;
205template<
class Triangulation>
208 const List<Vb>& vertices,
212 return rangeInsertWithInfo
222template<
class Triangulation>
230 return typename Gt::Less_x_3()(*(
p.first), *(q.first));
233template<
class Triangulation>
241 return typename Gt::Less_y_3()(*(
p.first), *(q.first));
244template<
class Triangulation>
252 return typename Gt::Less_z_3()(*(
p.first), *(q.first));
255template<
class Triangulation>
263template<
class Triangulation>
271template<
class Triangulation>
280template<
class Triangulation>
281template<
class Po
intIterator>
297 > vectorPairPointIndex;
299 vectorPairPointIndex
points;
302 for (PointIterator it = begin; it !=
end; ++it)
306 std::make_pair(&(it->point()), count++)
310 std::shuffle(
points.begin(),
points.end(), std::default_random_engine());
316 Traits_for_spatial_sort()
321 Map<label> oldToNewIndex(
points.size());
325 typename vectorPairPointIndex::const_iterator
p =
points.begin();
330 const size_t checkInsertion = Triangulation::number_of_vertices();
332 hint = this->
insert(*(p->first), hint);
334 const Vb& vert = *(
begin +
p->second);
336 if (checkInsertion != Triangulation::number_of_vertices() - 1)
340 Vertex_handle nearV =
341 Triangulation::nearest_vertex(*(
p->first));
343 Pout<<
"Failed insertion : " << vert.
info()
344 <<
" nearest : " << nearV->info();
349 const label oldIndex = vert.
index();
350 hint->index() = getNewVertexIndex();
354 oldToNewIndex.insert(oldIndex, hint->index());
357 hint->type() = vert.
type();
364 return oldToNewIndex;
CGAL::indexedVertex< K > Vb
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
Foam::scalar & targetCellSize()
Foam::InfoProxy< indexedVertex< Gt, Vb > > info() const
Info proxy, to print information to a stream.
Foam::tensor & alignment()
The vertex and cell classes must have an index defined.
Map< label > insertPoints(const List< Vb > &vertices, const bool reIndex)
Insert the list of vertices (calls rangeInsertWithInfo)
Map< label > rangeInsertWithInfo(PointIterator begin, PointIterator end, bool printErrors=false, bool reIndex=true)
Function inserting points into a triangulation and setting the.
~DelaunayMesh()
Destructor.
void reset()
Clear the entire triangulation.
void append(const T &val)
Append an element at the end of the list.
A HashTable to objects of type <T> with a label key.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
iterator end() noexcept
Return an iterator to end traversing the UList.
T & last()
Return the last element of the list.
CellSizeDelaunay::Point Point
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
PointFrompoint toPoint(const Foam::point &p)
messageStream Info
Information stream (stdout output on master, null elsewhere)
IOField< label > labelIOField
labelField with IO.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorIOField pointIOField
pointIOField is a vectorIOField.
pointField vertices(const blockVertexList &bvl)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
#define forAll(list, i)
Loop across all elements in list.