36#include <boost/functional/hash.hpp>
37#include <boost/unordered_map.hpp>
38#include <boost/unordered_set.hpp>
47 std::vector<std::array<SimplexId, 2>> internalEdgeList_;
48 std::vector<std::array<SimplexId, 3>> internalTriangleList_;
49 boost::unordered_map<std::array<SimplexId, 2>,
SimplexId> internalEdgeMap_;
50 boost::unordered_map<std::array<SimplexId, 2>,
SimplexId> externalEdgeMap_;
51 boost::unordered_map<std::array<SimplexId, 3>,
SimplexId>
53 boost::unordered_map<std::array<SimplexId, 3>,
SimplexId>
56 std::vector<bool> boundaryVertices_;
57 std::vector<bool> boundaryEdges_;
58 std::vector<bool> boundaryTriangles_;
72 std::vector<std::array<SimplexId, 3>> triangleEdges_;
76 std::vector<std::array<SimplexId, 6>> tetraEdges_;
78 std::vector<std::array<SimplexId, 4>> tetraTriangles_;
92 enum class SIMPLEX_ID { EDGE_ID = 1, TRIANGLE_ID = 2 };
106 const void *pointSet,
107 const int *indexArray,
108 const bool &doublePrecision =
false) {
125#ifdef TTK_CELL_ARRAY_NEW
134 const auto &cellDimension = offset[1] - offset[0] - 1;
136 if(cellDimension < 0 || cellDimension > 3) {
137 this->
printErr(
"Unable to create triangulation for cells of "
138 "dimension 4 or higher ("
139 + std::to_string(cellDimension) +
").");
145#ifdef TTK_ENABLE_OPENMP
146#pragma omp parallel for num_threads(this->threadNumber_)
148 for(
SimplexId i = 0; i < cellNumber; i++) {
149 if(offset[i + 1] - offset[i] - 1 != cellDimension) {
150#ifdef TTK_ENABLE_OPENMP
151#pragma omp atomic write
158 this->
printErr(
"Unable to create triangulation for "
159 "inhomogeneous\ncell dimensions.");
171 reorderCells(vertexMap, cellNumber, connectivity, offset);
173 = std::make_shared<CellArray>(connectivity, offset, cellNumber);
203 cellArray, cellNumber, cellArray[0] - 1);
218 int reorderCells(
const std::vector<SimplexId> &vertexMap,
226 int reorderCells(
const std::vector<SimplexId> &vertexMap,
230 const int &localEdgeId,
233#ifndef TTK_ENABLE_KAMIKAZE
238 if(localEdgeId < 0) {
247 if(exnode->tetraEdges_.empty()) {
251 if(localEdgeId >= (
int)(exnode->tetraEdges_)[localCellId].size()) {
254 edgeId = (exnode->tetraEdges_)[localCellId][localEdgeId];
262#ifndef TTK_ENABLE_KAMIKAZE
271 inline const std::vector<std::vector<SimplexId>> *
277 if(exnode->tetraEdges_.empty()) {
280 for(
size_t i = 0; i < exnode->tetraEdges_.size(); i++) {
282 exnode->tetraEdges_.at(i).end());
291 const int &localNeighborId,
294#ifndef TTK_ENABLE_KAMIKAZE
299 if(localNeighborId < 0) {
308 if(exnode->cellNeighbors_.
empty()) {
312 if(localNeighborId >= exnode->cellNeighbors_.
size(localCellId)) {
315 neighborId = exnode->cellNeighbors_.
get(localCellId, localNeighborId);
321 const SimplexId &cellId)
const override {
323#ifndef TTK_ENABLE_KAMIKAZE
331 if(exnode->cellNeighbors_.
empty()) {
334 return exnode->cellNeighbors_.
size(localCellId);
337 inline const std::vector<std::vector<SimplexId>> *
341 std::vector<std::vector<SimplexId>> localCellNeighbors;
343 if(exnode->cellNeighbors_.
empty()) {
346 exnode->cellNeighbors_.
copyTo(localCellNeighbors);
348 localCellNeighbors.begin(),
349 localCellNeighbors.end());
355 const int &localTriangleId,
358#ifndef TTK_ENABLE_KAMIKAZE
363 if((localTriangleId < 0)
373 if(exnode->tetraTriangles_.empty()) {
376 triangleId = (exnode->tetraTriangles_)[localCellId][localTriangleId];
383#ifndef TTK_ENABLE_KAMIKAZE
392 inline const std::vector<std::vector<SimplexId>> *
398 if(exnode->tetraTriangles_.empty()) {
401 for(
size_t i = 0; i < exnode->tetraTriangles_.size(); i++) {
403 exnode->tetraTriangles_.at(i).begin(),
404 exnode->tetraTriangles_.at(i).end());
413 const int &localVertexId,
416#ifndef TTK_ENABLE_KAMIKAZE
421 if((localVertexId < 0)
422 || (localVertexId >=
cellArray_->getCellVertexNumber(cellId))) {
428 vertexId =
cellArray_->getCellVertex(cellId, localVertexId);
433 const SimplexId &cellId)
const override {
435#ifndef TTK_ENABLE_KAMIKAZE
440 return cellArray_->getCellVertexNumber(cellId);
447 inline const std::vector<std::array<SimplexId, 2>> *
452 if(exnode->internalEdgeList_.empty())
455 exnode->internalEdgeList_.end());
462 const int &localLinkId,
465#ifndef TTK_ENABLE_KAMIKAZE
470 if(localLinkId < 0) {
479 if(exnode->edgeLinks_.
empty()) {
483 if(localLinkId >= exnode->edgeLinks_.
size(localEdgeId)) {
486 linkId = exnode->edgeLinks_.
get(localEdgeId, localLinkId);
492 const SimplexId &edgeId)
const override {
494#ifndef TTK_ENABLE_KAMIKAZE
502 if(exnode->edgeLinks_.
empty()) {
505 return exnode->edgeLinks_.
size(localEdgeId);
508 inline const std::vector<std::vector<SimplexId>> *
512 std::vector<std::vector<SimplexId>> localEdgeLinks;
514 if(exnode->edgeLinks_.
empty()) {
517 exnode->edgeLinks_.
copyTo(localEdgeLinks);
519 edgeLinkList_.end(), localEdgeLinks.begin(), localEdgeLinks.end());
526 const int &localStarId,
529#ifndef TTK_ENABLE_KAMIKAZE
534 if(localStarId < 0) {
543 if(exnode->edgeStars_.
empty()) {
547 if(localStarId >= exnode->edgeStars_.
size(localEdgeId)) {
550 starId = exnode->edgeStars_.
get(localEdgeId, localStarId);
556 const SimplexId &edgeId)
const override {
558#ifndef TTK_ENABLE_KAMIKAZE
565 if(exnode->edgeStars_.
empty()) {
568 return exnode->edgeStars_.
size(localEdgeId);
571 inline const std::vector<std::vector<SimplexId>> *
575 std::vector<std::vector<SimplexId>> localEdgeStars;
577 if(exnode->edgeStars_.
empty()) {
580 exnode->edgeStars_.
copyTo(localEdgeStars);
582 edgeStarList_.end(), localEdgeStars.begin(), localEdgeStars.end());
588 const int &localTriangleId,
591#ifndef TTK_ENABLE_KAMIKAZE
596 if(localTriangleId < 0) {
605 if(exnode->edgeTriangles_.
empty()) {
609 if(localTriangleId >= exnode->edgeTriangles_.
size(localEdgeId)) {
612 triangleId = exnode->edgeTriangles_.
get(localEdgeId, localTriangleId);
620#ifndef TTK_ENABLE_KAMIKAZE
628 if(exnode->edgeTriangles_.
empty()) {
631 return exnode->edgeTriangles_.
size(localEdgeId);
634 inline const std::vector<std::vector<SimplexId>> *
638 std::vector<std::vector<SimplexId>> localEdgeTriangles;
640 if(exnode->edgeTriangles_.
empty()) {
643 exnode->edgeTriangles_.
copyTo(localEdgeTriangles);
645 localEdgeTriangles.begin(),
646 localEdgeTriangles.end());
652 const int &localVertexId,
655#ifndef TTK_ENABLE_KAMIKAZE
660 if((localVertexId != 0) && (localVertexId != 1)) {
669 if(exnode->internalEdgeList_.empty()) {
674 vertexId = exnode->internalEdgeList_.at(localEdgeId)[1];
676 vertexId = exnode->internalEdgeList_.at(localEdgeId)[0];
688#ifndef TTK_ENABLE_KAMIKAZE
698#ifndef TTK_ENABLE_KAMIKAZE
711 inline const std::vector<std::array<SimplexId, 3>> *
725 if(exnode->internalTriangleList_.empty()) {
729 exnode->internalTriangleList_.begin(),
730 exnode->internalTriangleList_.end());
737 const int &localEdgeId,
740#ifndef TTK_ENABLE_KAMIKAZE
745 if((localEdgeId < 0) || (localEdgeId > 2)) {
754 if(exnode->triangleEdges_.empty()) {
757 edgeId = (exnode->triangleEdges_)[localTriangleId][localEdgeId];
762 const SimplexId &triangleId)
const override {
763#ifndef TTK_ENABLE_KAMIKAZE
772 inline const std::vector<std::vector<SimplexId>> *
778 if(exnode->triangleEdges_.empty()) {
781 for(
size_t i = 0; i < exnode->triangleEdges_.size(); i++) {
783 exnode->triangleEdges_.at(i).begin(),
784 exnode->triangleEdges_.at(i).end());
793 const int &localLinkId,
796#ifndef TTK_ENABLE_KAMIKAZE
801 if(localLinkId < 0) {
810 if(exnode->triangleLinks_.
empty()) {
814 if(localLinkId >= exnode->triangleLinks_.
size(localTriangleId)) {
817 linkId = exnode->triangleLinks_.
get(localTriangleId, localLinkId);
823 const SimplexId &triangleId)
const override {
825#ifndef TTK_ENABLE_KAMIKAZE
833 if(exnode->triangleLinks_.
empty()) {
836 return exnode->triangleLinks_.
size(localTriangleId);
839 inline const std::vector<std::vector<SimplexId>> *
843 std::vector<std::vector<SimplexId>> localTriangleLinks;
845 if(exnode->triangleLinks_.
empty()) {
848 exnode->triangleLinks_.
copyTo(localTriangleLinks);
850 localTriangleLinks.begin(),
851 localTriangleLinks.end());
858 const int &localStarId,
861#ifndef TTK_ENABLE_KAMIKAZE
867 if(localStarId < 0) {
876 if(exnode->triangleStars_.
empty()) {
880 if(localStarId >= exnode->triangleStars_.
size(localTriangleId)) {
883 starId = exnode->triangleStars_.
get(localTriangleId, localStarId);
889 const SimplexId &triangleId)
const override {
891#ifndef TTK_ENABLE_KAMIKAZE
900 if(exnode->triangleStars_.
empty()) {
903 return exnode->triangleStars_.
size(localTriangleId);
906 inline const std::vector<std::vector<SimplexId>> *
910 std::vector<std::vector<SimplexId>> localTriangleStars;
912 if(exnode->triangleStars_.
empty()) {
916 localTriangleStars.begin(),
917 localTriangleStars.end());
923 const int &localVertexId,
926#ifndef TTK_ENABLE_KAMIKAZE
931 if((localVertexId < 0) || (localVertexId > 2)) {
940 if(exnode->internalTriangleList_.empty()) {
944 = exnode->internalTriangleList_.at(localTriangleId)[localVertexId];
949 const int &localEdgeId,
952#ifndef TTK_ENABLE_KAMIKAZE
957 if(localEdgeId < 0) {
966 if(exnode->vertexEdges_.
empty()) {
969 if(localEdgeId >= exnode->vertexEdges_.
size(localVertexId)) {
972 edgeId = exnode->vertexEdges_.
get(localVertexId, localEdgeId);
980#ifndef TTK_ENABLE_KAMIKAZE
988 if(exnode->vertexEdges_.
empty()) {
991 return exnode->vertexEdges_.
size(localVertexId);
994 inline const std::vector<std::vector<SimplexId>> *
998 std::vector<std::vector<SimplexId>> localVertexEdges;
1000 if(exnode->vertexEdges_.
empty()) {
1003 exnode->vertexEdges_.
copyTo(localVertexEdges);
1005 localVertexEdges.end());
1013 const int &localLinkId,
1016#ifndef TTK_ENABLE_KAMIKAZE
1021 if(localLinkId < 0) {
1030 if(exnode->vertexLinks_.
empty()) {
1033 if(localLinkId >= exnode->vertexLinks_.
size(localVertexId)) {
1036 linkId = exnode->vertexLinks_.
get(localVertexId, localLinkId);
1042 const SimplexId &vertexId)
const override {
1044#ifndef TTK_ENABLE_KAMIKAZE
1052 if(exnode->vertexLinks_.
empty()) {
1055 return exnode->vertexLinks_.
size(localVertexId);
1058 inline const std::vector<std::vector<SimplexId>> *
1062 std::vector<std::vector<SimplexId>> localVertexLinks;
1064 if(exnode->vertexLinks_.
empty()) {
1067 exnode->vertexLinks_.
copyTo(localVertexLinks);
1069 localVertexLinks.end());
1076 const int &localNeighborId,
1078#ifndef TTK_ENABLE_KAMIKAZE
1083 if(localNeighborId < 0) {
1092 if(exnode ==
nullptr) {
1095 if(exnode->vertexNeighbors_.
empty()) {
1098 if(localNeighborId >= exnode->vertexNeighbors_.
size(localVertexId)) {
1102 = exnode->vertexNeighbors_.
get(localVertexId, localNeighborId);
1108 const SimplexId &vertexId)
const override {
1110#ifndef TTK_ENABLE_KAMIKAZE
1118 if(exnode->vertexNeighbors_.
empty()) {
1121 return exnode->vertexNeighbors_.
size(localVertexId);
1124 inline const std::vector<std::vector<SimplexId>> *
1128 std::vector<std::vector<SimplexId>> localVertexNeighbors;
1130 if(exnode->vertexNeighbors_.
empty()) {
1133 exnode->vertexNeighbors_.
copyTo(localVertexNeighbors);
1135 localVertexNeighbors.begin(),
1136 localVertexNeighbors.end());
1142 const SimplexId &vertexId,
float &x,
float &y,
float &z)
const override {
1144#ifndef TTK_ENABLE_KAMIKAZE
1150 x = ((
const double *)
pointSet_)[3 * vertexId];
1151 y = ((
const double *)
pointSet_)[3 * vertexId + 1];
1152 z = ((
const double *)
pointSet_)[3 * vertexId + 2];
1154 x = ((
const float *)
pointSet_)[3 * vertexId];
1155 y = ((
const float *)
pointSet_)[3 * vertexId + 1];
1156 z = ((
const float *)
pointSet_)[3 * vertexId + 2];
1164 const int &localStarId,
1167#ifndef TTK_ENABLE_KAMIKAZE
1172 if(localStarId < 0) {
1181 if(exnode->vertexStars_.
empty()) {
1184 if(localStarId >= exnode->vertexStars_.
size(localVertexId)) {
1187 starId = exnode->vertexStars_.
get(localVertexId, localStarId);
1193 const SimplexId &vertexId)
const override {
1195#ifndef TTK_ENABLE_KAMIKAZE
1203 if(exnode->vertexStars_.
empty()) {
1206 return exnode->vertexStars_.
size(localVertexId);
1209 inline const std::vector<std::vector<SimplexId>> *
1213 std::vector<std::vector<SimplexId>> localVertexStars;
1215 if(exnode->vertexStars_.
empty()) {
1218 exnode->vertexStars_.
copyTo(localVertexStars);
1220 localVertexStars.end());
1226 const int &localTriangleId,
1229#ifndef TTK_ENABLE_KAMIKAZE
1234 if(localTriangleId < 0) {
1243 if(exnode->vertexTriangles_.
empty()) {
1246 if(localTriangleId >= exnode->vertexTriangles_.
size(localVertexId)) {
1250 = exnode->vertexTriangles_.
get(localVertexId, localTriangleId);
1256 const SimplexId &vertexId)
const override {
1258#ifndef TTK_ENABLE_KAMIKAZE
1266 if(exnode->vertexTriangles_.
empty()) {
1269 return exnode->vertexTriangles_.
size(localVertexId);
1272 inline const std::vector<std::vector<SimplexId>> *
1276 std::vector<std::vector<SimplexId>> localVertexTriangles;
1278 if(exnode->vertexTriangles_.
empty()) {
1281 exnode->vertexTriangles_.
copyTo(localVertexTriangles);
1283 localVertexTriangles.begin(),
1284 localVertexTriangles.end());
1290 const SimplexId &edgeId)
const override {
1291#ifndef TTK_ENABLE_KAMIKAZE
1299 return (exnode->boundaryEdges_)[localedgeId];
1307 const SimplexId &triangleId)
const override {
1311#ifndef TTK_ENABLE_KAMIKAZE
1319 return (exnode->boundaryTriangles_)[localtriangleId];
1323 const SimplexId &vertexId)
const override {
1324#ifndef TTK_ENABLE_KAMIKAZE
1332 return (exnode->boundaryVertices_)[localVertexId];
1366#ifndef TTK_ENABLE_KAMIKAZE
1381 std::vector<SimplexId> edgeCount(
nodeNumber_ + 1);
1383#ifdef TTK_ENABLE_OPENMP
1384#pragma omp parallel for num_threads(threadNumber_)
1394 this->
printMsg(
"Edges preconditioned in "
1414#ifndef TTK_ENABLE_KAMIKAZE
1430 std::vector<SimplexId> triangleCount(
nodeNumber_ + 1);
1431#ifdef TTK_ENABLE_OPENMP
1432#pragma omp parallel for num_threads(threadNumber_)
1443 this->
printMsg(
"Triangles preconditioned in "
1472 this->
printErr(
"Unsupported dimension for vertex link precondition");
1484#ifndef TTK_ENABLE_KAMIKAZE
1554 const std::vector<SimplexId> *intervals =
nullptr;
1556 if(
idType == SIMPLEX_ID::EDGE_ID) {
1558 }
else if(
idType == SIMPLEX_ID::TRIANGLE_ID) {
1564 std::vector<SimplexId>::const_iterator low
1565 = lower_bound(intervals->begin(), intervals->end(),
id);
1566 return (low - intervals->begin());
1575#ifdef TTK_ENABLE_OPENMP
1576 threadId = omp_get_thread_num();
1582 if(
caches_[threadId].back().nid == reservedId) {
1598 bool computeInternalEdgeList,
1599 bool computeInternalEdgeMap)
const;
1609 bool computeInternalTriangleList,
1610 bool computeInternalTriangleMap)
const;
1722 mutable std::vector<std::list<ImplicitCluster>>
caches_;
1723 mutable std::vector<
1724 boost::unordered_map<SimplexId, std::list<ImplicitCluster>::iterator>>
#define TTK_TRIANGULATION_INTERNAL(NAME)
AbstractTriangulation is an interface class that defines an interface for efficient traversal methods...
std::vector< std::vector< SimplexId > > vertexStarList_
std::vector< std::array< SimplexId, 3 > > triangleList_
std::vector< std::vector< SimplexId > > triangleLinkList_
std::vector< std::vector< SimplexId > > vertexNeighborList_
std::vector< std::vector< SimplexId > > vertexLinkList_
std::vector< std::vector< SimplexId > > edgeLinkList_
std::vector< std::vector< SimplexId > > vertexEdgeList_
virtual int preconditionEdges()
std::vector< std::vector< SimplexId > > triangleEdgeVector_
std::vector< std::vector< SimplexId > > triangleStarList_
virtual SimplexId getCellTriangleNumber(const SimplexId &cellId) const
std::vector< std::vector< SimplexId > > cellNeighborList_
std::vector< std::array< SimplexId, 2 > > edgeList_
std::vector< std::vector< SimplexId > > edgeStarList_
virtual int preconditionTriangles()
std::vector< std::vector< SimplexId > > vertexTriangleList_
std::vector< std::vector< SimplexId > > cellEdgeVector_
std::vector< std::vector< SimplexId > > cellTriangleVector_
std::vector< std::vector< SimplexId > > edgeTriangleList_
CompactTriangulation is a class implemented based on the TopoCluster data structure,...
int setInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
SimplexId findNodeIndex(SimplexId id, SIMPLEX_ID idType) const
void initCache(const float ratio=0.2)
int preconditionCellEdgesInternal() override
int preconditionVertexLinksInternal() override
int TTK_TRIANGULATION_INTERNAL() getCellVertex(const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const override
int preconditionEdgesInternal() override
int preconditionBoundaryTrianglesInternal() override
int preconditionEdgeLinksInternal() override
int TTK_TRIANGULATION_INTERNAL() getTriangleLink(const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const override
const std::vector< std::vector< SimplexId > > * getCellEdgesInternal() override
int resetCache(int option)
SimplexId getVertexEdgeNumberInternal(const SimplexId &vertexId) const override
int getClusterEdgeStars(ImplicitCluster *const nodePtr) const
int getClusterVertexTriangles(ImplicitCluster *const nodePtr) const
int preconditionBoundaryVerticesInternal() override
SimplexId TTK_TRIANGULATION_INTERNAL() getNumberOfCells() const override
~CompactTriangulation() override
SimplexId getCellTriangleNumberInternal(const SimplexId &cellId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexLinks() override
int getTriangleVertexInternal(const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const override
SimplexId getCellEdgeNumberInternal(const SimplexId &cellId) const override
SimplexId getEdgeTriangleNumberInternal(const SimplexId &edgeId) const override
int getClusterVertexStars(ImplicitCluster *const nodePtr) const
int getClusterTriangleStars(ImplicitCluster *const nodePtr) const
CompactTriangulation & operator=(const CompactTriangulation &rhs)
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getCellNeighbors() override
int TTK_TRIANGULATION_INTERNAL() getVertexLink(const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getCellNeighborNumber(const SimplexId &cellId) const override
SimplexId getVertexTriangleNumberInternal(const SimplexId &vertexId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getCellVertexNumber(const SimplexId &cellId) const override
int TTK_TRIANGULATION_INTERNAL() getEdgeLink(const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getTriangleStars() override
const std::vector< std::array< SimplexId, 2 > > *TTK_TRIANGULATION_INTERNAL() getEdges() override
const std::vector< std::vector< SimplexId > > * getCellTrianglesInternal() override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexNeighbors() override
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexLinkNumber(const SimplexId &vertexId) const override
int preconditionCellTrianglesInternal() override
std::vector< std::vector< SimplexId > > externalCells_
int TTK_TRIANGULATION_INTERNAL() getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const override
int getEdgeVertexInternal(const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const override
int getVertexTriangleInternal(const SimplexId &vertexId, const int &localTriangleId, SimplexId &triangleId) const override
std::vector< SimplexId > cellIntervals_
int countInternalTriangles(SimplexId nodeId) const
int preconditionTriangleEdgesInternal() override
int getClusterTriangleEdges(ImplicitCluster *const nodePtr) const
CompactTriangulation & operator=(CompactTriangulation &&rhs)=default
int getClusterCellTriangles(ImplicitCluster *const nodePtr) const
SimplexId TTK_TRIANGULATION_INTERNAL() getNumberOfVertices() const override
int getBoundaryCells(ImplicitCluster *const nodePtr, const SimplexId dim=2) const
std::vector< boost::unordered_map< SimplexId, std::list< ImplicitCluster >::iterator > > cacheMaps_
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexStars() override
int buildInternalTriangleMap(ImplicitCluster *const nodePtr, bool computeInternalTriangleList, bool computeInternalTriangleMap) const
int getClusterVertexNeighbors(ImplicitCluster *const nodePtr) const
int getClusterVertexEdges(ImplicitCluster *const nodePtr) const
const std::vector< std::vector< SimplexId > > * getTriangleEdgesInternal() override
SimplexId TTK_TRIANGULATION_INTERNAL() getEdgeLinkNumber(const SimplexId &edgeId) const override
std::vector< SimplexId > vertexIntervals_
int preconditionTrianglesInternal() override
int getCellTriangleInternal(const SimplexId &cellId, const int &localTriangleId, SimplexId &triangleId) const override
CompactTriangulation(CompactTriangulation &&rhs)=default
int getTriangleEdgeInternal(const SimplexId &triangleId, const int &localEdgeId, SimplexId &edgeId) const override
int preconditionEdgeStarsInternal() override
int TTK_TRIANGULATION_INTERNAL() getVertexStar(const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const override
const std::vector< std::vector< SimplexId > > * getVertexTrianglesInternal() override
int getClusterEdgeLinks(ImplicitCluster *const nodePtr) const
int preconditionVertexStarsInternal() override
bool TTK_TRIANGULATION_INTERNAL() isTriangleOnBoundary(const SimplexId &triangleId) const override
int buildInternalEdgeMap(ImplicitCluster *const nodePtr, bool computeInternalEdgeList, bool computeInternalEdgeMap) const
int getClusterVertexLinks(ImplicitCluster *const nodePtr) const
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getEdgeLinks() override
int preconditionBoundaryEdgesInternal() override
int getVertexEdgeInternal(const SimplexId &vertexId, const int &localEdgeId, SimplexId &edgeId) const override
int preconditionCellNeighborsInternal() override
const std::vector< std::vector< SimplexId > > * getVertexEdgesInternal() override
std::vector< SimplexId > edgeIntervals_
int getEdgeTriangleInternal(const SimplexId &edgeId, const int &localTriangleId, SimplexId &triangleId) const override
const int * vertexIndices_
int reorderVertices(std::vector< SimplexId > &vertexMap)
SimplexId TTK_TRIANGULATION_INTERNAL() getTriangleLinkNumber(const SimplexId &triangleId) const override
bool TTK_TRIANGULATION_INTERNAL() isEdgeOnBoundary(const SimplexId &edgeId) const override
int TTK_TRIANGULATION_INTERNAL() getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const override
int preconditionTriangleLinksInternal() override
SimplexId TTK_TRIANGULATION_INTERNAL() getTriangleStarNumber(const SimplexId &triangleId) const override
int reorderCells(const std::vector< SimplexId > &vertexMap, const SimplexId &cellNumber, const LongSimplexId *connectivity, const LongSimplexId *offset)
SimplexId countInternalEdges(SimplexId nodeId) const
int getClusterEdgeTriangles(ImplicitCluster *const nodePtr) const
int preconditionTriangleStarsInternal() override
std::shared_ptr< CellArray > cellArray_
int preconditionVertexTrianglesInternal() override
SimplexId getTriangleEdgeNumberInternal(const SimplexId &triangleId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexStarNumber(const SimplexId &vertexId) const override
std::vector< SimplexId > triangleIntervals_
int buildExternalEdgeMap(ImplicitCluster *const nodePtr) const
const std::vector< std::array< SimplexId, 3 > > *TTK_TRIANGULATION_INTERNAL() getTriangles() override
int setInputPoints(const SimplexId &pointNumber, const void *pointSet, const int *indexArray, const bool &doublePrecision=false)
int getCellEdgeInternal(const SimplexId &cellId, const int &localEdgeId, SimplexId &edgeId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getEdgeStarNumber(const SimplexId &edgeId) const override
int preconditionEdgeTrianglesInternal() override
int getClusterCellNeighbors(ImplicitCluster *const nodePtr) const
int TTK_TRIANGULATION_INTERNAL() getVertexPoint(const SimplexId &vertexId, float &x, float &y, float &z) const override
int preconditionVertexEdgesInternal() override
SimplexId getNumberOfTrianglesInternal() const override
int preconditionVertexNeighborsInternal() override
bool isEmpty() const override
SimplexId getNumberOfEdgesInternal() const override
int getClusterTriangleLinks(ImplicitCluster *const nodePtr) const
std::vector< std::list< ImplicitCluster > > caches_
ImplicitCluster * searchCache(const SimplexId &nodeId, const SimplexId reservedId=0) const
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexNeighborNumber(const SimplexId &vertexId) const override
int TTK_TRIANGULATION_INTERNAL() getDimensionality() const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getTriangleLinks() override
int buildExternalTriangleMap(ImplicitCluster *const nodePtr) const
int TTK_TRIANGULATION_INTERNAL() getTriangleStar(const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const override
const std::vector< std::vector< SimplexId > > * getEdgeTrianglesInternal() override
int getClusterTetraEdges(ImplicitCluster *const nodePtr) const
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getEdgeStars() override
bool TTK_TRIANGULATION_INTERNAL() isVertexOnBoundary(const SimplexId &vertexId) const override
int TTK_TRIANGULATION_INTERNAL() getEdgeStar(const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const override
int printMsg(const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
Replacement for std::vector<std::vector<SimplexId>>
void copyTo(std::vector< std::vector< SimplexId > > &dst, int threadNumber=1) const
Copy buffers to a std::vector<std::vector<SimplexId>>
SimplexId get(SimplexId id, SimplexId local) const
Returns the data inside the sub-vectors.
SimplexId size(SimplexId id) const
Get the size of a particular sub-vector.
bool empty() const
If the underlying buffers are empty.
ImplicitCluster()=default
ImplicitCluster(SimplexId id)
~ImplicitCluster()=default
long long int LongSimplexId
Identifier type for simplices of any dimension.
int ThreadId
Identifier type for threads (i.e. with OpenMP).
int SimplexId
Identifier type for simplices of any dimension.