42 template<
class Triangulation>
52 template<
class Triangulation>
64 Info<<
"Reading " << meshName <<
" from " <<
runTime.timeName() <<
endl;
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();
150 template<
class Triangulation>
163 template<
class Triangulation>
166 Info<<
"Clearing triangulation" <<
endl;
172 Finite_vertices_iterator vit = Triangulation::finite_vertices_begin();
173 vit != Triangulation::finite_vertices_end();
201 Info<<
"Inserted " << vertexCount() <<
" fixed points" <<
endl;
205 template<
class Triangulation>
212 return rangeInsertWithInfo
222 template<
class Triangulation>
230 return typename Gt::Less_x_3()(*(
p.
first), *(q.first));
233 template<
class Triangulation>
241 return typename Gt::Less_y_3()(*(
p.
first), *(q.first));
244 template<
class Triangulation>
252 return typename Gt::Less_z_3()(*(
p.
first), *(q.first));
255 template<
class Triangulation>
263 template<
class Triangulation>
271 template<
class Triangulation>
280 template<
class Triangulation>
281 template<
class Po
intIterator>
297 > vectorPairPointIndex;
299 vectorPairPointIndex
points;
302 for (PointIterator it =
begin; it !=
end; ++it)
306 std::make_pair(&(it->point()),
count++)
316 Traits_for_spatial_sort()
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;
IOField< label > labelIOField
IO for a Field of label.
Map< label > rangeInsertWithInfo(PointIterator begin, PointIterator end, bool printErrors=false, bool reIndex=true)
Function inserting points into a triangulation and setting the.
void size(const label n)
Older name for setAddressableSize.
The vertex and cell classes must have an index defined.
void append(const T &val)
Append an element at the end of the list.
vectorIOField pointIOField
pointIOField is a vectorIOField.
~DelaunayMesh()
Destructor.
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
T & first()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
Foam::scalar & targetCellSize()
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
#define forAll(list, i)
Loop across all elements in list.
pointField vertices(const blockVertexList &bvl)
CGAL::indexedVertex< K > Vb
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Foam::InfoProxy< indexedVertex< Gt, Vb > > info() const noexcept
Return info proxy, used to print information to a stream.
Reading is optional [identical to LAZY_READ].
void reset()
Clear the entire triangulation.
PointFrompoint toPoint(const Foam::point &p)
iterator begin() noexcept
Return an iterator to begin traversing the UList.
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
T & last()
Access last element of the list, position [size()-1].
Foam::tensor & alignment()
messageStream Info
Information stream (stdout output on master, null elsewhere)
Map< label > insertPoints(const List< Vb > &vertices, const bool reIndex)
Insert the list of vertices (calls rangeInsertWithInfo)
iterator end() noexcept
Return an iterator to end traversing the UList.
void shuffle(UList< T > &list)
Randomise the list order.
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
A HashTable to objects of type <T> with a label key.