TTK
Loading...
Searching...
No Matches
Triangulation.h
Go to the documentation of this file.
1
34
35#pragma once
36
37// base code includes
43
44#include <array>
45
46namespace ttk {
47
48 class Triangulation final : public AbstractTriangulation {
49
50 public:
53 Triangulation(Triangulation &&) noexcept;
56 ~Triangulation() override;
57
58 enum class Type {
65 };
66
70 enum class STRATEGY {
74 DEFAULT = 0,
79 };
80
83 inline int clear() {
84
87 }
88
89 return 0;
90 }
91
94 inline size_t footprint() const {
95
98 }
99
100 return 0;
101 }
102
124 inline int getCellEdge(const SimplexId &cellId,
125 const int &localEdgeId,
126 SimplexId &edgeId) const override {
127
128 // initialize output variable before early return
129 edgeId = -1;
130
131#ifndef TTK_ENABLE_KAMIKAZE
132 if(isEmptyCheck())
133 return -1;
134#endif
135
136 return abstractTriangulation_->getCellEdge(cellId, localEdgeId, edgeId);
137 }
138
155 inline SimplexId getCellEdgeNumber(const SimplexId &cellId) const override {
156#ifndef TTK_ENABLE_KAMIKAZE
157 if(isEmptyCheck())
158 return -1;
159#endif
161 }
162
191 inline const std::vector<std::vector<SimplexId>> *getCellEdges() override {
192#ifndef TTK_ENABLE_KAMIKAZE
193 if(isEmptyCheck())
194 return nullptr;
195#endif
197 }
198
199 inline int
200 getCellIncenter(SimplexId cellId, int dim, float incenter[3]) const {
201#ifndef TTK_ENABLE_KAMIKAZE
202 if(isEmptyCheck())
203 return -1;
204#endif
205 return abstractTriangulation_->getCellIncenter(cellId, dim, incenter);
206 }
207
227 inline int getCellNeighbor(const SimplexId &cellId,
228 const int &localNeighborId,
229 SimplexId &neighborId) const override {
230
231 // initialize output variable before early return
232 neighborId = -1;
233#ifndef TTK_ENABLE_KAMIKAZE
234 if(isEmptyCheck())
235 return -1;
236#endif
238 cellId, localNeighborId, neighborId);
239 }
240
255 inline SimplexId
256 getCellNeighborNumber(const SimplexId &cellId) const override {
257
258#ifndef TTK_ENABLE_KAMIKAZE
259 if(isEmptyCheck())
260 return -1;
261#endif
263 }
264
290 inline const std::vector<std::vector<SimplexId>> *
291 getCellNeighbors() override {
292#ifndef TTK_ENABLE_KAMIKAZE
293 if(isEmptyCheck())
294 return nullptr;
295#endif
297 }
298
321 inline int getCellTriangle(const SimplexId &cellId,
322 const int &localTriangleId,
323 SimplexId &triangleId) const override {
324
325#ifndef TTK_ENABLE_KAMIKAZE
326 // initialize output variable before early return
327 triangleId = -1;
328
329 if(isEmptyCheck())
330 return -1;
331#endif
333 cellId, localTriangleId, triangleId);
334 }
335
353 inline SimplexId
354 getCellTriangleNumber(const SimplexId &cellId) const override {
355#ifndef TTK_ENABLE_KAMIKAZE
356 if(isEmptyCheck())
357 return -1;
358#endif
360 }
361
393 inline const std::vector<std::vector<SimplexId>> *
394 getCellTriangles() override {
395#ifndef TTK_ENABLE_KAMIKAZE
396 if(isEmptyCheck())
397 return nullptr;
398#endif
400 }
401
413 inline int getCellVertex(const SimplexId &cellId,
414 const int &localVertexId,
415 SimplexId &vertexId) const override {
416
417#ifndef TTK_ENABLE_KAMIKAZE
418 // initialize output variable before early return
419 vertexId = -1;
420
421 if(isEmptyCheck())
422 return -1;
423#endif
424
426 cellId, localVertexId, vertexId);
427 }
428
435 inline SimplexId
436 getCellVertexNumber(const SimplexId &cellId) const override {
437
438#ifndef TTK_ENABLE_KAMIKAZE
439 if(isEmptyCheck())
440 return -1;
441#endif
443 }
444
448 inline int getDimensionality() const override {
449#ifndef TTK_ENABLE_KAMIKAZE
450 if(isEmptyCheck())
451 return -1;
452#endif
454 }
455
480 inline const std::vector<std::array<SimplexId, 2>> *getEdges() override {
481#ifndef TTK_ENABLE_KAMIKAZE
482 if(isEmptyCheck())
483 return nullptr;
484#endif
486 }
487
499 inline int getEdgeIncenter(SimplexId edgeId, float incenter[3]) const {
500#ifndef TTK_ENABLE_KAMIKAZE
501 if(isEmptyCheck())
502 return -1;
503#endif
504 return abstractTriangulation_->getEdgeIncenter(edgeId, incenter);
505 }
506
518 inline int getTriangleIncenter(SimplexId triangleId,
519 float incenter[3]) const {
520#ifndef TTK_ENABLE_KAMIKAZE
521 if(isEmptyCheck())
522 return -1;
523#endif
524 return abstractTriangulation_->getTriangleIncenter(triangleId, incenter);
525 }
526
546 inline int getEdgeLink(const SimplexId &edgeId,
547 const int &localLinkId,
548 SimplexId &linkId) const override {
549#ifndef TTK_ENABLE_KAMIKAZE
550 // initialize output variable before early return
551 linkId = -1;
552
553 if(isEmptyCheck())
554 return -1;
555#endif
556 return abstractTriangulation_->getEdgeLink(edgeId, localLinkId, linkId);
557 }
558
573 inline SimplexId getEdgeLinkNumber(const SimplexId &edgeId) const override {
574#ifndef TTK_ENABLE_KAMIKAZE
575 if(isEmptyCheck())
576 return -1;
577#endif
579 }
580
604 inline const std::vector<std::vector<SimplexId>> *getEdgeLinks() override {
605#ifndef TTK_ENABLE_KAMIKAZE
606 if(isEmptyCheck())
607 return nullptr;
608#endif
610 }
611
634 inline int getEdgeStar(const SimplexId &edgeId,
635 const int &localStarId,
636 SimplexId &starId) const override {
637#ifndef TTK_ENABLE_KAMIKAZE
638 // initialize output variable before early return
639 starId = -1;
640
641 if(isEmptyCheck())
642 return -1;
643#endif
644 return abstractTriangulation_->getEdgeStar(edgeId, localStarId, starId);
645 }
646
664 inline SimplexId getEdgeStarNumber(const SimplexId &edgeId) const override {
665#ifndef TTK_ENABLE_KAMIKAZE
666 if(isEmptyCheck())
667 return -1;
668#endif
670 }
671
700 inline const std::vector<std::vector<SimplexId>> *getEdgeStars() override {
701#ifndef TTK_ENABLE_KAMIKAZE
702 if(isEmptyCheck())
703 return nullptr;
704#endif
706 }
707
727 inline int getEdgeTriangle(const SimplexId &edgeId,
728 const int &localTriangleId,
729 SimplexId &triangleId) const override {
730
731#ifndef TTK_ENABLE_KAMIKAZE
732 // initialize output variable before early return
733 triangleId = -1;
734
735 if(isEmptyCheck())
736 return -1;
737#endif
739 edgeId, localTriangleId, triangleId);
740 }
741
756 inline SimplexId
757 getEdgeTriangleNumber(const SimplexId &edgeId) const override {
758#ifndef TTK_ENABLE_KAMIKAZE
759 if(isEmptyCheck())
760 return -1;
761#endif
763 }
764
790 inline const std::vector<std::vector<SimplexId>> *
791 getEdgeTriangles() override {
792#ifndef TTK_ENABLE_KAMIKAZE
793 if(isEmptyCheck())
794 return nullptr;
795#endif
797 }
798
816 inline int getEdgeVertex(const SimplexId &edgeId,
817 const int &localVertexId,
818 SimplexId &vertexId) const override {
819#ifndef TTK_ENABLE_KAMIKAZE
820 // initialize output variable before early return
821 vertexId = -1;
822
823 if(isEmptyCheck())
824 return -1;
825#endif
827 edgeId, localVertexId, vertexId);
828 }
829
835
841 inline SimplexId getNumberOfCells() const override {
842
843#ifndef TTK_ENABLE_KAMIKAZE
844 if(isEmptyCheck())
845 return -1;
846#endif
847
849 }
850
864 inline SimplexId getNumberOfEdges() const override {
865#ifndef TTK_ENABLE_KAMIKAZE
866 if(isEmptyCheck())
867 return -1;
868#endif
870 }
871
885 inline SimplexId getNumberOfTriangles() const override {
886#ifndef TTK_ENABLE_KAMIKAZE
887
888 if(isEmptyCheck())
889 return -1;
890#endif
892 }
893
896 inline SimplexId getNumberOfVertices() const override {
897
898#ifndef TTK_ENABLE_KAMIKAZE
899 if(isEmptyCheck())
900 return -1;
901#endif
903 }
904
911 int getTetraIncenter(SimplexId tetraId, float incenter[3]) const {
912#ifndef TTK_ENABLE_KAMIKAZE
913 if(isEmptyCheck())
914 return -1;
915#endif
916 return abstractTriangulation_->getTetraIncenter(tetraId, incenter);
917 }
918
943 inline const std::vector<std::array<SimplexId, 3>> *
944 getTriangles() override {
945#ifndef TTK_ENABLE_KAMIKAZE
946 if(isEmptyCheck())
947 return nullptr;
948#endif
950 }
951
970 inline int getTriangleEdge(const SimplexId &triangleId,
971 const int &localEdgeId,
972 SimplexId &edgeId) const override {
973#ifndef TTK_ENABLE_KAMIKAZE
974 // initialize output variable before early return
975 edgeId = -1;
976
977 if(isEmptyCheck())
978 return -1;
979#endif
981 triangleId, localEdgeId, edgeId);
982 }
983
998 inline SimplexId
999 getTriangleEdgeNumber(const SimplexId &triangleId) const override {
1000#ifndef TTK_ENABLE_KAMIKAZE
1001 if(isEmptyCheck())
1002 return -1;
1003#endif
1005 }
1006
1032 inline const std::vector<std::vector<SimplexId>> *
1033 getTriangleEdges() override {
1034#ifndef TTK_ENABLE_KAMIKAZE
1035 if(isEmptyCheck())
1036 return nullptr;
1037#endif
1039 }
1040
1060 inline int getTriangleLink(const SimplexId &triangleId,
1061 const int &localLinkId,
1062 SimplexId &linkId) const override {
1063#ifndef TTK_ENABLE_KAMIKAZE
1064 // initialize output variable before early return
1065 linkId = -1;
1066
1067 if(isEmptyCheck())
1068 return -1;
1069#endif
1071 triangleId, localLinkId, linkId);
1072 }
1073
1089 inline SimplexId
1090 getTriangleLinkNumber(const SimplexId &triangleId) const override {
1091#ifndef TTK_ENABLE_KAMIKAZE
1092 if(isEmptyCheck())
1093 return -1;
1094#endif
1096 }
1097
1122 inline const std::vector<std::vector<SimplexId>> *
1123 getTriangleLinks() override {
1124#ifndef TTK_ENABLE_KAMIKAZE
1125 if(isEmptyCheck())
1126 return nullptr;
1127#endif
1129 }
1130
1151 inline int getTriangleStar(const SimplexId &triangleId,
1152 const int &localStarId,
1153 SimplexId &starId) const override {
1154#ifndef TTK_ENABLE_KAMIKAZE
1155 // initialize output variable before early return
1156 starId = -1;
1157
1158 if(isEmptyCheck())
1159 return -1;
1160#endif
1162 triangleId, localStarId, starId);
1163 }
1164
1179 inline SimplexId
1180 getTriangleStarNumber(const SimplexId &triangleId) const override {
1181#ifndef TTK_ENABLE_KAMIKAZE
1182 if(isEmptyCheck())
1183 return -1;
1184#endif
1186 }
1187
1213 inline const std::vector<std::vector<SimplexId>> *
1214 getTriangleStars() override {
1215#ifndef TTK_ENABLE_KAMIKAZE
1216 if(isEmptyCheck())
1217 return nullptr;
1218#endif
1220 }
1221
1239 inline int getTriangleVertex(const SimplexId &triangleId,
1240 const int &localVertexId,
1241 SimplexId &vertexId) const override {
1242
1243#ifndef TTK_ENABLE_KAMIKAZE
1244 // initialize output variable before early return
1245 vertexId = -1;
1246
1247 if(isEmptyCheck())
1248 return -1;
1249#endif
1251 triangleId, localVertexId, vertexId);
1252 }
1253
1273
1294 inline int getVertexEdge(const SimplexId &vertexId,
1295 const int &localEdgeId,
1296 SimplexId &edgeId) const override {
1297
1298#ifndef TTK_ENABLE_KAMIKAZE
1299 // initialize output variable before early return
1300 edgeId = -1;
1301
1302 if(isEmptyCheck())
1303 return -1;
1304#endif
1306 vertexId, localEdgeId, edgeId);
1307 }
1308
1323 inline SimplexId
1324 getVertexEdgeNumber(const SimplexId &vertexId) const override {
1325#ifndef TTK_ENABLE_KAMIKAZE
1326 if(isEmptyCheck())
1327 return -1;
1328#endif
1330 }
1331
1358 inline const std::vector<std::vector<SimplexId>> *
1359 getVertexEdges() override {
1360#ifndef TTK_ENABLE_KAMIKAZE
1361 if(isEmptyCheck())
1362 return nullptr;
1363#endif
1364 if(getDimensionality() == 1)
1366
1368 }
1369
1370#ifdef TTK_ENABLE_MPI
1371
1383 inline SimplexId getVertexGlobalId(const SimplexId lvid) const override {
1384#ifndef TTK_ENABLE_KAMIKAZE
1385 if(isEmptyCheck())
1386 return -1;
1387#endif
1388 return abstractTriangulation_->getVertexGlobalId(lvid);
1389 }
1390
1402 inline std::unordered_map<SimplexId, SimplexId> &getVertexGlobalIdMap() {
1403 return this->explicitTriangulation_.getVertexGlobalIdMap();
1404 }
1405
1408 inline void setHasPreconditionedDistributedVertices(bool flag) override {
1409 abstractTriangulation_->setHasPreconditionedDistributedVertices(flag);
1410 }
1411
1412 inline bool hasPreconditionedDistributedCells() const override {
1413 return abstractTriangulation_->hasPreconditionedDistributedCells();
1414 }
1415 inline bool hasPreconditionedDistributedVertices() const override {
1416 return abstractTriangulation_->hasPreconditionedDistributedVertices();
1417 }
1418
1419 inline const std::vector<int> &getNeighborRanks() const override {
1420 return abstractTriangulation_->getNeighborRanks();
1421 }
1422 inline std::vector<int> &getNeighborRanks() override {
1423 return abstractTriangulation_->getNeighborRanks();
1424 }
1425
1426 inline std::map<int, int> &getNeighborsToId() override {
1427 return abstractTriangulation_->getNeighborsToId();
1428 }
1429
1430 inline const std::map<int, int> &getNeighborsToId() const override {
1431 return abstractTriangulation_->getNeighborsToId();
1432 }
1433
1434 inline const std::vector<std::array<ttk::SimplexId, 6>> &
1435 getNeighborVertexBBoxes() const override {
1436 return abstractTriangulation_->getNeighborVertexBBoxes();
1437 }
1438
1439 inline const std::vector<std::vector<SimplexId>> &
1440 getGhostCellsPerOwner() const override {
1441 return abstractTriangulation_->getGhostCellsPerOwner();
1442 }
1443
1444 inline const std::vector<std::vector<SimplexId>> &
1445 getRemoteGhostCells() const override {
1446 return abstractTriangulation_->getRemoteGhostCells();
1447 }
1448
1449 inline int getVertexRank(const SimplexId lvid) const override {
1450 return this->abstractTriangulation_->getVertexRank(lvid);
1451 }
1452
1464 inline SimplexId getVertexLocalId(const SimplexId geid) const override {
1465#ifndef TTK_ENABLE_KAMIKAZE
1466 if(isEmptyCheck())
1467 return -1;
1468#endif
1469 return abstractTriangulation_->getVertexLocalId(geid);
1470 }
1471
1482 inline void createMetaGrid(const double *const bounds) {
1483 this->implicitPreconditionsTriangulation_.createMetaGrid(bounds);
1484 this->periodicImplicitTriangulation_.createMetaGrid(bounds);
1485 this->implicitTriangulation_.createMetaGrid(bounds);
1486 this->periodicPreconditionsTriangulation_.createMetaGrid(bounds);
1487 // also pass bounding box to ExplicitTriangulation...
1488 this->explicitTriangulation_.setBoundingBox(bounds);
1489 }
1490
1491 inline void setIsBoundaryPeriodic(std::array<unsigned char, 6> boundary) {
1492 this->periodicImplicitTriangulation_.setIsBoundaryPeriodic(boundary);
1493 this->periodicPreconditionsTriangulation_.setIsBoundaryPeriodic(boundary);
1494 }
1495
1504 inline int getDistributedGlobalCellId(const ttk::SimplexId &localCellId,
1505 const int &cellDim,
1506 ttk::SimplexId &globalCellId) const {
1507#ifndef TTK_ENABLE_KAMIKAZE
1508 if(isEmptyCheck())
1509 return -1;
1510#endif
1511 return this->abstractTriangulation_->getDistributedGlobalCellId(
1512 localCellId, cellDim, globalCellId);
1513 }
1514
1515 inline bool isOrderArrayGlobal(const void *data) const {
1516 return this->abstractTriangulation_->isOrderArrayGlobal(data);
1517 }
1518
1519 inline void setIsOrderArrayGlobal(const void *data, bool flag) {
1520 this->abstractTriangulation_->setIsOrderArrayGlobal(data, flag);
1521 }
1522
1523#endif // TTK_ENABLE_MPI
1524
1544 inline int getVertexLink(const SimplexId &vertexId,
1545 const int &localLinkId,
1546 SimplexId &linkId) const override {
1547
1548#ifndef TTK_ENABLE_KAMIKAZE
1549 // initialize output variable before early return
1550 linkId = -1;
1551
1552 if(isEmptyCheck())
1553 return -1;
1554#endif
1556 vertexId, localLinkId, linkId);
1557 }
1558
1573 inline SimplexId
1574 getVertexLinkNumber(const SimplexId &vertexId) const override {
1575
1576#ifndef TTK_ENABLE_KAMIKAZE
1577 if(isEmptyCheck())
1578 return -1;
1579#endif
1581 }
1582
1607 inline const std::vector<std::vector<SimplexId>> *
1608 getVertexLinks() override {
1609
1610#ifndef TTK_ENABLE_KAMIKAZE
1611 if(isEmptyCheck())
1612 return nullptr;
1613#endif
1615 }
1616
1633 inline int getVertexNeighbor(const SimplexId &vertexId,
1634 const int &localNeighborId,
1635 SimplexId &neighborId) const override {
1636
1637#ifndef TTK_ENABLE_KAMIKAZE
1638 // initialize output variable before early return
1639 neighborId = -1;
1640
1641 if(isEmptyCheck())
1642 return -1;
1643#endif
1645 vertexId, localNeighborId, neighborId);
1646 }
1647
1659 inline SimplexId
1660 getVertexNeighborNumber(const SimplexId &vertexId) const override {
1661
1662#ifndef TTK_ENABLE_KAMIKAZE
1663 if(isEmptyCheck())
1664 return -1;
1665#endif
1667 }
1668
1692 inline const std::vector<std::vector<SimplexId>> *
1694#ifndef TTK_ENABLE_KAMIKAZE
1695 if(isEmptyCheck())
1696 return nullptr;
1697#endif
1699 }
1700
1707 inline int getVertexPoint(const SimplexId &vertexId,
1708 float &x,
1709 float &y,
1710 float &z) const override {
1711
1712#ifndef TTK_ENABLE_KAMIKAZE
1713 // initialize output variables before early return
1714 x = NAN;
1715 y = NAN;
1716 z = NAN;
1717
1718 if(isEmptyCheck())
1719 return -1;
1720#endif
1721 return abstractTriangulation_->getVertexPoint(vertexId, x, y, z);
1722 }
1723
1744 inline int getVertexStar(const SimplexId &vertexId,
1745 const int &localStarId,
1746 SimplexId &starId) const override {
1747
1748#ifndef TTK_ENABLE_KAMIKAZE
1749 // initialize output variable before early return
1750 starId = -1;
1751
1752 if(isEmptyCheck())
1753 return -1;
1754#endif
1756 vertexId, localStarId, starId);
1757 }
1758
1773 inline SimplexId
1774 getVertexStarNumber(const SimplexId &vertexId) const override {
1775#ifndef TTK_ENABLE_KAMIKAZE
1776 if(isEmptyCheck())
1777 return -1;
1778#endif
1780 }
1781
1807 inline const std::vector<std::vector<SimplexId>> *
1808 getVertexStars() override {
1809#ifndef TTK_ENABLE_KAMIKAZE
1810 if(isEmptyCheck())
1811 return nullptr;
1812#endif
1814 }
1815
1836 inline int getVertexTriangle(const SimplexId &vertexId,
1837 const int &localTriangleId,
1838 SimplexId &triangleId) const override {
1839
1840#ifndef TTK_ENABLE_KAMIKAZE
1841 // initialize output variable before early return
1842 triangleId = -1;
1843
1844 if(isEmptyCheck())
1845 return -1;
1846#endif
1848 vertexId, localTriangleId, triangleId);
1849 }
1850
1865 inline SimplexId
1866 getVertexTriangleNumber(const SimplexId &vertexId) const override {
1867
1868#ifndef TTK_ENABLE_KAMIKAZE
1869 if(isEmptyCheck())
1870 return -1;
1871#endif
1873 }
1874
1900 inline const std::vector<std::vector<SimplexId>> *
1902
1903#ifndef TTK_ENABLE_KAMIKAZE
1904 if(isEmptyCheck())
1905 return nullptr;
1906#endif
1908 }
1909
1929 inline bool isEdgeOnBoundary(const SimplexId &edgeId) const override {
1930#ifndef TTK_ENABLE_KAMIKAZE
1931 if(isEmptyCheck())
1932 return false;
1933#endif
1935 }
1936
1939 inline bool isEmpty() const override {
1940 return !abstractTriangulation_;
1941 }
1942
1946 inline bool isManifold() const override {
1947#ifndef TTK_ENABLE_KAMIKAZE
1948 if(this->isEmptyCheck()) {
1949 return true;
1950 }
1951#endif // TTK_ENABLE_KAMIKAZE
1952 return this->abstractTriangulation_->isManifold();
1953 }
1954
1975 inline int preconditionManifold() override {
1976#ifndef TTK_ENABLE_KAMIKAZE
1977 if(this->isEmptyCheck())
1978 return false;
1979#endif // TTK_ENABLE_KAMIKAZE
1981 }
1982
2003 inline bool
2004 isTriangleOnBoundary(const SimplexId &triangleId) const override {
2005#ifndef TTK_ENABLE_KAMIKAZE
2006 if(isEmptyCheck())
2007 return false;
2008#endif
2009 return abstractTriangulation_->isTriangleOnBoundary(triangleId);
2010 }
2011
2029 inline bool isVertexOnBoundary(const SimplexId &vertexId) const override {
2030#ifndef TTK_ENABLE_KAMIKAZE
2031 if(isEmptyCheck())
2032 return false;
2033#endif
2035 }
2036
2050 inline int preconditionBoundaryEdges() override {
2051#ifndef TTK_ENABLE_KAMIKAZE
2052 if(isEmptyCheck())
2053 return -1;
2054#endif
2056 }
2057
2071 inline int preconditionBoundaryTriangles() override {
2072#ifndef TTK_ENABLE_KAMIKAZE
2073 if(isEmptyCheck())
2074 return -1;
2075#endif
2076
2078 }
2079
2093 inline int preconditionBoundaryVertices() override {
2094#ifndef TTK_ENABLE_KAMIKAZE
2095 if(isEmptyCheck())
2096 return -1;
2097#endif
2099 }
2100
2116 inline int preconditionCellEdges() override {
2117#ifndef TTK_ENABLE_KAMIKAZE
2118 if(isEmptyCheck())
2119 return -1;
2120#endif
2121
2123 }
2124
2142 inline int preconditionCellNeighbors() override {
2143
2144#ifndef TTK_ENABLE_KAMIKAZE
2145 if(isEmptyCheck())
2146 return -1;
2147#endif
2149 }
2150
2168 inline int preconditionCellTriangles() override {
2169
2170#ifndef TTK_ENABLE_KAMIKAZE
2171 if(isEmptyCheck())
2172 return -1;
2173#endif
2175 }
2176
2194 inline int preconditionEdges() override {
2195
2196#ifndef TTK_ENABLE_KAMIKAZE
2197 if(isEmptyCheck())
2198 return -1;
2199#endif
2200
2202 }
2203
2221 inline int preconditionEdgeLinks() override {
2222
2223#ifndef TTK_ENABLE_KAMIKAZE
2224 if(isEmptyCheck())
2225 return -1;
2226#endif
2228 }
2229
2247 inline int preconditionEdgeStars() override {
2248
2249#ifndef TTK_ENABLE_KAMIKAZE
2250 if(isEmptyCheck())
2251 return -1;
2252#endif
2254 }
2255
2273 inline int preconditionEdgeTriangles() override {
2274
2275#ifndef TTK_ENABLE_KAMIKAZE
2276 if(isEmptyCheck())
2277 return -1;
2278#endif
2279
2281 }
2282
2300 inline int preconditionTriangles() override {
2301
2302#ifndef TTK_ENABLE_KAMIKAZE
2303 if(isEmptyCheck())
2304 return -1;
2305#endif
2307 }
2308
2326 inline int preconditionTriangleEdges() override {
2327
2328#ifndef TTK_ENABLE_KAMIKAZE
2329 if(isEmptyCheck())
2330 return -1;
2331#endif
2333 }
2334
2352 inline int preconditionTriangleLinks() override {
2353
2354#ifndef TTK_ENABLE_KAMIKAZE
2355 if(isEmptyCheck())
2356 return -1;
2357#endif
2359 }
2360
2378 inline int preconditionTriangleStars() override {
2379
2380#ifndef TTK_ENABLE_KAMIKAZE
2381 if(isEmptyCheck())
2382 return -1;
2383#endif
2384
2386 }
2387
2405 inline int preconditionVertexEdges() override {
2406
2407#ifndef TTK_ENABLE_KAMIKAZE
2408 if(isEmptyCheck())
2409 return -1;
2410#endif
2411
2413 }
2414
2425 inline int getCellVTKID(const int &ttkId, int &vtkId) const override {
2426
2427#ifndef TTK_ENABLE_KAMIKAZE
2428 if(isEmptyCheck())
2429 return -1;
2430#endif
2431
2432 return abstractTriangulation_->getCellVTKID(ttkId, vtkId);
2433 }
2434
2435#ifdef TTK_ENABLE_MPI
2453 inline int preconditionDistributedVertices() override {
2454
2455#ifndef TTK_ENABLE_KAMIKAZE
2456 if(isEmptyCheck())
2457 return -1;
2458#endif
2459 return abstractTriangulation_->preconditionDistributedVertices();
2460 }
2461
2462 inline int preconditionEdgeRankArray() override {
2463
2464#ifndef TTK_ENABLE_KAMIKAZE
2465 if(isEmptyCheck())
2466 return -1;
2467#endif
2468 return abstractTriangulation_->preconditionEdgeRankArray();
2469 }
2470
2471 inline int preconditionTriangleRankArray() override {
2472
2473#ifndef TTK_ENABLE_KAMIKAZE
2474 if(isEmptyCheck())
2475 return -1;
2476#endif
2477 return abstractTriangulation_->preconditionTriangleRankArray();
2478 }
2479
2480 inline int setVertexRankArray(const int *rankArray) override {
2481 return abstractTriangulation_->setVertexRankArray(rankArray);
2482 }
2483
2484 inline int setCellRankArray(const int *rankArray) override {
2485 return abstractTriangulation_->setCellRankArray(rankArray);
2486 }
2487
2498
2499 inline int preconditionGlobalBoundary() override {
2500#ifndef TTK_ENABLE_KAMIKAZE
2501 if(isEmptyCheck())
2502 return -1;
2503#endif
2504 return abstractTriangulation_->preconditionGlobalBoundary();
2505 }
2517 inline int preconditionDistributedCells() override {
2518
2519#ifndef TTK_ENABLE_KAMIKAZE
2520 if(isEmptyCheck())
2521 return -1;
2522#endif
2523 return abstractTriangulation_->preconditionDistributedCells();
2524 }
2525
2541 inline int preconditionExchangeGhostCells() override {
2542
2543#ifndef TTK_ENABLE_KAMIKAZE
2544 if(isEmptyCheck())
2545 return -1;
2546#endif
2547 return abstractTriangulation_->preconditionExchangeGhostCells();
2548 }
2549
2565 inline int preconditionExchangeGhostVertices() override {
2566
2567#ifndef TTK_ENABLE_KAMIKAZE
2568 if(isEmptyCheck())
2569 return -1;
2570#endif
2571 return abstractTriangulation_->preconditionExchangeGhostVertices();
2572 }
2573#endif // TTK_ENABLE_MPI
2574
2592 inline int preconditionVertexLinks() override {
2593
2594#ifndef TTK_ENABLE_KAMIKAZE
2595 if(isEmptyCheck())
2596 return -1;
2597#endif
2598
2600 }
2601
2619 inline int preconditionVertexNeighbors() override {
2620
2621#ifndef TTK_ENABLE_KAMIKAZE
2622 if(isEmptyCheck())
2623 return -1;
2624#endif
2626 }
2627
2645 inline int preconditionVertexStars() override {
2646
2647#ifndef TTK_ENABLE_KAMIKAZE
2648 if(isEmptyCheck())
2649 return -1;
2650#endif
2651
2653 }
2654
2672 inline int preconditionVertexTriangles() override {
2673
2674#ifndef TTK_ENABLE_KAMIKAZE
2675 if(isEmptyCheck())
2676 return -1;
2677#endif
2679 }
2680
2682 inline int setDebugLevel(const int &debugLevel) override {
2689 debugLevel_ = debugLevel;
2690 return 0;
2691 }
2692
2693 // Set the cache size
2694 inline int setCacheSize(const float &ratio) {
2697 }
2698 return 0;
2699 }
2700
2701#ifdef TTK_CELL_ARRAY_NEW
2721 inline int setInputCells(const SimplexId &cellNumber,
2722 const LongSimplexId *connectivity,
2723 const LongSimplexId *offset) {
2727 cellNumber, connectivity, offset);
2728 }
2729
2730 inline int setStellarInputCells(const SimplexId &cellNumber,
2731 const LongSimplexId *connectivity,
2732 const LongSimplexId *offset) {
2736 cellNumber, connectivity, offset);
2737 }
2738#else
2759 inline int setInputCells(const SimplexId &cellNumber,
2760 const LongSimplexId *cellArray) {
2763 return explicitTriangulation_.setInputCells(cellNumber, cellArray);
2764 }
2765
2766 inline int setStellarInputCells(const SimplexId &cellNumber,
2767 const LongSimplexId *cellArray) {
2768
2771
2772 return compactTriangulation_.setInputCells(cellNumber, cellArray);
2773 }
2774#endif
2795 inline int setInputGrid(const float &xOrigin,
2796 const float &yOrigin,
2797 const float &zOrigin,
2798 const float &xSpacing,
2799 const float &ySpacing,
2800 const float &zSpacing,
2801 const SimplexId &xDim,
2802 const SimplexId &yDim,
2803 const SimplexId &zDim) {
2804 gridDimensions_[0] = xDim;
2805 gridDimensions_[1] = yDim;
2806 gridDimensions_[2] = zDim;
2807
2808 int ret{};
2809
2811 xOrigin, yOrigin, zOrigin, xSpacing, ySpacing, zSpacing, xDim, yDim,
2812 zDim);
2814 xOrigin, yOrigin, zOrigin, xSpacing, ySpacing, zSpacing, xDim, yDim,
2815 zDim);
2816 ret |= implicitTriangulation_.setInputGrid(xOrigin, yOrigin, zOrigin,
2817 xSpacing, ySpacing, zSpacing,
2818 xDim, yDim, zDim);
2820 xOrigin, yOrigin, zOrigin, xSpacing, ySpacing, zSpacing, xDim, yDim,
2821 zDim);
2822 const auto useImplicitPreconditions = this->processImplicitStrategy();
2823
2824 this->switchGrid(this->hasPeriodicBoundaries_, useImplicitPreconditions);
2825 return ret;
2826 }
2827
2832 inline void
2833 setPeriodicBoundaryConditions(const bool &usePeriodicBoundaries) {
2834
2839 if(usePeriodicBoundaries == hasPeriodicBoundaries_) {
2840 return;
2841 }
2842 const auto hasPreconditions{this->hasImplicitPreconditions()};
2843
2844 this->switchGrid(usePeriodicBoundaries, hasPreconditions);
2845
2846 // reset hasPreconditioned boolean
2848 // but don't forget to set hasPeriodicBoundaries_
2849 hasPeriodicBoundaries_ = usePeriodicBoundaries;
2850 }
2851 }
2852
2857 inline void setImplicitPreconditions(const STRATEGY strategy) {
2862
2863 const auto useImplicitPreconditions
2864 = this->processImplicitStrategy(strategy);
2865
2866 if(useImplicitPreconditions == this->hasImplicitPreconditions()) {
2867 return;
2868 }
2869 const auto isPeriodic{this->hasPeriodicBoundaries_};
2870
2871 this->switchGrid(isPeriodic, useImplicitPreconditions);
2872
2873 // reset hasPreconditioned boolean
2875 // but don't forget to set hasImplicitPreconditions_
2876 hasPeriodicBoundaries_ = isPeriodic;
2877 }
2878 }
2879
2898 inline int setInputPoints(const SimplexId &pointNumber,
2899 const void *pointSet,
2900 const bool &doublePrecision = false) {
2901
2905 pointNumber, pointSet, doublePrecision);
2906 }
2907
2908 inline int setStellarInputPoints(const SimplexId &pointNumber,
2909 const void *pointSet,
2910 const int *indexArray,
2911 const bool &doublePrecision = false) {
2912
2916 pointNumber, pointSet, indexArray, doublePrecision);
2917 }
2918
2920 inline int setThreadNumber(const ThreadId threadNumber) override {
2927 threadNumber_ = threadNumber;
2928 return 0;
2929 }
2930
2933 inline int setWrapper(const Wrapper *wrapper) override {
2940 return 0;
2941 }
2942
2948
2949#ifdef TTK_ENABLE_MPI
2950
2951 // GlobalPointIds, GlobalCellIds (only for ExplicitTriangulation)
2952
2953 inline void setVertsGlobalIds(const LongSimplexId *data) {
2954 this->explicitTriangulation_.setVertsGlobalIds(data);
2955 }
2956 inline void setCellsGlobalIds(const LongSimplexId *const data) {
2957 this->explicitTriangulation_.setCellsGlobalIds(data);
2958 }
2959
2960 // "vtkGhostType" on vertices & cells
2961
2962 inline void setVertexGhostArray(const unsigned char *data) {
2963 this->abstractTriangulation_->setVertexGhostArray(data);
2964 }
2965 inline void setCellGhostArray(const unsigned char *data) {
2966 this->abstractTriangulation_->setCellGhostArray(data);
2967 }
2968
2969 inline bool getIsMPIValid() const {
2970 return isMPIValid_;
2971 }
2972
2973 inline void setIsMPIValid(bool flag) {
2974 isMPIValid_ = flag;
2975 }
2976#endif // TTK_ENABLE_MPI
2977
2978 protected:
2979#ifdef TTK_ENABLE_MPI
2980 bool isMPIValid_{true};
2981#endif
2982 inline bool isEmptyCheck() const {
2984 printErr("Trying to access an empty data-structure!");
2985 return true;
2986 }
2987 return false;
2988 }
2989
2996 bool processImplicitStrategy(const STRATEGY strategy
2997 = STRATEGY::DEFAULT) const;
2998
3005 void switchGrid(const bool usePeriodic, const bool usePreconditions);
3006
3014 };
3015} // namespace ttk
AbstractTriangulation is an interface class that defines an interface for efficient traversal methods...
virtual const std::vector< std::vector< SimplexId > > * getVertexNeighbors()
virtual int getVertexPoint(const SimplexId &vertexId, float &x, float &y, float &z) const
virtual int getEdgeLink(const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) const
virtual SimplexId getVertexTriangleNumber(const SimplexId &vertexId) const
virtual const std::vector< std::vector< SimplexId > > * getCellNeighbors()
virtual int getVertexTriangle(const SimplexId &vertexId, const int &localTriangleId, SimplexId &triangleId) const
virtual int getVertexEdge(const SimplexId &vertexId, const int &localEdgeId, SimplexId &edgeId) const
int getCellIncenter(const SimplexId cellid, const int dim, float incenter[3]) const
virtual SimplexId getEdgeTriangleNumber(const SimplexId &edgeId) const
virtual bool isTriangleOnBoundary(const SimplexId &triangleId) const
virtual const std::vector< std::vector< SimplexId > > * getVertexStars()
virtual const std::vector< std::vector< SimplexId > > * getEdgeStars()
virtual const std::vector< std::vector< SimplexId > > * getVertexLinks()
virtual const std::vector< std::vector< SimplexId > > * getVertexTriangles()
virtual int getTriangleStar(const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const
virtual SimplexId getVertexNeighborNumber(const SimplexId &vertexId) const
virtual int getEdgeTriangle(const SimplexId &edgeId, const int &localTriangleId, SimplexId &triangleId) const
virtual int getEdgeVertex(const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const
virtual const std::vector< std::array< SimplexId, 2 > > * getEdges()
virtual int getTriangleEdge(const SimplexId &triangleId, const int &localEdgeId, SimplexId &edgeId) const
virtual SimplexId getTriangleLinkNumber(const SimplexId &triangleId) const
virtual bool isVertexOnBoundary(const SimplexId &vertexId) const
virtual const std::vector< std::vector< SimplexId > > * getTriangleLinks()
virtual SimplexId getCellEdgeNumber(const SimplexId &cellId) const
virtual bool isEdgeOnBoundary(const SimplexId &edgeId) const
virtual const std::vector< std::vector< SimplexId > > * getEdgeTriangles()
virtual const std::vector< std::array< SimplexId, 3 > > * getTriangles()
virtual int getTriangleLink(const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const
virtual const std::vector< std::vector< SimplexId > > * getEdgeLinks()
virtual SimplexId getNumberOfCells() const
virtual SimplexId getCellTriangleNumber(const SimplexId &cellId) const
virtual SimplexId getNumberOfVertices() const
virtual SimplexId getCellNeighborNumber(const SimplexId &cellId) const
virtual int getDimensionality() const
virtual int getCellEdge(const SimplexId &cellId, const int &localEdgeId, SimplexId &edgeId) const
virtual int getEdgeStar(const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const
virtual int getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const
virtual SimplexId getEdgeLinkNumber(const SimplexId &edgeId) const
virtual const std::vector< std::vector< SimplexId > > * getVertexEdges()
virtual int getVertexStar(const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const
virtual SimplexId getTriangleStarNumber(const SimplexId &triangleId) const
virtual int getCellVertex(const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const
virtual SimplexId getCellVertexNumber(const SimplexId &cellId) const
int getTriangleIncenter(const SimplexId triangleId, float incenter[3]) const
virtual const std::vector< std::vector< SimplexId > > * getTriangleStars()
std::array< SimplexId, 3 > gridDimensions_
virtual SimplexId getNumberOfTriangles() const
virtual int getTriangleVertex(const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const
virtual SimplexId getVertexStarNumber(const SimplexId &vertexId) const
virtual int getCellVTKID(const int &ttkId, int &vtkId) const
int getEdgeIncenter(const SimplexId edgeId, float incenter[3]) const
virtual int getCellTriangle(const SimplexId &cellId, const int &localTriangleId, SimplexId &triangleId) const
virtual const std::vector< std::vector< SimplexId > > * getTriangleEdges()
virtual SimplexId getVertexLinkNumber(const SimplexId &vertexId) const
virtual SimplexId getVertexEdgeNumber(const SimplexId &vertexId) const
virtual SimplexId getNumberOfEdges() const
size_t footprint(size_t size=0) const
virtual const std::vector< std::vector< SimplexId > > * getCellTriangles()
int getTetraIncenter(const SimplexId tetraId, float incenter[3]) const
virtual SimplexId getTriangleEdgeNumber(const SimplexId &triangleId) const
virtual int getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const
virtual int getVertexLink(const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const
virtual SimplexId getEdgeStarNumber(const SimplexId &edgeId) const
virtual const std::vector< std::vector< SimplexId > > * getCellEdges()
virtual int setThreadNumber(const int threadNumber)
Definition BaseClass.h:80
CompactTriangulation is a class implemented based on the TopoCluster data structure,...
int setInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
void initCache(const float ratio=0.2)
int setInputPoints(const SimplexId &pointNumber, const void *pointSet, const int *indexArray, const bool &doublePrecision=false)
int debugLevel_
Definition Debug.h:379
int setWrapper(const Wrapper *wrapper) override
Definition Debug.cpp:155
virtual int setDebugLevel(const int &debugLevel)
Definition Debug.cpp:147
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
Definition Debug.h:149
ExplicitTriangulation is a class that provides time efficient traversal methods on triangulations of ...
int setInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
int setInputPoints(const SimplexId &pointNumber, const void *pointSet, const bool &doublePrecision=false)
Implicit Triangulation class without preconditioning.
int setInputGrid(const float &xOrigin, const float &yOrigin, const float &zOrigin, const float &xSpacing, const float &ySpacing, const float &zSpacing, const SimplexId &xDim, const SimplexId &yDim, const SimplexId &zDim) override
Implicit Triangulation class with preconditioning.
int setInputGrid(const float &xOrigin, const float &yOrigin, const float &zOrigin, const float &xSpacing, const float &ySpacing, const float &zSpacing, const SimplexId &xDim, const SimplexId &yDim, const SimplexId &zDim) override
Periodic implicit Triangulation class without preconditioning.
Periodic implicit Triangulation class with preconditioning.
Triangulation is a class that provides time and memory efficient traversal methods on triangulations ...
const std::vector< std::vector< SimplexId > > * getCellEdges() override
int preconditionVertexNeighbors() override
ImplicitNoPreconditions implicitTriangulation_
int setDebugLevel(const int &debugLevel) override
Tune the debug level (default: 0)
int preconditionEdges() override
const std::vector< std::array< SimplexId, 2 > > * getEdges() override
SimplexId getVertexEdgeNumber(const SimplexId &vertexId) const override
const std::vector< std::vector< SimplexId > > * getEdgeStars() override
int getTriangleEdge(const SimplexId &triangleId, const int &localEdgeId, SimplexId &edgeId) const override
int setStellarInputPoints(const SimplexId &pointNumber, const void *pointSet, const int *indexArray, const bool &doublePrecision=false)
AbstractTriangulation * getData()
int getTriangleVertex(const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const override
int getEdgeLink(const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) const override
SimplexId getVertexStarNumber(const SimplexId &vertexId) const override
int preconditionEdgeStars() override
int preconditionCellNeighbors() override
CompactTriangulation compactTriangulation_
SimplexId getCellNeighborNumber(const SimplexId &cellId) const override
bool isVertexOnBoundary(const SimplexId &vertexId) const override
int setWrapper(const Wrapper *wrapper) override
const std::vector< std::vector< SimplexId > > * getEdgeLinks() override
bool hasImplicitPreconditions() const
Returns true if the grid uses preconditions.
SimplexId getCellEdgeNumber(const SimplexId &cellId) const override
ExplicitTriangulation explicitTriangulation_
int getEdgeTriangle(const SimplexId &edgeId, const int &localTriangleId, SimplexId &triangleId) const override
PeriodicNoPreconditions periodicImplicitTriangulation_
SimplexId getNumberOfEdges() const override
Triangulation::Type getType() const
int preconditionTriangles() override
const std::vector< std::vector< SimplexId > > * getVertexLinks() override
const std::vector< std::vector< SimplexId > > * getVertexEdges() override
const std::vector< std::vector< SimplexId > > * getCellTriangles() override
int preconditionTriangleLinks() override
SimplexId getTriangleLinkNumber(const SimplexId &triangleId) const override
int preconditionVertexEdges() override
int getVertexTriangle(const SimplexId &vertexId, const int &localTriangleId, SimplexId &triangleId) const override
int getCellVertex(const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const override
const std::vector< std::vector< SimplexId > > * getVertexTriangles() override
SimplexId getCellVertexNumber(const SimplexId &cellId) const override
SimplexId getEdgeStarNumber(const SimplexId &edgeId) const override
SimplexId getNumberOfCells() const override
bool isManifold() const override
int getTriangleLink(const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const override
int preconditionVertexLinks() override
~Triangulation() override
int setInputPoints(const SimplexId &pointNumber, const void *pointSet, const bool &doublePrecision=false)
void switchGrid(const bool usePeriodic, const bool usePreconditions)
Switch regular grid triangulation type.
const std::vector< std::vector< SimplexId > > * getTriangleEdges() override
AbstractTriangulation * abstractTriangulation_
int getVertexEdge(const SimplexId &vertexId, const int &localEdgeId, SimplexId &edgeId) const override
int setInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
bool isEdgeOnBoundary(const SimplexId &edgeId) const override
SimplexId getTriangleEdgeNumber(const SimplexId &triangleId) const override
int getEdgeIncenter(SimplexId edgeId, float incenter[3]) const
SimplexId getEdgeLinkNumber(const SimplexId &edgeId) const override
int getVertexPoint(const SimplexId &vertexId, float &x, float &y, float &z) const override
bool processImplicitStrategy(const STRATEGY strategy=STRATEGY::DEFAULT) const
Should we precondition the implicit/periodic triangulations?
int preconditionCellTriangles() override
int setStellarInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
bool isEmpty() const override
PeriodicWithPreconditions periodicPreconditionsTriangulation_
int preconditionBoundaryEdges() override
int getCellEdge(const SimplexId &cellId, const int &localEdgeId, SimplexId &edgeId) const override
int getCellIncenter(SimplexId cellId, int dim, float incenter[3]) const
const std::vector< std::vector< SimplexId > > * getVertexStars() override
int getEdgeVertex(const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const override
const std::vector< std::vector< SimplexId > > * getTriangleStars() override
int preconditionManifold() override
int getVertexStar(const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const override
SimplexId getCellTriangleNumber(const SimplexId &cellId) const override
int getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const override
int preconditionTriangleStars() override
SimplexId getVertexLinkNumber(const SimplexId &vertexId) const override
const std::vector< std::vector< SimplexId > > * getEdgeTriangles() override
size_t footprint() const
SimplexId getTriangleStarNumber(const SimplexId &triangleId) const override
ImplicitWithPreconditions implicitPreconditionsTriangulation_
int getTetraIncenter(SimplexId tetraId, float incenter[3]) const
int preconditionCellEdges() override
int getTriangleStar(const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const override
int getDimensionality() const override
int preconditionVertexStars() override
SimplexId getVertexTriangleNumber(const SimplexId &vertexId) const override
SimplexId getEdgeTriangleNumber(const SimplexId &edgeId) const override
bool isEmptyCheck() const
int preconditionEdgeTriangles() override
int preconditionBoundaryTriangles() override
void setPeriodicBoundaryConditions(const bool &usePeriodicBoundaries)
int setInputGrid(const float &xOrigin, const float &yOrigin, const float &zOrigin, const float &xSpacing, const float &ySpacing, const float &zSpacing, const SimplexId &xDim, const SimplexId &yDim, const SimplexId &zDim)
int getCellTriangle(const SimplexId &cellId, const int &localTriangleId, SimplexId &triangleId) const override
int getEdgeStar(const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const override
int getTriangleIncenter(SimplexId triangleId, float incenter[3]) const
int preconditionEdgeLinks() override
const std::vector< std::array< SimplexId, 3 > > * getTriangles() override
const std::vector< std::vector< SimplexId > > * getVertexNeighbors() override
int setThreadNumber(const ThreadId threadNumber) override
Tune the number of active threads (default: number of logical cores)
const std::vector< std::vector< SimplexId > > * getCellNeighbors() override
int getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const override
int preconditionVertexTriangles() override
const std::vector< std::vector< SimplexId > > * getTriangleLinks() override
Triangulation & operator=(const Triangulation &)
SimplexId getNumberOfVertices() const override
int setCacheSize(const float &ratio)
int preconditionBoundaryVertices() override
SimplexId getNumberOfTriangles() const override
SimplexId getVertexNeighborNumber(const SimplexId &vertexId) const override
int preconditionTriangleEdges() override
int getCellVTKID(const int &ttkId, int &vtkId) const override
bool isTriangleOnBoundary(const SimplexId &triangleId) const override
void setImplicitPreconditions(const STRATEGY strategy)
Set the input grid preconditioning strategy.
int getVertexLink(const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const override
Wrapper class to wrap ttk code.
Definition Wrapper.h:14
The Topology ToolKit.
long long int LongSimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:15
int ThreadId
Identifier type for threads (i.e. with OpenMP).
Definition DataTypes.h:26
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22