100 template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
101 inline int execute(
const dataTypeU *
const uField,
102 const dataTypeV *
const vField,
103 const triangulationType &triangulation);
107#ifndef TTK_ENABLE_KAMIKAZE
117#ifndef TTK_ENABLE_KAMIKAZE
128#ifndef TTK_ENABLE_KAMIKAZE
138#ifndef TTK_ENABLE_KAMIKAZE
167 inline const std::vector<FiberSurface::Vertex> *
173 if((jacobiEdgeId < 0)
191 template <
class dataTypeU,
class dataTypeV>
193 perturb(
const dataTypeU *
const uField,
194 const dataTypeV *
const vField,
270 template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
271 inline int simplify(
const dataTypeU *
const uField,
272 const dataTypeV *
const vField,
273 const triangulationType &triangulation,
274 const double &simplificationThreshold,
280 struct ReebSpaceData {
282 double simplificationThreshold_{};
284 std::vector<SimplexId> edge2sheet1_{};
285 std::vector<char> edgeTypes_{};
286 std::vector<SimplexId> tet2sheet3_{};
287 std::vector<SimplexId> vertex2sheet0_{};
288 std::vector<SimplexId> vertex2sheet3_{};
291 std::vector<Sheet0> sheet0List_{};
292 std::vector<Sheet1> sheet1List_{};
293 std::vector<Sheet2> sheet2List_{};
294 std::vector<Sheet3> sheet3List_{};
301 template <
typename triangulationType>
303 const std::vector<std::pair<SimplexId, char>> &jacobiSet,
304 std::vector<std::pair<SimplexId, SimplexId>> &jacobiSetClassification,
305 const triangulationType &triangulation);
307 template <
typename triangulationType>
309 const std::vector<std::pair<SimplexId, char>> &jacobiSet,
310 std::vector<std::pair<SimplexId, SimplexId>> &jacobiSetClassification,
311 const triangulationType &triangulation);
313 template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
315 const std::vector<std::pair<SimplexId, SimplexId>> &jacobiEdges,
316 const dataTypeU *
const uField,
317 const dataTypeV *
const vField,
318 const triangulationType &triangulation);
320 template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
322 const dataTypeV *
const vField,
323 const triangulationType &triangulation);
325 template <
typename triangulationType>
328 const std::vector<std::vector<std::array<SimplexId, 3>>> &tetTriangles,
329 const triangulationType &triangulation);
331 template <
typename triangulationType>
333 std::vector<std::vector<std::array<SimplexId, 3>>> &tetTriangles,
334 const triangulationType &triangulation);
336 template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
339 const dataTypeU *
const uField,
340 const dataTypeV *
const vField,
341 const triangulationType &triangulation);
359 template <
typename triangulationType>
371 template <
typename triangulationType>
376 const triangulationType &triangulation);
386 template <
typename triangulationType>
387 int flush(
const triangulationType &triangulation);
389 template <
typename triangulationType>
392 const triangulationType &triangulation);
400 template <
typename triangulationType>
403 const triangulationType &triangulation);
405 template <
typename triangulationType>
408 const triangulationType &triangulation);
438template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
440 const dataTypeV *
const vField,
441 const triangulationType &triangulation) {
443 flush(triangulation);
446#ifdef TTK_ENABLE_FIBER_SURFACE_WITH_RANGE_OCTREE
449 fiberSurface_.buildOctree<dataTypeU, dataTypeV>(&triangulation);
462 std::vector<std::pair<SimplexId, SimplexId>> jacobiSetClassification;
467 compute2sheets(jacobiSetClassification, uField, vField, triangulation);
470 std::vector<std::vector<std::array<SimplexId, 3>>> tetTriangles;
474 "Data-set processed", 1.0, t.
getElapsedTime(), this->threadNumber_);
481#ifdef TTK_ENABLE_OPENMP
482#pragma omp parallel for num_threads(threadNumber_)
484 for(
size_t i = 0; i <
originalData_.sheet3List_.size(); i++) {
486 originalData_.sheet3List_[i], uField, vField, triangulation);
489 for(
size_t i = 0; i <
originalData_.sheet3List_.size(); i++) {
496 this->threadNumber_);
506template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
508 const std::vector<std::pair<SimplexId, SimplexId>> &jacobiEdges,
509 const dataTypeU *
const uField,
510 const dataTypeV *
const vField,
511 const triangulationType &triangulation) {
516 originalData_.sheet2List_.resize(originalData_.sheet1List_.size());
517 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
518 originalData_.sheet2List_[i].sheet1Id_ = i;
519 originalData_.sheet2List_[i].pruned_ =
false;
520 originalData_.sheet2List_[i].vertexList_.resize(
521 originalData_.sheet1List_[originalData_.sheet2List_[i].sheet1Id_]
523 originalData_.sheet2List_[i].triangleList_.resize(
524 originalData_.sheet1List_[originalData_.sheet2List_[i].sheet1Id_]
526 for(
size_t j = 0; j < originalData_.sheet2List_[i].vertexList_.size();
528 originalData_.sheet2List_[i].vertexList_[j].clear();
529 originalData_.sheet2List_[i].triangleList_[j].clear();
533 fiberSurface_.setGlobalVertexList(&fiberSurfaceVertexList_);
534 fiberSurface_.setPolygonEdgeNumber(jacobiEdges.size());
536 std::vector<SimplexId> edge2polygonEdgeId(edgeNumber_, -1);
537 jacobi2edges_.resize(jacobiEdges.size());
539 for(
size_t i = 0; i < jacobiEdges.size(); i++) {
541 SimplexId const edgeId = jacobiEdges[i].first;
543 edge2polygonEdgeId[edgeId] = i;
544 jacobi2edges_[i] = edgeId;
547#ifdef TTK_ENABLE_OPENMP
548#pragma omp parallel for num_threads(threadNumber_)
550 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
553 j < originalData_.sheet1List_[originalData_.sheet2List_[i].sheet1Id_]
558 = originalData_.sheet1List_[originalData_.sheet2List_[i].sheet1Id_]
561 fiberSurface_.setTriangleList(
562 edge2polygonEdgeId[edgeId],
563 &(originalData_.sheet2List_[i].triangleList_[j]));
564 fiberSurface_.setVertexList(
565 edge2polygonEdgeId[edgeId],
566 &(originalData_.sheet2List_[i].vertexList_[j]));
570#ifdef TTK_ENABLE_OPENMP
571#pragma omp parallel for num_threads(threadNumber_)
573 for(
size_t i = 0; i < jacobiEdges.size(); i++) {
575 SimplexId const edgeId = jacobiEdges[i].first;
577 std::pair<double, double> rangePoint0, rangePoint1;
579 SimplexId vertexId0 = -1, vertexId1 = -1;
580 triangulation.getEdgeVertex(edgeId, 0, vertexId0);
581 triangulation.getEdgeVertex(edgeId, 1, vertexId1);
583 rangePoint0.first = uField[vertexId0];
584 rangePoint0.second = vField[vertexId0];
586 rangePoint1.first = uField[vertexId1];
587 rangePoint1.second = vField[vertexId1];
589 if(originalData_.edgeTypes_[edgeId] == 1) {
590 std::vector<SimplexId> edgeSeeds(
591 triangulation.getEdgeStarNumber(edgeId), -1);
592 for(
size_t j = 0; j < edgeSeeds.size(); j++) {
593 triangulation.getEdgeStar(edgeId, j, edgeSeeds[j]);
596 fiberSurface_.computeContour<dataTypeU, dataTypeV>(
597 rangePoint0, rangePoint1, edgeSeeds, &triangulation,
598 edge2polygonEdgeId[edgeId]);
600#ifdef TTK_ENABLE_FIBER_SURFACE_WITH_RANGE_OCTREE
601 if(withRangeDrivenOctree_) {
602 fiberSurface_.computeSurfaceWithOctree<dataTypeU, dataTypeV>(
603 rangePoint0, rangePoint1, &triangulation, edge2polygonEdgeId[edgeId]);
605 fiberSurface_.computeSurface<dataTypeU, dataTypeV>(
606 rangePoint0, rangePoint1, &triangulation, edge2polygonEdgeId[edgeId]);
609 fiberSurface_.computeSurface<dataTypeU, dataTypeV>(
610 rangePoint0, rangePoint1, edge2polygonEdgeId[edgeId]);
667 "Computed fiber surfaces", 1.0, t.
getElapsedTime(), this->threadNumber_);
672template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
674 const dataTypeU *
const uField,
675 const dataTypeV *
const vField,
676 const triangulationType &triangulation) {
678 this->printWrn(
"Computing chambers' pre-images.");
679 this->printWrn(
"This will take a LONG time.");
684 originalData_.sheet2List_.resize(threadNumber_);
685 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
686 originalData_.sheet2List_[i].sheet1Id_ = i;
687 originalData_.sheet2List_[i].pruned_ =
false;
688 originalData_.sheet2List_[i].vertexList_.resize(1);
689 originalData_.sheet2List_[i].triangleList_.resize(1);
692 fiberSurface_.setGlobalVertexList(&fiberSurfaceVertexList_);
693 fiberSurface_.setTetNumber(tetNumber_);
694 fiberSurface_.setPolygonEdgeNumber(threadNumber_);
696 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
698 fiberSurface_.setTriangleList(
699 i, &(originalData_.sheet2List_[i].triangleList_[0]));
700 fiberSurface_.setVertexList(
701 i, &(originalData_.sheet2List_[i].vertexList_[0]));
704#ifdef TTK_ENABLE_OPENMP
705#pragma omp parallel for num_threads(threadNumber_)
709#ifdef TTK_ENABLE_OPENMP
710 ThreadId threadId = omp_get_thread_num();
717 std::pair<double, double> rangePoint0, rangePoint1;
719 SimplexId vertexId0 = -1, vertexId1 = -1;
720 triangulation.getEdgeVertex(edgeId, 0, vertexId0);
721 triangulation.getEdgeVertex(edgeId, 1, vertexId1);
723 rangePoint0.first = uField[vertexId0];
724 rangePoint0.second = vField[vertexId0];
726 rangePoint1.first = uField[vertexId1];
727 rangePoint1.second = vField[vertexId1];
729 fiberSurface_.computeSurface<dataTypeU, dataTypeV>(
730 rangePoint0, rangePoint1, threadId);
733 originalData_.sheet2List_[threadId].triangleList_[0].clear();
734 originalData_.sheet2List_[threadId].vertexList_[0].clear();
737 this->
printMsg(
"Computed chambers pre-image boundaries", 1.0,
743template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
746 const dataTypeU *
const uField,
747 const dataTypeV *
const vField,
748 const triangulationType &triangulation) {
754 for(
size_t i = 0; i < sheet.
tetList_.size(); i++) {
757 std::array<std::pair<double, double>, 3> domainBox{};
758 std::array<std::pair<double, double>, 2> rangeBox;
759 std::array<std::array<float, 3>, 4> domainPoints{};
760 std::array<std::array<float, 2>, 4> rangePoints{};
762 for(
int j = 0; j < 4; j++) {
765 triangulation.getCellVertex(tetId, j, vertexId);
767 triangulation.getVertexPoint(
768 vertexId, domainPoints[j][0], domainPoints[j][1], domainPoints[j][2]);
770 rangePoints[j][0] = uField[vertexId];
771 rangePoints[j][1] = vField[vertexId];
777 sheet.
domainVolume_ += (domainBox[0].second - domainBox[0].first)
778 * (domainBox[1].second - domainBox[1].first)
779 * (domainBox[2].second - domainBox[2].first);
781 sheet.
rangeArea_ += (rangeBox[0].second - rangeBox[0].first)
782 * (rangeBox[1].second - rangeBox[1].first);
794template <
class dataTypeU,
class dataTypeV>
796 const dataTypeV *
const vField,
797 const dataTypeU &uEpsilon,
798 const dataTypeV &vEpsilon) {
800 jacobiSet_.setVertexNumber(vertexNumber_);
801 jacobiSet_.perturb(uField, vField, uEpsilon, vEpsilon);
806template <
class dataTypeU,
class dataTypeV,
typename triangulationType>
808 const dataTypeV *
const vField,
809 const triangulationType &triangulation,
810 const double &simplificationThreshold,
813 if((totalArea_ == -1) || (totalVolume_ == -1) || (totalHyperVolume_ == -1)) {
817#ifdef TTK_ENABLE_OPENMP
818#pragma omp parallel for num_threads(threadNumber_)
820 for(
size_t i = 0; i < originalData_.sheet3List_.size(); i++) {
821 computeGeometricalMeasures(
822 originalData_.sheet3List_[i], uField, vField, triangulation);
825 for(
size_t i = 0; i < originalData_.sheet3List_.size(); i++) {
826 totalArea_ += originalData_.sheet3List_[i].rangeArea_;
827 totalVolume_ += originalData_.sheet3List_[i].domainVolume_;
828 totalHyperVolume_ += originalData_.sheet3List_[i].hyperVolume_;
832 this->threadNumber_);
835 if(!hasConnectedSheets_) {
836 connectSheets(triangulation);
837 prepareSimplification();
841 std::stringstream msg;
842 msg <<
"Simplifying (";
844 case SimplificationCriterion::domainVolume:
845 msg <<
"'Domain Volume'";
847 case SimplificationCriterion::rangeArea:
848 msg <<
"'Range Area'";
850 case SimplificationCriterion::hyperVolume:
851 msg <<
"'HyperVolume'";
854 msg <<
", thr: " << simplificationThreshold <<
").";
858 if(!((criterion == currentData_.simplificationCriterion_)
859 && (simplificationThreshold > currentData_.simplificationThreshold_))) {
860 prepareSimplification();
863 simplifySheets(simplificationThreshold, criterion, triangulation);
868template <
typename triangulationType>
870 const std::vector<std::pair<SimplexId, char>> &jacobiSet,
871 std::vector<std::pair<SimplexId, SimplexId>> &jacobiClassification,
872 const triangulationType &triangulation) {
880 jacobiClassification.reserve(jacobiSet.size());
883 for(
size_t i = 0; i < jacobiSet.size(); i++) {
884 originalData_.edgeTypes_[jacobiSet[i].first] = jacobiSet[i].second;
887 std::vector<bool> visitedEdges(triangulation.getNumberOfEdges(),
false);
889 for(
size_t i = 0; i < jacobiSet.size(); i++) {
891 if(visitedEdges[jacobiSet[i].first] ==
false) {
893 SimplexId const sheet1Id = originalData_.sheet1List_.size();
894 originalData_.sheet1List_.resize(originalData_.sheet1List_.size() + 1);
895 originalData_.sheet1List_.back().hasSaddleEdges_ =
false;
896 originalData_.sheet1List_.back().pruned_ =
false;
898 std::queue<SimplexId> edgeQueue;
899 edgeQueue.push(jacobiSet[i].first);
903 SimplexId const edgeId = edgeQueue.front();
906 if(!visitedEdges[edgeId]) {
908 jacobiClassification.emplace_back(edgeId, sheet1Id);
910 originalData_.sheet1List_.back().edgeList_.push_back(edgeId);
911 originalData_.edge2sheet1_[edgeId] = sheet1Id;
913 if(originalData_.edgeTypes_[edgeId] == 1) {
914 originalData_.sheet1List_.back().hasSaddleEdges_ =
true;
918 triangulation.getEdgeVertex(edgeId, 0, vertexId0);
920 triangulation.getEdgeVertex(edgeId, 1, vertexId1);
925 = triangulation.getVertexEdgeNumber(vertexId0);
927 for(
SimplexId j = 0; j < vertexEdgeNumber; j++) {
930 triangulation.getVertexEdge(vertexId0, j, vertexEdgeId);
932 if(originalData_.edgeTypes_[vertexEdgeId] != -1) {
933 if(vertexEdgeId != edgeId) {
937 if(!visitedEdges[vertexEdgeId]) {
938 edgeQueue.push(vertexEdgeId);
943 if((neighborNumber > 2)
944 && (originalData_.vertex2sheet0_[vertexId0] == -1)) {
947 originalData_.vertex2sheet0_[vertexId0]
948 = originalData_.sheet0List_.size();
950 originalData_.sheet0List_.resize(originalData_.sheet0List_.size()
952 originalData_.sheet0List_.back().vertexId_ = vertexId0;
953 originalData_.sheet0List_.back().type_ = 1;
954 originalData_.sheet0List_.back().pruned_ =
false;
958 vertexEdgeNumber = triangulation.getVertexEdgeNumber(vertexId1);
959 for(
SimplexId j = 0; j < vertexEdgeNumber; j++) {
962 triangulation.getVertexEdge(vertexId1, j, vertexEdgeId);
964 if(originalData_.edgeTypes_[vertexEdgeId] != -1) {
965 if(vertexEdgeId != edgeId) {
969 if(!visitedEdges[vertexEdgeId]) {
970 edgeQueue.push(vertexEdgeId);
976 if((neighborNumber > 2)
977 && (originalData_.vertex2sheet0_[vertexId1] == -1)) {
981 originalData_.vertex2sheet0_[vertexId1]
982 = originalData_.sheet0List_.size();
984 originalData_.sheet0List_.resize(originalData_.sheet0List_.size()
986 originalData_.sheet0List_.back().vertexId_ = vertexId1;
987 originalData_.sheet0List_.back().type_ = 1;
988 originalData_.sheet0List_.back().pruned_ =
false;
992 visitedEdges[edgeId] =
true;
994 }
while(edgeQueue.size());
998 this->
printMsg(std::vector<std::vector<std::string>>{
999 {
"#1-sheets", std::to_string(originalData_.sheet1List_.size())},
1000 {
"#0-sheets", std::to_string(originalData_.sheet0List_.size())}});
1002 "Extracted 0- and 1-sheets", 1.0, t.
getElapsedTime(), this->threadNumber_);
1007template <
typename triangulationType>
1009 const std::vector<std::pair<SimplexId, char>> &jacobiSet,
1010 std::vector<std::pair<SimplexId, SimplexId>> &jacobiClassification,
1011 const triangulationType &triangulation) {
1019 jacobiClassification.reserve(jacobiSet.size());
1022 for(
size_t i = 0; i < jacobiSet.size(); i++) {
1023 originalData_.edgeTypes_[jacobiSet[i].first] = jacobiSet[i].second;
1026 std::vector<bool> visitedEdges(triangulation.getNumberOfEdges(),
false);
1027 for(
size_t i = 0; i < jacobiSet.size(); i++) {
1030 (visitedEdges[jacobiSet[i].first] ==
false)) {
1034 SimplexId const sheet1Id = originalData_.sheet1List_.size();
1035 originalData_.sheet1List_.resize(originalData_.sheet1List_.size() + 1);
1036 originalData_.sheet1List_.back().hasSaddleEdges_ =
false;
1037 originalData_.sheet1List_.back().pruned_ =
false;
1039 std::queue<SimplexId> edgeQueue;
1040 edgeQueue.push(jacobiSet[i].first);
1047 if(!visitedEdges[edgeId]) {
1049 jacobiClassification.emplace_back(edgeId, sheet1Id);
1051 if(originalData_.edgeTypes_[edgeId] == 1) {
1053 originalData_.sheet1List_.back().hasSaddleEdges_ =
true;
1055 originalData_.sheet1List_.back().edgeList_.push_back(edgeId);
1056 originalData_.edge2sheet1_[edgeId] = sheet1Id;
1061 triangulation.getEdgeVertex(edgeId, 0, vertexId0);
1063 triangulation.getEdgeVertex(edgeId, 1, vertexId1);
1065 if(originalData_.vertex2sheet0_[vertexId0]
1066 >=
static_cast<SimplexId>(originalData_.sheet0List_.size())) {
1068 originalData_.vertex2sheet0_[vertexId0] = -1;
1072 if(originalData_.vertex2sheet0_[vertexId0] == -1) {
1078 = triangulation.getVertexEdgeNumber(vertexId0);
1079 for(
SimplexId j = 0; j < vertexEdgeNumber; j++) {
1082 triangulation.getVertexEdge(vertexId0, j, vertexEdgeId);
1084 if(originalData_.edgeTypes_[vertexEdgeId] != -1) {
1086 if(vertexEdgeId != edgeId
1088 nextEdgeId = vertexEdgeId;
1093 if((neighborNumber == 2) && (nextEdgeId != -1)) {
1096 if(!visitedEdges[nextEdgeId])
1097 edgeQueue.push(nextEdgeId);
1103 originalData_.vertex2sheet0_[vertexId0]
1104 = originalData_.sheet0List_.size();
1106 originalData_.sheet0List_.resize(originalData_.sheet0List_.size()
1108 originalData_.sheet0List_.back().vertexId_ = vertexId0;
1109 originalData_.sheet0List_.back().type_ = 1;
1110 originalData_.sheet0List_.back().pruned_ =
false;
1114 if(originalData_.vertex2sheet0_[vertexId0] != -1) {
1119 originalData_.sheet1List_[sheet1Id].sheet0List_.push_back(
1120 originalData_.vertex2sheet0_[vertexId0]);
1123 originalData_.sheet0List_[originalData_.vertex2sheet0_[vertexId0]]
1124 .sheet1List_.push_back(sheet1Id);
1127 if(originalData_.vertex2sheet0_[vertexId1]
1128 >=
static_cast<SimplexId>(originalData_.sheet0List_.size())) {
1130 originalData_.vertex2sheet0_[vertexId1] = -1;
1134 if(originalData_.vertex2sheet0_[vertexId1] == -1) {
1141 = triangulation.getVertexEdgeNumber(vertexId1);
1143 for(
SimplexId j = 0; j < vertexEdgeNumber; j++) {
1146 triangulation.getVertexEdge(vertexId1, j, vertexEdgeId);
1148 if(originalData_.edgeTypes_[vertexEdgeId] != -1) {
1150 if(vertexEdgeId != edgeId
1152 nextEdgeId = vertexEdgeId;
1157 if((neighborNumber == 2) && (nextEdgeId != -1)) {
1160 if(!visitedEdges[nextEdgeId])
1161 edgeQueue.push(nextEdgeId);
1167 originalData_.vertex2sheet0_[vertexId1]
1168 = originalData_.sheet0List_.size();
1170 originalData_.sheet0List_.resize(originalData_.sheet0List_.size()
1172 originalData_.sheet0List_.back().vertexId_ = vertexId1;
1173 originalData_.sheet0List_.back().type_ = 1;
1174 originalData_.sheet0List_.back().pruned_ =
false;
1178 if(originalData_.vertex2sheet0_[vertexId1] != -1) {
1183 originalData_.sheet1List_[sheet1Id].sheet0List_.push_back(
1184 originalData_.vertex2sheet0_[vertexId1]);
1187 originalData_.sheet0List_[originalData_.vertex2sheet0_[vertexId1]]
1188 .sheet1List_.push_back(sheet1Id);
1191 visitedEdges[edgeId] =
true;
1194 }
while(edgeQueue.size());
1198 this->
printMsg(std::vector<std::vector<std::string>>{
1199 {
"#1-sheets", std::to_string(originalData_.sheet1List_.size())},
1200 {
"#0-sheets", std::to_string(originalData_.sheet0List_.size())}});
1202 "Extracted 0- and 1-sheets", 1.0, t.
getElapsedTime(), this->threadNumber_);
1207template <
typename triangulationType>
1210 const std::vector<std::vector<std::array<SimplexId, 3>>> &tetTriangles,
1211 const triangulationType &triangulation) {
1213 SimplexId const sheetId = originalData_.sheet3List_.size();
1214 originalData_.sheet3List_.resize(originalData_.sheet3List_.size() + 1);
1215 originalData_.sheet3List_.back().pruned_ =
false;
1216 originalData_.sheet3List_.back().preMerger_ = -1;
1217 originalData_.sheet3List_.back().Id_ = sheetId;
1219 std::queue<SimplexId> vertexQueue;
1220 vertexQueue.push(vertexId);
1224 SimplexId const localVertexId = vertexQueue.front();
1227 if(originalData_.vertex2sheet3_[localVertexId] == -1) {
1230 originalData_.sheet3List_.back().vertexList_.push_back(localVertexId);
1231 originalData_.vertex2sheet3_[localVertexId] = sheetId;
1234 = triangulation.getVertexStarNumber(localVertexId);
1236 for(
SimplexId i = 0; i < vertexStarNumber; i++) {
1238 triangulation.getVertexStar(localVertexId, i, tetId);
1240 if(tetTriangles[tetId].empty()) {
1245 for(
int j = 0; j < 4; j++) {
1248 triangulation.getCellVertex(tetId, j, tetVertexId);
1250 if(originalData_.vertex2sheet3_[tetVertexId] == -1) {
1251 vertexQueue.push(tetVertexId);
1256 for(
int j = 0; j < 4; j++) {
1258 triangulation.getCellVertex(tetId, j, otherVertexId);
1259 if((otherVertexId != localVertexId)
1260 && (originalData_.vertex2sheet3_[otherVertexId] == -1)) {
1265 for(
size_t k = 0; k < tetTriangles[tetId].size(); k++) {
1267 l = tetTriangles[tetId][k][0];
1268 m = tetTriangles[tetId][k][1];
1269 n = tetTriangles[tetId][k][2];
1271 for(
int p = 0; p < 3; p++) {
1272 std::pair<SimplexId, SimplexId> meshEdge;
1274 if(fiberSurfaceVertexList_.size()) {
1277 = fiberSurfaceVertexList_[originalData_.sheet2List_[l]
1278 .triangleList_[m][n]
1283 meshEdge = originalData_.sheet2List_[l]
1284 .vertexList_[m][originalData_.sheet2List_[l]
1285 .triangleList_[m][n]
1290 if(((meshEdge.first == localVertexId)
1291 && (meshEdge.second == otherVertexId))
1292 || ((meshEdge.second == localVertexId)
1293 && (meshEdge.first == otherVertexId))) {
1305 vertexQueue.push(otherVertexId);
1313 }
while(vertexQueue.size());
1318template <
typename triangulationType>
1320 std::vector<std::vector<std::array<SimplexId, 3>>> &tetTriangles,
1321 const triangulationType &triangulation) {
1325 tetTriangles.resize(tetNumber_);
1327 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
1328 for(
size_t j = 0; j < originalData_.sheet2List_[i].triangleList_.size();
1331 k < originalData_.sheet2List_[i].triangleList_[j].size(); k++) {
1334 = originalData_.sheet2List_[i].triangleList_[j][k].tetId_;
1336 tetTriangles[tetId].emplace_back();
1337 tetTriangles[tetId].back()[0] = i;
1338 tetTriangles[tetId].back()[1] = j;
1339 tetTriangles[tetId].back()[2] = k;
1345 for(
size_t i = 0; i < originalData_.sheet1List_.size(); i++) {
1346 for(
size_t j = 0; j < originalData_.sheet1List_[i].edgeList_.size(); j++) {
1348 SimplexId const edgeId = originalData_.sheet1List_[i].edgeList_[j];
1350 SimplexId vertexId0 = -1, vertexId1 = -1;
1351 triangulation.getEdgeVertex(edgeId, 0, vertexId0);
1352 triangulation.getEdgeVertex(edgeId, 1, vertexId1);
1354 originalData_.vertex2sheet3_[vertexId0] = -2 - i;
1355 originalData_.vertex2sheet3_[vertexId1] = -2 - i;
1359 for(
SimplexId i = 0; i < vertexNumber_; i++) {
1360 if(originalData_.vertex2sheet3_[i] == -1) {
1361 compute3sheet(i, tetTriangles, triangulation);
1366 std::vector<std::vector<std::pair<SimplexId, bool>>> neighborList(
1367 originalData_.sheet3List_.size());
1371#ifdef TTK_ENABLE_OPENMP
1372#pragma omp parallel for num_threads(threadNumber_)
1374 for(
size_t i = 0; i < originalData_.sheet3List_.size(); i++) {
1375 for(
size_t j = 0; j < originalData_.sheet3List_[i].vertexList_.size();
1378 SimplexId const vertexId = originalData_.sheet3List_[i].vertexList_[j];
1379 SimplexId const sheetId = originalData_.vertex2sheet3_[vertexId];
1382 = triangulation.getVertexStarNumber(vertexId);
1384 for(
SimplexId k = 0; k < vertexStarNumber; k++) {
1386 triangulation.getVertexStar(vertexId, k, tetId);
1387 if(tetTriangles[tetId].empty()) {
1388 if(originalData_.tet2sheet3_[tetId] == -1) {
1389 originalData_.tet2sheet3_[tetId] = i;
1390 originalData_.sheet3List_[i].tetList_.push_back(tetId);
1395 if(expand3sheets_) {
1396 for(
int l = 0; l < 4; l++) {
1399 triangulation.getCellVertex(tetId, l, otherVertexId);
1401 if(vertexId != otherVertexId) {
1404 = originalData_.vertex2sheet3_[otherVertexId];
1406 if((sheetId != otherSheetId) && (otherSheetId >= 0)) {
1408 bool inThere =
false;
1409 for(
size_t m = 0; m < neighborList[sheetId].size(); m++) {
1410 if(neighborList[sheetId][m].first == otherSheetId) {
1417 neighborList[sheetId].emplace_back(otherSheetId,
true);
1420 for(
size_t m = 0; m < tetTriangles[tetId].size(); m++) {
1423 SimplexId const x = tetTriangles[tetId][m][0];
1424 SimplexId const y = tetTriangles[tetId][m][1];
1425 SimplexId const z = tetTriangles[tetId][m][2];
1428 = &(originalData_.sheet2List_[x].triangleList_[y][z]);
1430 bool cuttingTriangle =
false;
1431 for(
int n = 0; n < 3; n++) {
1433 = &(originalData_.sheet2List_[x]
1437 && (v->
meshEdge_.second == otherVertexId))
1439 && (v->
meshEdge_.first == otherVertexId))) {
1441 cuttingTriangle =
true;
1446 if(cuttingTriangle) {
1449 SimplexId const edgeId = jacobi2edges_[polygonId];
1450 if(originalData_.edgeTypes_[edgeId] == 1) {
1454 for(
size_t n = 0; n < neighborList[sheetId].size();
1457 if(neighborList[sheetId][n].first == otherSheetId) {
1458 if(neighborList[sheetId][n].second ==
true) {
1459 neighborList[sheetId][n].second =
false;
1467 neighborList[sheetId].emplace_back(
1468 otherSheetId,
false);
1485 if(expand3sheets_) {
1487 totalSheetNumber = originalData_.sheet3List_.size();
1490 for(
size_t i = 0; i < originalData_.sheet3List_.size(); i++) {
1491 if(originalData_.sheet3List_[i].pruned_ ==
false) {
1493 for(
size_t j = 0; j < neighborList[i].size(); j++) {
1495 if(neighborList[i][j].second) {
1497 bool isForbidden =
false;
1498 SimplexId neighborId = neighborList[i][j].first;
1501 while(originalData_.sheet3List_[neighborId].preMerger_ != -1) {
1503 neighborId = originalData_.sheet3List_[neighborId].preMerger_;
1510 < originalData_.sheet3List_[neighborId].preMergedSheets_.size();
1514 = originalData_.sheet3List_[neighborId].preMergedSheets_[k];
1516 for(
size_t l = 0; l < neighborList[i].size(); l++) {
1517 if((neighborList[i][l].first == subNeighborId)
1518 && (!neighborList[i][l].second)) {
1530 for(
size_t k = 0; k < neighborList[i].size(); k++) {
1531 if(!neighborList[i][k].second) {
1532 SimplexId const forbiddenNeighbor = neighborList[i][k].first;
1536 for(
size_t l = 0; l < neighborList[neighborId].size(); l++) {
1537 if((forbiddenNeighbor == neighborList[neighborId][l].first)
1538 && (neighborList[neighborId][l].second)) {
1549 if((neighborId !=
static_cast<SimplexId>(i)) && (!isForbidden)
1550 && (originalData_.sheet3List_[neighborId].pruned_ ==
false)
1551 && (originalData_.sheet3List_[neighborId].vertexList_.size()
1552 > originalData_.sheet3List_[i].vertexList_.size())) {
1555 preMergeSheets(i, neighborId);
1564 totalSheetNumber = originalData_.sheet3List_.size();
1568 this->
printMsg(
"Computed " + std::to_string(totalSheetNumber) +
" 3-sheets",
1574template <
typename triangulationType>
1579 for(
size_t i = 0; i < originalData_.sheet2List_.size(); i++) {
1580 for(
size_t j = 0; j < originalData_.sheet2List_[i].triangleList_.size();
1584 k < originalData_.sheet2List_[i].triangleList_[j].size(); k++) {
1587 = originalData_.sheet2List_[i].triangleList_[j][k].tetId_;
1589 for(
int l = 0; l < 4; l++) {
1591 triangulation.getCellVertex(tetId, l, vertexId);
1593 SimplexId const sheet3Id = originalData_.vertex2sheet3_[vertexId];
1596 connect3sheetTo2sheet(originalData_, sheet3Id, i);
1604 for(
SimplexId i = 0; i < vertexNumber_; i++) {
1605 if(originalData_.vertex2sheet3_[i] >= 0) {
1607 SimplexId const vertexEdgeNumber = triangulation.getVertexEdgeNumber(i);
1609 for(
SimplexId j = 0; j < vertexEdgeNumber; j++) {
1611 triangulation.getVertexEdge(i, j, edgeId);
1613 triangulation.getEdgeVertex(edgeId, 0, otherVertexId);
1614 if(otherVertexId == i) {
1615 triangulation.getEdgeVertex(edgeId, 1, otherVertexId);
1618 if(originalData_.vertex2sheet3_[otherVertexId] >= 0) {
1619 if(originalData_.vertex2sheet3_[otherVertexId]
1620 != originalData_.vertex2sheet3_[i]) {
1622 connect3sheetTo3sheet(originalData_,
1623 originalData_.vertex2sheet3_[i],
1624 originalData_.vertex2sheet3_[otherVertexId]);
1628 if(originalData_.vertex2sheet0_[otherVertexId] != -1) {
1629 connect3sheetTo0sheet(originalData_, originalData_.vertex2sheet3_[i],
1630 originalData_.vertex2sheet0_[otherVertexId]);
1633 if(originalData_.vertex2sheet3_[otherVertexId] < -1) {
1635 = -2 - originalData_.vertex2sheet3_[otherVertexId];
1636 connect3sheetTo1sheet(
1637 originalData_, originalData_.vertex2sheet3_[i], sheet1Id);
1646 printConnectivity(originalData_);
1648 hasConnectedSheets_ =
true;
1653template <
typename triangulationType>
1655 ReebSpaceData &data,
1659 const triangulationType &triangulation) {
1661 std::vector<SimplexId> newList;
1663 newList.reserve(data.sheet1List_[sheet1Id].sheet3List_.size());
1664 for(
size_t i = 0; i < data.sheet1List_[sheet1Id].sheet3List_.size(); i++) {
1665 SimplexId const other3SheetId = data.sheet1List_[sheet1Id].sheet3List_[i];
1666 if((other3SheetId != sheet3Id) && (!data.sheet3List_[other3SheetId].pruned_)
1667 && (data.sheet3List_[other3SheetId].tetList_.size())) {
1668 newList.push_back(data.sheet1List_[sheet1Id].sheet3List_[i]);
1672 data.sheet1List_[sheet1Id].sheet3List_ = newList;
1674 if((data.sheet1List_[sheet1Id].hasSaddleEdges_)
1675 && (data.sheet1List_[sheet1Id].sheet3List_.size() == 1)) {
1677 data.sheet1List_[sheet1Id].pruned_ =
true;
1678 data.sheet2List_[sheet1Id].pruned_ =
true;
1681 for(
size_t i = 0; i < data.sheet1List_[sheet1Id].edgeList_.size(); i++) {
1684 triangulation.getEdgeVertex(
1685 data.sheet1List_[sheet1Id].edgeList_[i], 0, vertexId);
1686 data.vertex2sheet3_[vertexId] = biggerId;
1689 triangulation.getEdgeVertex(
1690 data.sheet1List_[sheet1Id].edgeList_[i], 1, vertexId);
1691 data.vertex2sheet3_[vertexId] = biggerId;
1694 for(
size_t i = 0; i < data.sheet1List_[sheet1Id].sheet0List_.size(); i++) {
1696 disconnect1sheetFrom0sheet(
1697 data, sheet1Id, data.sheet1List_[sheet1Id].sheet0List_[i], biggerId);
1704template <
typename triangulationType>
1709 totalHyperVolume_ = -1;
1710 hasConnectedSheets_ =
false;
1713 originalData_.vertex2sheet0_.resize(vertexNumber_);
1714 for(
SimplexId i = 0; i < vertexNumber_; i++)
1715 originalData_.vertex2sheet0_[i] = -1;
1717 originalData_.vertex2sheet3_.resize(vertexNumber_);
1718 for(
SimplexId i = 0; i < vertexNumber_; i++)
1719 originalData_.vertex2sheet3_[i] = -1;
1721 originalData_.edge2sheet1_.resize(triangulation.getNumberOfEdges(), -1);
1722 originalData_.edgeTypes_.resize(triangulation.getNumberOfEdges(), -1);
1724 originalData_.tet2sheet3_.resize(tetNumber_, -1);
1726 jacobi2edges_.clear();
1727 jacobiSetEdges_.clear();
1729 originalData_.sheet0List_.clear();
1730 originalData_.sheet1List_.clear();
1731 originalData_.sheet2List_.clear();
1732 originalData_.sheet3List_.clear();
1734 fiberSurfaceVertexList_.clear();
1739template <
typename triangulationType>
1742 const triangulationType &triangulation) {
1745 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].vertexList_.size();
1748 = currentData_.sheet3List_[smallerId].vertexList_[i];
1749 currentData_.sheet3List_[biggerId].vertexList_.push_back(vertexId);
1750 currentData_.vertex2sheet3_[vertexId] = biggerId;
1752 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].tetList_.size();
1754 SimplexId const tetId = currentData_.sheet3List_[smallerId].tetList_[i];
1755 currentData_.sheet3List_[biggerId].tetList_.push_back(tetId);
1756 currentData_.tet2sheet3_[tetId] = biggerId;
1760 currentData_.sheet3List_[biggerId].domainVolume_
1761 += currentData_.sheet3List_[smallerId].domainVolume_;
1762 currentData_.sheet3List_[biggerId].rangeArea_
1763 += currentData_.sheet3List_[smallerId].rangeArea_;
1764 currentData_.sheet3List_[biggerId].hyperVolume_
1765 += currentData_.sheet3List_[smallerId].hyperVolume_;
1768 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet3List_.size();
1772 = currentData_.sheet3List_[smallerId].sheet3List_[i];
1774 if(otherSheetId != biggerId) {
1775 connect3sheetTo3sheet(currentData_, biggerId, otherSheetId);
1779 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet2List_.size();
1783 = currentData_.sheet3List_[smallerId].sheet2List_[i];
1785 if(otherSheetId != biggerId) {
1786 connect3sheetTo2sheet(currentData_, biggerId, otherSheetId);
1790 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet1List_.size();
1794 = currentData_.sheet3List_[smallerId].sheet1List_[i];
1796 if(otherSheetId != biggerId) {
1797 connect3sheetTo1sheet(currentData_, biggerId, otherSheetId);
1801 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet0List_.size();
1805 = currentData_.sheet3List_[smallerId].sheet0List_[i];
1807 if(otherSheetId != biggerId) {
1808 connect3sheetTo0sheet(currentData_, biggerId, otherSheetId);
1812 currentData_.sheet3List_[smallerId].pruned_ =
true;
1815 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet3List_.size();
1817 disconnect3sheetFrom3sheet(
1818 currentData_, smallerId,
1819 currentData_.sheet3List_[smallerId].sheet3List_[i]);
1822 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet2List_.size();
1824 disconnect3sheetFrom2sheet(
1825 currentData_, smallerId,
1826 currentData_.sheet3List_[smallerId].sheet2List_[i]);
1829 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet1List_.size();
1831 disconnect3sheetFrom1sheet(
1832 currentData_, smallerId,
1833 currentData_.sheet3List_[smallerId].sheet1List_[i], biggerId,
1837 for(
size_t i = 0; i < currentData_.sheet3List_[smallerId].sheet0List_.size();
1839 disconnect3sheetFrom0sheet(
1840 currentData_, smallerId,
1841 currentData_.sheet3List_[smallerId].sheet0List_[i]);
1847template <
typename triangulationType>
1850 const triangulationType &triangulation) {
1853 double maximumScore = -1;
1856 for(
size_t i = 0; i < currentData_.sheet3List_[sheetId].sheet3List_.size();
1859 = currentData_.sheet3List_[sheetId].sheet3List_[i];
1860 if((!currentData_.sheet3List_[otherSheetId].pruned_)
1861 && (sheetId != otherSheetId)) {
1863 double otherScore = 0;
1866 case SimplificationCriterion::domainVolume:
1867 otherScore = currentData_.sheet3List_[otherSheetId].domainVolume_;
1869 case SimplificationCriterion::rangeArea:
1870 otherScore = currentData_.sheet3List_[otherSheetId].rangeArea_;
1872 case SimplificationCriterion::hyperVolume:
1873 otherScore = currentData_.sheet3List_[otherSheetId].hyperVolume_;
1877 if((maximumScore < 0) || (otherScore > maximumScore)) {
1878 candidateId = otherSheetId;
1879 maximumScore = otherScore;
1963 if(candidateId != -1) {
1964 mergeSheets(sheetId, candidateId, triangulation);
1967 currentData_.sheet3List_[sheetId].pruned_ =
true;
1972template <
typename triangulationType>
1974 const double &simplificationThreshold,
1976 const triangulationType &triangulation) {
1980 if(!currentData_.sheet3List_.size())
1984 double lastThreshold = -1;
1986 for(
size_t it = 0; it < originalData_.sheet3List_.size(); it++) {
1990 double minValue = -1;
1993 for(
size_t i = 0; i < currentData_.sheet3List_.size(); i++) {
1994 if(!currentData_.sheet3List_[i].pruned_) {
1997 switch(simplificationCriterion) {
1999 case SimplificationCriterion::domainVolume:
2000 value = currentData_.sheet3List_[i].domainVolume_ / totalVolume_;
2003 case SimplificationCriterion::rangeArea:
2004 value = currentData_.sheet3List_[i].rangeArea_ / totalArea_;
2007 case SimplificationCriterion::hyperVolume:
2009 = currentData_.sheet3List_[i].hyperVolume_ / totalHyperVolume_;
2013 if((minId == -1) || (value < minValue)) {
2020 if((minId != -1) && (minValue < simplificationThreshold)) {
2021 simplifySheet(minId, simplificationCriterion, triangulation);
2023 lastThreshold = minValue;
2029 currentData_.simplificationThreshold_ = simplificationThreshold;
2030 currentData_.simplificationCriterion_ = simplificationCriterion;
2033 for(
size_t i = 0; i < currentData_.sheet3List_.size(); i++) {
2034 if(!currentData_.sheet3List_[i].pruned_) {
2035 currentData_.sheet3List_[i].simplificationId_ = simplificationId;
2039 for(
size_t i = 0; i < currentData_.sheet3List_.size(); i++) {
2040 if(currentData_.sheet3List_[i].pruned_) {
2042 if(currentData_.sheet3List_[i].vertexList_.size()) {
2043 SimplexId const vertexId = currentData_.sheet3List_[i].vertexList_[0];
2044 SimplexId const sheetId = currentData_.vertex2sheet3_[vertexId];
2045 if(sheetId !=
static_cast<SimplexId>(i)) {
2046 currentData_.sheet3List_[i].simplificationId_
2047 = currentData_.sheet3List_[sheetId].simplificationId_;
2054 for(
size_t i = 0; i < currentData_.sheet1List_.size(); i++) {
2055 if((!currentData_.sheet1List_[i].pruned_)
2056 && (currentData_.sheet1List_[i].hasSaddleEdges_)) {
2058 for(
size_t j = 0; j < currentData_.sheet1List_[i].sheet3List_.size();
2060 SimplexId const sheet3Id = currentData_.sheet1List_[i].sheet3List_[j];
2062 if(!currentData_.sheet3List_[sheet3Id].pruned_) {
2067 if(nonSimplified < 2) {
2068 currentData_.sheet1List_[i].pruned_ =
true;
2075 printConnectivity(currentData_);
2077 this->
printMsg(std::vector<std::vector<std::string>>{
2078 {
"#3-sheets simplified", std::to_string(simplifiedSheets)},
2079 {
"Last 3-sheet threshold", std::to_string(lastThreshold)},
2080 {
"#3-sheets left", std::to_string(simplificationId)}});
2083 "3-sheets simplified", 1.0, t.
getElapsedTime(), this->threadNumber_);
AbstractTriangulation is an interface class that defines an interface for efficient traversal methods...
virtual int preconditionVertexStars()
virtual int preconditionVertexEdges()
virtual int preconditionEdges()
virtual SimplexId getNumberOfCells() const
virtual SimplexId getNumberOfVertices() const
virtual SimplexId getNumberOfEdges() const
Minimalist debugging class.
TTK processing package that computes fiber surfaces.
int setInputField(const void *uField, const void *vField)
int finalize(const bool &mergeDuplicatedVertices=false, const bool &removeSmallEdges=false, const bool &edgeFlips=false, const bool &intersectionRemesh=false)
void preconditionTriangulation(AbstractTriangulation *triangulation)
TTK processing package for the computation of the Jacobi set of bivariate volumetric data.
void setSosOffsetsV(const SimplexId *const sosOffsets)
void preconditionTriangulation(AbstractTriangulation *const triangulation)
void setSosOffsetsU(const SimplexId *const sosOffsets)
int execute(std::vector< std::pair< SimplexId, char > > &jacobiSet, const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation, std::vector< char > *isPareto=nullptr)
TTK processing package that efficiently computes the Reeb space of bivariate volumetric data.
void setSosOffsetsV(const SimplexId *const sosOffsetsV)
int disconnect3sheetFrom2sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet2Id)
std::vector< SimplexId > jacobi2edges_
const std::vector< SimplexId > * get0sheetSegmentation() const
std::vector< std::pair< SimplexId, char > > jacobiSetEdges_
bool setRangeDrivenOctree(const bool &onOff)
const std::vector< char > * getEdgeTypes() const
int compute3sheets(std::vector< std::vector< std::array< SimplexId, 3 > > > &tetTriangles, const triangulationType &triangulation)
const SimplexId * sosOffsetsU_
int connectSheets(const triangulationType &triangulation)
int getJacobi2Edge(const SimplexId &jacobiEdgeId) const
ReebSpaceData originalData_
ReebSpaceData currentData_
int preconditionTriangulation(AbstractTriangulation *const triangulation)
FiberSurface fiberSurface_
const Sheet3 * get3sheet(const SimplexId &sheetId) const
int connect3sheetTo3sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &otherSheet3Id)
void setExpand3Sheets(const bool &onOff)
std::vector< FiberSurface::Vertex > fiberSurfaceVertexList_
int simplifySheets(const double &simplificationThreshold, const SimplificationCriterion &simplificationCriterion, const triangulationType &triangulation)
int connect3sheetTo0sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet0Id)
int printConnectivity(const ReebSpaceData &data) const
int connect3sheetTo2sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet2Id)
int mergeSheets(const SimplexId &smallerId, const SimplexId &biggerId, const triangulationType &triangulation)
int simplify(const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation, const double &simplificationThreshold, const SimplificationCriterion &criterion=SimplificationCriterion::rangeArea)
int compute2sheetChambers(const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation)
int prepareSimplification()
int connect3sheetTo1sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet1Id)
const std::vector< SimplexId > * get3sheetTetSegmentation() const
const std::vector< SimplexId > * get3sheetVertexSegmentation() const
const std::vector< SimplexId > * get1sheetSegmentation() const
bool withRangeDrivenOctree_
const Sheet0 * get0sheet(const SimplexId &sheetId) const
int preMergeSheets(const SimplexId &sheetId0, const SimplexId &sheetId1)
const Sheet2 * get2sheet(const SimplexId &sheetId) const
int disconnect1sheetFrom0sheet(ReebSpaceData &data, const SimplexId &sheet1Id, const SimplexId &sheet0Id, const SimplexId &biggerId)
int execute(const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation)
void setTetNumber(const SimplexId &tetNumber)
int compute2sheets(const std::vector< std::pair< SimplexId, SimplexId > > &jacobiEdges, const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation)
void setSosOffsetsU(const SimplexId *const sosOffsetsU)
const Sheet1 * get1sheet(const SimplexId &sheetId) const
const std::vector< FiberSurface::Vertex > * getFiberSurfaceVertices() const
int disconnect3sheetFrom3sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &other3SheetId)
const SimplexId * sosOffsetsV_
int compute1sheets(const std::vector< std::pair< SimplexId, char > > &jacobiSet, std::vector< std::pair< SimplexId, SimplexId > > &jacobiSetClassification, const triangulationType &triangulation)
int computeGeometricalMeasures(Sheet3 &sheet, const dataTypeU *const uField, const dataTypeV *const vField, const triangulationType &triangulation)
int flush(const triangulationType &triangulation)
int compute1sheetsOnly(const std::vector< std::pair< SimplexId, char > > &jacobiSet, std::vector< std::pair< SimplexId, SimplexId > > &jacobiSetClassification, const triangulationType &triangulation)
int disconnect3sheetFrom1sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet1Id, const SimplexId &biggerId, const triangulationType &triangulation)
int compute3sheet(const SimplexId &vertexId, const std::vector< std::vector< std::array< SimplexId, 3 > > > &tetTriangles, const triangulationType &triangulation)
void setVertexNumber(const SimplexId &vertexNumber)
int simplifySheet(const SimplexId &sheetId, const SimplificationCriterion &simplificationCriterion, const triangulationType &triangulation)
int disconnect3sheetFrom0sheet(ReebSpaceData &data, const SimplexId &sheet3Id, const SimplexId &sheet0Id)
SimplexId getNumberOf2sheets() const
int perturb(const dataTypeU *const uField, const dataTypeV *const vField, const dataTypeU &uEpsilon=Geometry::powIntTen(-DBL_DIG), const dataTypeV &vEpsilon=Geometry::powIntTen(-DBL_DIG))
int getBoundingBox(const Container &points, std::array< std::pair< T, T >, dim > &bBox)
T powIntTen(const int n)
Compute the nth power of ten.
int ThreadId
Identifier type for threads (i.e. with OpenMP).
int SimplexId
Identifier type for simplices of any dimension.
std::array< SimplexId, 3 > vertexIds_
std::pair< SimplexId, SimplexId > meshEdge_
std::vector< SimplexId > sheet1List_
std::vector< SimplexId > sheet3List_
std::vector< SimplexId > sheet3List_
std::vector< SimplexId > edgeList_
std::vector< SimplexId > sheet0List_
std::vector< std::vector< FiberSurface::Vertex > > vertexList_
std::vector< std::vector< FiberSurface::Triangle > > triangleList_
std::vector< SimplexId > sheet3List_
std::vector< SimplexId > sheet2List_
std::vector< SimplexId > sheet3List_
std::vector< SimplexId > tetList_
std::vector< SimplexId > sheet0List_
SimplexId simplificationId_
std::vector< SimplexId > vertexList_
std::vector< SimplexId > preMergedSheets_
std::vector< SimplexId > sheet1List_
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)