17 const float &xSpacing,
18 const float &ySpacing,
19 const float &zSpacing,
25 if(xDim < 1 or yDim < 1 or zDim < 1)
27 else if(xDim > 1 and yDim > 1 and zDim > 1)
29 else if((xDim > 1 and yDim > 1) or (yDim > 1 and zDim > 1)
30 or (xDim > 1 and zDim > 1))
32 else if(xDim > 1 or yDim > 1 or zDim > 1)
65 for(
int k = 1; k < 7; ++k)
91 for(
int k = 1; k < 6; ++k)
111 wrap_[1] = xDim * yDim;
112 wrap_[2] = xDim * yDim * zDim;
117 for(
int k = 0; k < 7; ++k)
120 for(
int k = 0; k < 6; ++k)
131 }
else if(yDim == 1) {
146 for(
int k = 1; k < 3; ++k)
161 for(
int k = 0; k < 3; ++k)
169 for(
int k = 0; k < 3; ++k) {
188 unsigned long long int msb[3];
190 bool allDimensionsArePowerOfTwo =
true;
191 for(
int k = 0; k < 3; ++k)
193 allDimensionsArePowerOfTwo =
false;
195 if(allDimensionsArePowerOfTwo) {
199 div_[1] = msb[0] + msb[1];
205 bool const allDimensionsArePowerOfTwo = (isDi and isDj);
207 if(allDimensionsArePowerOfTwo) {
222 unsigned long long int &r) {
223 if(v && !(v & (v - 1))) {
232bool PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
234#ifndef TTK_ENABLE_KAMIKAZE
235 if(vertexId < 0 or vertexId >= vertexNumber_)
244bool PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
246#ifndef TTK_ENABLE_KAMIKAZE
247 if(edgeId < 0 or edgeId >= edgeNumber_)
256bool PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
258#ifndef TTK_ENABLE_KAMIKAZE
259 if(triangleId < 0 or triangleId >= triangleNumber_)
268SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
270#ifndef TTK_ENABLE_KAMIKAZE
271 if(vertexId < 0 or vertexId >= vertexNumber_)
277 if(dimensionality_ == 3) {
279 }
else if(dimensionality_ == 2) {
281 }
else if(dimensionality_ == 1) {
288template <
typename Derived>
291 const int &localNeighborId,
293#ifndef TTK_ENABLE_KAMIKAZE
294 if(localNeighborId < 0
300 const auto &p = this->underlying().getVertexCoords(vertexId);
302 if(dimensionality_ == 3) {
303 neighborId = getVertexNeighbor3d(p.data(), vertexId, localNeighborId);
304 }
else if(dimensionality_ == 2) {
305 neighborId = getVertexNeighbor2d(p.data(), vertexId, localNeighborId);
306 }
else if(dimensionality_ == 1) {
308 if(vertexId > 0 and vertexId < nbvoxels_[Di_]) {
309 if(localNeighborId == 0)
310 neighborId = vertexId + 1;
312 neighborId = vertexId - 1;
313 }
else if(vertexId == 0) {
314 if(localNeighborId == 0)
315 neighborId = vertexId + 1;
317 neighborId = nbvoxels_[Di_];
319 if(localNeighborId == 0)
322 neighborId = vertexId - 1;
329const vector<vector<SimplexId>> *
330 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
332 if(vertexNeighborList_.empty()) {
334 vertexNeighborList_.resize(vertexNumber_);
335 for(
SimplexId i = 0; i < vertexNumber_; ++i) {
341 printMsg(
"Built " + to_string(vertexNumber_) +
" vertex neighbors.", 1,
345 return &vertexNeighborList_;
353template <
typename Derived>
356#ifndef TTK_ENABLE_KAMIKAZE
362 const auto &p = this->underlying().getVertexCoords(vertexId);
365 edgeId = getVertexEdge3d(p.data(), localEdgeId);
367 edgeId = getVertexEdge2d(p.data(), localEdgeId);
371 edgeId = localEdgeId == 0 ? vertexId : vertexId - 1;
372 }
else if(vertexId == 0) {
374 edgeId = localEdgeId == 0 ? vertexId : 0;
377 edgeId = localEdgeId == 0 ? 0 : vertexId - 1;
384const vector<vector<SimplexId>> *
405#ifndef TTK_ENABLE_KAMIKAZE
419template <
typename Derived>
422 const int &localTriangleId,
424#ifndef TTK_ENABLE_KAMIKAZE
425 if(localTriangleId < 0
431 const auto &p = this->underlying().getVertexCoords(vertexId);
434 triangleId = getVertexTriangle3d(p.data(), localTriangleId);
440const vector<vector<SimplexId>> *
459SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
464template <
typename Derived>
467 const int &localLinkId,
469#ifndef TTK_ENABLE_KAMIKAZE
475 const auto &p = this->underlying().getVertexCoords(vertexId);
477 if(dimensionality_ == 3) {
478 linkId = getVertexLink3d(p.data(), localLinkId);
479 }
else if(dimensionality_ == 2) {
480 linkId = getVertexLink2d(p.data(), localLinkId);
486const vector<vector<SimplexId>> *
488 if(vertexLinkList_.empty()) {
491 vertexLinkList_.resize(vertexNumber_);
492 for(
SimplexId i = 0; i < vertexNumber_; ++i) {
498 printMsg(
"Built " + to_string(vertexNumber_) +
" vertex links.", 1,
502 return &vertexLinkList_;
505SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
507#ifndef TTK_ENABLE_KAMIKAZE
508 if(vertexId < 0 or vertexId >= vertexNumber_)
514 if(dimensionality_ == 3) {
516 }
else if(dimensionality_ == 2) {
523template <
typename Derived>
526 const int &localStarId,
528#ifndef TTK_ENABLE_KAMIKAZE
534 const auto &p = this->underlying().getVertexCoords(vertexId);
536 if(dimensionality_ == 3) {
537 starId = getVertexStar3d(p.data(), localStarId);
538 }
else if(dimensionality_ == 2) {
539 starId = getVertexStar2d(p.data(), localStarId);
545const vector<vector<SimplexId>> *
547 if(vertexStarList_.empty()) {
549 vertexStarList_.resize(vertexNumber_);
550 for(
SimplexId i = 0; i < vertexNumber_; ++i) {
556 printMsg(
"Built " + to_string(vertexNumber_) +
" vertex stars.", 1,
565void PeriodicImplicitTriangulation::setIsBoundaryPeriodic(
566 std::array<unsigned char, 6> boundary) {
567 this->isBoundaryPeriodic = boundary;
570void PeriodicImplicitTriangulation::createMetaGrid(
const double *
const bounds) {
572 if(!ttk::isRunningWithMPI()) {
577 if(this->metaGrid_ !=
nullptr) {
582 std::array<double, 6> tempBounds = {
583 bounds[0], bounds[2], bounds[4], bounds[1], bounds[3], bounds[5],
586 for(
int i = 0; i < 3; i++) {
588 if(this->isBoundaryPeriodic[2 * i] == 1) {
591 if(this->isBoundaryPeriodic[2 * i + 1] == 1) {
597 std::array<double, 6> tempGlobalBounds{};
599 MPI_Allreduce(tempBounds.data(), tempGlobalBounds.data(), 3, MPI_DOUBLE,
600 MPI_MIN, ttk::MPIcomm_);
602 MPI_Allreduce(&tempBounds[3], &tempGlobalBounds[3], 3, MPI_DOUBLE, MPI_MAX,
606 std::array<double, 6> globalBounds{
607 tempGlobalBounds[0], tempGlobalBounds[3], tempGlobalBounds[1],
608 tempGlobalBounds[4], tempGlobalBounds[2], tempGlobalBounds[5],
611 const std::array<ttk::SimplexId, 3> dimensions = {
613 std::round((globalBounds[1] - globalBounds[0]) / this->
spacing_[0]))
616 std::round((globalBounds[3] - globalBounds[2]) / this->
spacing_[1]))
619 std::round((globalBounds[5] - globalBounds[4]) / this->
spacing_[2]))
623 this->localGridOffset_ = {
632 this->metaGrid_ = std::make_shared<PeriodicNoPreconditions>();
633 this->metaGrid_->setInputGrid(globalBounds[0], globalBounds[1],
636 dimensions[0], dimensions[1], dimensions[2]);
639int PeriodicImplicitTriangulation::preconditionDistributedCells() {
640 if(this->hasPreconditionedDistributedCells_) {
643 if(!ttk::isRunningWithMPI()) {
646 if(this->metaGrid_ ==
nullptr) {
649 if(this->cellGhost_ ==
nullptr) {
650 if(ttk::isRunningWithMPI()) {
651 this->
printErr(
"Missing cell ghost array!");
660 const auto spacing{this->metaGrid_->spacing_};
661 const auto origin{this->metaGrid_->origin_};
665 double globalBounds[6]{
666 origin[0], origin[0] + (this->metaGrid_->dimensions_[0] - 1) * spacing[0],
667 origin[1], origin[1] + (this->metaGrid_->dimensions_[1] - 1) * spacing[1],
668 origin[2], origin[2] + (this->metaGrid_->dimensions_[1] - 1) * spacing[2]};
670 for(
int i = 0; i < 3; i++) {
671 if(std::abs(globalBounds[2 * i] - boundingBox_[2 * i]) > spacing[i] / 2) {
672 Bbox[2 * i] = boundingBox_[2 * i] + spacing[i];
674 Bbox[2 * i] = boundingBox_[2 * i];
676 Bbox[2 * i] -= isBoundaryPeriodic[2 * i] * spacing[i];
677 if(std::abs(globalBounds[2 * i + 1] - boundingBox_[2 * i + 1])
679 Bbox[2 * i + 1] = boundingBox_[2 * i + 1] - spacing[i];
681 Bbox[2 * i + 1] = boundingBox_[2 * i + 1];
683 Bbox[2 * i + 1] += isBoundaryPeriodic[2 * i + 1] * spacing[i];
686 for(
size_t i = 0; i < this->neighborRanks_.size(); ++i) {
687 const auto neigh{this->neighborRanks_[i]};
688 MPI_Sendrecv(this->neighborCellBBoxes_[
ttk::MPIrank_].data(), 6, MPI_DOUBLE,
689 neigh,
ttk::MPIrank_, this->neighborCellBBoxes_[neigh].data(),
690 6, MPI_DOUBLE, neigh, neigh, ttk::MPIcomm_, MPI_STATUS_IGNORE);
693 this->hasPreconditionedDistributedCells_ =
true;
698std::array<SimplexId, 3> PeriodicImplicitTriangulation::getVertGlobalCoords(
701 std::array<SimplexId, 3> p{};
708 p[0] += this->localGridOffset_[0];
709 p[1] += this->localGridOffset_[1];
710 p[2] += this->localGridOffset_[2];
712 const auto &dims{this->metaGrid_->getGridDimensions()};
714 p[0] = (p[0] + dims[0]) % dims[0];
716 p[1] = (p[1] + dims[1]) % dims[1];
718 p[2] = (p[2] + dims[2]) % dims[2];
724std::array<SimplexId, 3> PeriodicImplicitTriangulation::getVertLocalCoords(
727 std::array<SimplexId, 3> pGlobal{};
729 this->metaGrid_->vertexToPosition(gvid, pGlobal.data());
731 this->metaGrid_->vertexToPosition2d(gvid, pGlobal.data());
733 std::array<SimplexId, 3> p{pGlobal};
735 p[0] -= this->localGridOffset_[0];
736 p[1] -= this->localGridOffset_[1];
737 p[2] -= this->localGridOffset_[2];
741 if(p[0] >= 0 && p[1] >= 0 && p[2] >= 0 && p[0] <= dims[0] - 1
742 && p[1] <= dims[1] - 1 && p[2] <= dims[2] - 1) {
745 for(
int i = 0; i < 3; i++) {
746 if((p[i] < 0 || p[i] > dims[i] - 1) && pGlobal[i] == 0) {
749 if((p[i] < 0 || p[i] > dims[i] - 1)
750 && pGlobal[i] == this->metaGrid_->dimensions_[i] - 1) {
755 if(p[0] >= 0 && p[1] >= 0 && p[2] >= 0 && p[0] <= dims[0] - 1
756 && p[1] <= dims[1] - 1 && p[2] <= dims[2] - 1) {
757 if(this->vertexGhost_[p[0] + p[1] * dims[0] + p[2] * dims[0] * dims[1]]
762 return std::array<SimplexId, 3>{-1, -1, -1};
765int ttk::PeriodicImplicitTriangulation::getCellRankInternal(
768 const int nTetraPerCube{this->dimensionality_ == 3 ? 6 : 2};
769 const auto locCubeId{lcid / nTetraPerCube};
771 if(this->cellGhost_[locCubeId] == 0) {
775#ifndef TTK_ENABLE_KAMIKAZE
776 if(this->neighborRanks_.empty()) {
777 this->printErr(
"Empty neighborsRanks_!");
783 std::vector<bool> inRank(nVertsCell);
784 std::map<int, int> neighborOccurrences;
785 for(
const auto neigh : this->neighborRanks_) {
786 std::fill(inRank.begin(), inRank.end(),
false);
787 const auto &bbox{this->neighborCellBBoxes_[neigh]};
788 for(
SimplexId i = 0; i < nVertsCell; ++i) {
791 if(this->vertexGhost_[v] == 0) {
794 const auto p{this->getVertGlobalCoords(v)};
795 if(p[0] >= bbox[0] && p[0] <= bbox[1] && p[1] >= bbox[2]
796 && p[1] <= bbox[3] && p[2] >= bbox[4] && p[2] <= bbox[5]) {
802 inRank.begin(), inRank.end(), [](
const bool v) { return v; })) {
805 neighborOccurrences[neigh]
806 = std::accumulate(inRank.begin(), inRank.end(), 0);
809 auto pr = std::max_element(
810 std::begin(neighborOccurrences), std::end(neighborOccurrences),
811 [](
const std::pair<int, int> &p1,
const std::pair<int, int> &p2) {
812 return p1.second < p2.second;
819template <
typename Derived>
825#ifndef TTK_ENABLE_KAMIKAZE
826 if(vertexId < 0 or vertexId >= vertexNumber_)
830 if(dimensionality_ == 3) {
831 const auto &p = this->underlying().getVertexCoords(vertexId);
833 x = origin_[0] + spacing_[0] * p[0];
834 y = origin_[1] + spacing_[1] * p[1];
835 z = origin_[2] + spacing_[2] * p[2];
836 }
else if(dimensionality_ == 2) {
837 const auto &p = this->underlying().getVertexCoords(vertexId);
839 if(dimensions_[0] > 1 and dimensions_[1] > 1) {
840 x = origin_[0] + spacing_[0] * p[0];
841 y = origin_[1] + spacing_[1] * p[1];
843 }
else if(dimensions_[1] > 1 and dimensions_[2] > 1) {
845 y = origin_[1] + spacing_[1] * p[0];
846 z = origin_[2] + spacing_[2] * p[1];
847 }
else if(dimensions_[0] > 1 and dimensions_[2] > 1) {
848 x = origin_[0] + spacing_[0] * p[0];
850 z = origin_[2] + spacing_[2] * p[1];
852 }
else if(dimensionality_ == 1) {
853 if(dimensions_[0] > 1) {
854 x = origin_[0] + spacing_[0] * vertexId;
857 }
else if(dimensions_[1] > 1) {
859 y = origin_[1] + spacing_[1] * vertexId;
861 }
else if(dimensions_[2] > 1) {
864 z = origin_[2] + spacing_[2] * vertexId;
871template <
typename Derived>
874 const int &localVertexId,
876#ifndef TTK_ENABLE_KAMIKAZE
879 if(localVertexId < 0 or localVertexId >= 2)
884 const auto &p = this->underlying().getEdgeCoords(edgeId);
888 const auto a = p[0] + this->underlying().getEdgeVertexAccelerated(edgeId);
890 switch(this->underlying().getEdgePosition(edgeId)) {
892 vertexId = a + (localVertexId == 0 ? 0 : (1 + wrapXRight));
895 vertexId = a + (localVertexId == 0 ? 0 : (
vshift_[0] + wrapYBottom));
898 vertexId = a + (localVertexId == 0 ? 0 : (
vshift_[1] + wrapZFront));
902 + (localVertexId == 0 ? (1 + wrapXRight)
907 + (localVertexId == 0
914 + (localVertexId == 0 ? (1 + wrapXRight) : (
vshift_[1] + wrapZFront));
918 + (localVertexId == 0
923 vertexId = a + (localVertexId == 0 ? 0 : (1 + wrapXRight));
926 vertexId = a + (localVertexId == 0 ? 0 : (
vshift_[0] + wrapYBottom));
930 + (localVertexId == 0 ? (1 + wrapXRight)
934 vertexId = localVertexId == 0 ? 0 : 1;
937 vertexId = localVertexId == 0 ? edgeId : 0;
940 vertexId = localVertexId == 0 ? edgeId : edgeId + 1;
949const vector<std::array<SimplexId, 2>> *
950 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
getEdges)() {
952 if(edgeList_.empty()) {
955 edgeList_.resize(edgeNumber_);
956 for(
SimplexId i = 0; i < edgeNumber_; ++i) {
958 getEdgeVertexInternal(i, 0, id0);
959 getEdgeVertexInternal(i, 1, id1);
960 edgeList_[i] = {id0, id1};
964 "Built " + to_string(edgeNumber_) +
" edges.", 1, t.
getElapsedTime(), 1);
970template <
typename Derived>
974#ifndef TTK_ENABLE_KAMIKAZE
979 switch(this->underlying().getEdgePosition(edgeId)) {
998template <
typename Derived>
1001 const int &localTriangleId,
1003#ifndef TTK_ENABLE_KAMIKAZE
1004 if(localTriangleId < 0
1010 const auto &p = this->underlying().getEdgeCoords(edgeId);
1012 switch(this->underlying().getEdgePosition(edgeId)) {
1014 triangleId = getEdgeTriangle3dL(p.data(), localTriangleId);
1017 triangleId = getEdgeTriangle3dH(p.data(), localTriangleId);
1020 triangleId = getEdgeTriangle3dP(p.data(), localTriangleId);
1023 triangleId = getEdgeTriangle3dD1(p.data(), localTriangleId);
1026 triangleId = getEdgeTriangle3dD2(p.data(), localTriangleId);
1029 triangleId = getEdgeTriangle3dD3(p.data(), localTriangleId);
1032 triangleId = getEdgeTriangle3dD4(p.data(), localTriangleId);
1035 triangleId = getEdgeTriangle2dL(p.data(), localTriangleId);
1038 triangleId = getEdgeTriangle2dH(p.data(), localTriangleId);
1041 triangleId = getEdgeTriangle2dD1(p.data(), localTriangleId);
1050const vector<vector<SimplexId>> *
1069SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
1075template <
typename Derived>
1078 const int &localLinkId,
1080#ifndef TTK_ENABLE_KAMIKAZE
1086 const auto &p = this->underlying().getEdgeCoords(edgeId);
1088 switch(this->underlying().getEdgePosition(edgeId)) {
1089 case EdgePosition::L_3D:
1090 linkId = getEdgeLinkL(p.data(), localLinkId);
1092 case EdgePosition::H_3D:
1093 linkId = getEdgeLinkH(p.data(), localLinkId);
1095 case EdgePosition::P_3D:
1096 linkId = getEdgeLinkP(p.data(), localLinkId);
1098 case EdgePosition::D1_3D:
1099 linkId = getEdgeLinkD1(p.data(), localLinkId);
1101 case EdgePosition::D2_3D:
1102 linkId = getEdgeLinkD2(p.data(), localLinkId);
1104 case EdgePosition::D3_3D:
1105 linkId = getEdgeLinkD3(p.data(), localLinkId);
1107 case EdgePosition::D4_3D:
1108 linkId = getEdgeLinkD4(p.data(), localLinkId);
1110 case EdgePosition::L_2D:
1111 linkId = getEdgeLink2dL(p.data(), localLinkId);
1113 case EdgePosition::H_2D:
1114 linkId = getEdgeLink2dH(p.data(), localLinkId);
1116 case EdgePosition::D1_2D:
1117 linkId = getEdgeLink2dD1(p.data(), localLinkId);
1126const vector<vector<SimplexId>> *
1127 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
getEdgeLinks)() {
1129 if(edgeLinkList_.empty()) {
1132 edgeLinkList_.resize(edgeNumber_);
1133 for(
SimplexId i = 0; i < edgeNumber_; ++i) {
1139 printMsg(
"Built " + to_string(edgeNumber_) +
" edge links.", 1,
1143 return &edgeLinkList_;
1146template <
typename Derived>
1150#ifndef TTK_ENABLE_KAMIKAZE
1151 if(edgeId < 0 or edgeId >= edgeNumber_)
1155 switch(this->underlying().getEdgePosition(edgeId)) {
1156 case EdgePosition::L_3D:
1157 case EdgePosition::H_3D:
1158 case EdgePosition::P_3D:
1159 case EdgePosition::D4_3D:
1161 case EdgePosition::D1_3D:
1162 case EdgePosition::D2_3D:
1163 case EdgePosition::D3_3D:
1165 case EdgePosition::L_2D:
1166 case EdgePosition::H_2D:
1167 case EdgePosition::D1_2D:
1176template <
typename Derived>
1179 const int &localStarId,
1181#ifndef TTK_ENABLE_KAMIKAZE
1187 const auto &p = this->underlying().getEdgeCoords(edgeId);
1189 switch(this->underlying().getEdgePosition(edgeId)) {
1190 case EdgePosition::L_3D:
1191 starId = getEdgeStarL(p.data(), localStarId);
1193 case EdgePosition::H_3D:
1194 starId = getEdgeStarH(p.data(), localStarId);
1196 case EdgePosition::P_3D:
1197 starId = getEdgeStarP(p.data(), localStarId);
1199 case EdgePosition::D1_3D:
1200 starId = getEdgeStarD1(p.data(), localStarId);
1202 case EdgePosition::D2_3D:
1203 starId = getEdgeStarD2(p.data(), localStarId);
1205 case EdgePosition::D3_3D:
1206 starId = getEdgeStarD3(p.data(), localStarId);
1208 case EdgePosition::D4_3D:
1210 = p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + localStarId;
1212 case EdgePosition::L_2D:
1213 starId = getEdgeStar2dL(p.data(), localStarId);
1215 case EdgePosition::H_2D:
1216 starId = getEdgeStar2dH(p.data(), localStarId);
1218 case EdgePosition::D1_2D:
1219 starId = p[0] * 2 + p[1] * tshift_[0] + localStarId;
1228const vector<vector<SimplexId>> *
1229 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
getEdgeStars)() {
1231 if(edgeStarList_.empty()) {
1234 edgeStarList_.resize(edgeNumber_);
1235 for(
SimplexId i = 0; i < edgeNumber_; ++i) {
1241 printMsg(
"Built " + to_string(edgeNumber_) +
" edge stars.", 1,
1245 return &edgeStarList_;
1248template <
typename Derived>
1251 const int &localVertexId,
1253#ifndef TTK_ENABLE_KAMIKAZE
1256 if(localVertexId < 0 or localVertexId >= 3)
1261 const auto &p = this->underlying().getTriangleCoords(triangleId);
1265 switch(this->underlying().getTrianglePosition(triangleId)) {
1267 vertexId = getTriangleVertexF(p.data(), localVertexId);
1270 vertexId = getTriangleVertexH(p.data(), localVertexId);
1273 vertexId = getTriangleVertexC(p.data(), localVertexId);
1276 vertexId = getTriangleVertexD1(p.data(), localVertexId);
1279 vertexId = getTriangleVertexD2(p.data(), localVertexId);
1282 vertexId = getTriangleVertexD3(p.data(), localVertexId);
1285 if(localVertexId == 0) {
1286 vertexId = p[0] + p[1] *
vshift_[0];
1287 }
else if(localVertexId == 1) {
1288 vertexId = p[0] + p[1] *
vshift_[0] + 1 + wrapXRight;
1289 }
else if(localVertexId == 2) {
1294 if(localVertexId == 0) {
1295 vertexId = p[0] + p[1] *
vshift_[0] + 1 + wrapXRight;
1296 }
else if(localVertexId == 1) {
1297 vertexId = p[0] + p[1] *
vshift_[0] +
vshift_[0] + 1 + wrapXRight
1299 }
else if(localVertexId == 2) {
1310template <
typename Derived>
1313 const int &localEdgeId,
1315#ifndef TTK_ENABLE_KAMIKAZE
1318 if(localEdgeId < 0 or localEdgeId >= 3)
1323 const auto &p = this->underlying().getTriangleCoords(triangleId);
1328 switch(this->underlying().getTrianglePosition(triangleId)) {
1330 edgeId = (
id == 1) ? getTriangleEdgeF_1(p.data(), localEdgeId)
1331 : getTriangleEdgeF_0(p.data(), localEdgeId);
1334 edgeId = (
id == 1) ? getTriangleEdgeH_1(p.data(), localEdgeId)
1335 : getTriangleEdgeH_0(p.data(), localEdgeId);
1338 edgeId = (
id == 1) ? getTriangleEdgeC_1(p.data(), localEdgeId)
1339 : getTriangleEdgeC_0(p.data(), localEdgeId);
1342 edgeId = (
id == 1) ? getTriangleEdgeD1_1(p.data(), localEdgeId)
1343 : getTriangleEdgeD1_0(p.data(), localEdgeId);
1346 edgeId = (
id == 1) ? getTriangleEdgeD2_1(p.data(), localEdgeId)
1347 : getTriangleEdgeD2_0(p.data(), localEdgeId);
1350 edgeId = (
id == 1) ? getTriangleEdgeD3_1(p.data(), localEdgeId)
1351 : getTriangleEdgeD3_0(p.data(), localEdgeId);
1354 if(localEdgeId == 0) {
1355 edgeId = p[0] + p[1] *
eshift_[0];
1356 }
else if(localEdgeId == 1) {
1358 }
else if(localEdgeId == 2) {
1363 if(localEdgeId == 0) {
1364 edgeId = p[0] + (p[1] + 1) *
eshift_[0] + wrapYBottom;
1365 }
else if(localEdgeId == 1) {
1367 }
else if(localEdgeId == 2) {
1379 vector<vector<SimplexId>> &edges)
const {
1383 for(
int j = 0; j < 3; ++j)
1389const vector<vector<SimplexId>> *
1403const vector<std::array<SimplexId, 3>> *
1404 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
getTriangles)() {
1406 if(triangleList_.empty()) {
1409 triangleList_.resize(triangleNumber_);
1410 for(
SimplexId i = 0; i < triangleNumber_; ++i) {
1411 for(
int j = 0; j < 3; ++j)
1412 getTriangleVertexInternal(i, j, triangleList_[i][j]);
1415 printMsg(
"Built " + to_string(triangleNumber_) +
" triangles.", 1,
1419 return &triangleList_;
1422template <
typename Derived>
1425 const int &localLinkId,
1427#ifndef TTK_ENABLE_KAMIKAZE
1433 const auto &p = this->underlying().getTriangleCoords(triangleId);
1435 switch(this->underlying().getTrianglePosition(triangleId)) {
1436 case TrianglePosition::F_3D:
1437 linkId = getTriangleLinkF(p.data(), localLinkId);
1439 case TrianglePosition::H_3D:
1440 linkId = getTriangleLinkH(p.data(), localLinkId);
1442 case TrianglePosition::C_3D:
1443 linkId = getTriangleLinkC(p.data(), localLinkId);
1445 case TrianglePosition::D1_3D:
1446 linkId = getTriangleLinkD1(p.data(), localLinkId);
1448 case TrianglePosition::D2_3D:
1449 linkId = getTriangleLinkD2(p.data(), localLinkId);
1451 case TrianglePosition::D3_3D:
1452 linkId = getTriangleLinkD3(p.data(), localLinkId);
1461SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
1467const vector<vector<SimplexId>> *
1468 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
1471 if(triangleLinkList_.empty()) {
1474 triangleLinkList_.resize(triangleNumber_);
1475 for(
SimplexId i = 0; i < triangleNumber_; ++i) {
1481 printMsg(
"Built " + to_string(triangleNumber_) +
" triangle links.", 1,
1484 return &triangleLinkList_;
1487template <
typename Derived>
1491#ifndef TTK_ENABLE_KAMIKAZE
1492 if(triangleId < 0 or triangleId >= triangleNumber_)
1498 if(dimensionality_ == 3) {
1504template <
typename Derived>
1507 const int &localStarId,
1509#ifndef TTK_ENABLE_KAMIKAZE
1515 const auto &p = this->underlying().getTriangleCoords(triangleId);
1517 switch(this->underlying().getTrianglePosition(triangleId)) {
1518 case TrianglePosition::F_3D:
1519 starId = getTriangleStarF(p.data(), localStarId);
1521 case TrianglePosition::H_3D:
1522 starId = getTriangleStarH(p.data(), localStarId);
1524 case TrianglePosition::C_3D:
1525 starId = getTriangleStarC(p.data(), localStarId);
1527 case TrianglePosition::D1_3D:
1528 starId = getTriangleStarD1(p.data(), localStarId);
1530 case TrianglePosition::D2_3D:
1531 starId = getTriangleStarD2(p.data(), localStarId);
1533 case TrianglePosition::D3_3D:
1534 starId = getTriangleStarD3(p.data(), localStarId);
1543const vector<vector<SimplexId>> *
1544 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
1547 if(triangleStarList_.empty()) {
1550 triangleStarList_.resize(triangleNumber_);
1551 for(
SimplexId i = 0; i < triangleNumber_; ++i) {
1557 printMsg(
"Built " + to_string(triangleNumber_) +
" triangle stars.", 1,
1560 return &triangleStarList_;
1565#ifndef TTK_ENABLE_KAMIKAZE
1578template <
typename Derived>
1581 const int &localNeighborId,
1583#ifndef TTK_ENABLE_KAMIKAZE
1584 if(localNeighborId < 0
1590 const auto &p = this->underlying().getTriangleCoords(triangleId);
1592 switch(this->underlying().getTrianglePosition(triangleId)) {
1596 if(localNeighborId == 0) {
1597 neighborId = triangleId - 1;
1598 }
else if(localNeighborId == 1) {
1599 neighborId = triangleId + 1 -
wrap_[0] * 2;
1600 }
else if(localNeighborId == 2) {
1601 neighborId = triangleId +
tshift_[0] - 1 -
wrap_[1] * 2;
1605 if(localNeighborId == 0) {
1606 neighborId = triangleId - 1;
1607 }
else if(localNeighborId == 1) {
1608 neighborId = triangleId + 1 -
wrap_[0] * 2;
1609 }
else if(localNeighborId == 2) {
1610 neighborId = triangleId +
tshift_[0] - 1;
1614 if(localNeighborId == 0) {
1615 neighborId = triangleId - 1;
1616 }
else if(localNeighborId == 1) {
1617 neighborId = triangleId + 1;
1618 }
else if(localNeighborId == 2) {
1619 neighborId = triangleId +
tshift_[0] - 1 -
wrap_[1] * 2;
1623 if(localNeighborId == 0) {
1624 neighborId = triangleId - 1;
1625 }
else if(localNeighborId == 1) {
1626 neighborId = triangleId + 1;
1627 }
else if(localNeighborId == 2) {
1628 neighborId = triangleId +
tshift_[0] - 1;
1635 if(p[0] == 0 and p[1] == 0) {
1636 if(localNeighborId == 0) {
1637 neighborId = triangleId + 1;
1638 }
else if(localNeighborId == 1) {
1639 neighborId = triangleId - 1 +
wrap_[0] * 2;
1640 }
else if(localNeighborId == 2) {
1641 neighborId = triangleId -
tshift_[0] + 1 +
wrap_[1] * 2;
1644 }
else if(p[0] == 0) {
1645 if(localNeighborId == 0) {
1646 neighborId = triangleId + 1;
1647 }
else if(localNeighborId == 1) {
1648 neighborId = triangleId - 1 +
wrap_[0] * 2;
1649 }
else if(localNeighborId == 2) {
1650 neighborId = triangleId -
tshift_[0] + 1;
1653 }
else if(p[1] == 0) {
1654 if(localNeighborId == 0) {
1655 neighborId = triangleId + 1;
1656 }
else if(localNeighborId == 1) {
1657 neighborId = triangleId - 1;
1658 }
else if(localNeighborId == 2) {
1659 neighborId = triangleId -
tshift_[0] + 1 +
wrap_[1] * 2;
1663 if(localNeighborId == 0) {
1664 neighborId = triangleId + 1;
1665 }
else if(localNeighborId == 1) {
1666 neighborId = triangleId - 1;
1667 }
else if(localNeighborId == 2) {
1668 neighborId = triangleId -
tshift_[0] + 1;
1680 vector<vector<SimplexId>> &neighbors) {
1690template <
typename Derived>
1693#ifndef TTK_ENABLE_KAMIKAZE
1696 if(localVertexId < 0 or localVertexId >= 4)
1703 const auto &p = this->underlying().getTetrahedronCoords(tetId);
1708 vertexId = getTetrahedronVertexABCG(p.data(), localVertexId);
1711 vertexId = getTetrahedronVertexBCDG(p.data(), localVertexId);
1714 vertexId = getTetrahedronVertexABEG(p.data(), localVertexId);
1717 vertexId = getTetrahedronVertexBEFG(p.data(), localVertexId);
1720 vertexId = getTetrahedronVertexBFGH(p.data(), localVertexId);
1723 vertexId = getTetrahedronVertexBDGH(p.data(), localVertexId);
1730template <
typename Derived>
1733#ifndef TTK_ENABLE_KAMIKAZE
1736 if(localEdgeId < 0 or localEdgeId >= 6)
1743 const auto &p = this->underlying().getTetrahedronCoords(tetId);
1748 edgeId = getTetrahedronEdgeABCG(p.data(), localEdgeId);
1751 edgeId = getTetrahedronEdgeBCDG(p.data(), localEdgeId);
1754 edgeId = getTetrahedronEdgeABEG(p.data(), localEdgeId);
1757 edgeId = getTetrahedronEdgeBEFG(p.data(), localEdgeId);
1760 edgeId = getTetrahedronEdgeBFGH(p.data(), localEdgeId);
1763 edgeId = getTetrahedronEdgeBDGH(p.data(), localEdgeId);
1772 vector<vector<SimplexId>> &edges)
const {
1776 for(
int j = 0; j < 6; ++j)
1783template <
typename Derived>
1786 const int &localTriangleId,
1788#ifndef TTK_ENABLE_KAMIKAZE
1791 if(localTriangleId < 0 or localTriangleId >= 4)
1798 const auto &p = this->underlying().getTetrahedronCoords(tetId);
1803 triangleId = getTetrahedronTriangleABCG(p.data(), localTriangleId);
1806 triangleId = getTetrahedronTriangleBCDG(p.data(), localTriangleId);
1809 triangleId = getTetrahedronTriangleABEG(p.data(), localTriangleId);
1812 triangleId = getTetrahedronTriangleBEFG(p.data(), localTriangleId);
1815 triangleId = getTetrahedronTriangleBFGH(p.data(), localTriangleId);
1818 triangleId = getTetrahedronTriangleBDGH(p.data(), localTriangleId);
1827 vector<vector<SimplexId>> &triangles)
const {
1830 triangles[i].resize(4);
1831 for(
int j = 0; j < 4; ++j)
1840#ifndef TTK_ENABLE_KAMIKAZE
1853template <
typename Derived>
1856 const int &localNeighborId,
1858#ifndef TTK_ENABLE_KAMIKAZE
1859 if(localNeighborId < 0
1867 const auto &p = this->underlying().getTetrahedronCoords(tetId);
1873 = getTetrahedronNeighborABCG(tetId, p.data(), localNeighborId);
1877 = getTetrahedronNeighborBCDG(tetId, p.data(), localNeighborId);
1881 = getTetrahedronNeighborABEG(tetId, p.data(), localNeighborId);
1885 = getTetrahedronNeighborBEFG(tetId, p.data(), localNeighborId);
1889 = getTetrahedronNeighborBFGH(tetId, p.data(), localNeighborId);
1893 = getTetrahedronNeighborBDGH(tetId, p.data(), localNeighborId);
1902 vector<vector<SimplexId>> &neighbors) {
1913SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
1916 return dimensionality_ + 1;
1921 const int &localVertexId,
1924 if(dimensionality_ == 3)
1925 getTetrahedronVertex(cellId, localVertexId, vertexId);
1926 else if(dimensionality_ == 2)
1927 getTriangleVertexInternal(cellId, localVertexId, vertexId);
1928 else if(dimensionality_ == 1)
1929 getEdgeVertexInternal(cellId, localVertexId, vertexId);
1956const vector<vector<SimplexId>> *
1975 const int &localTriangleId,
1983const vector<vector<SimplexId>> *
1998SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
2001 if(dimensionality_ == 3)
2002 return getTetrahedronNeighborNumber(cellId);
2003 else if(dimensionality_ == 2)
2004 return getTriangleNeighborNumber(cellId);
2005 else if(dimensionality_ == 1) {
2006 printErr(
"getCellNeighborNumber() not implemented in 1D! (TODO)");
2015 const int &localNeighborId,
2018 if(dimensionality_ == 3)
2019 getTetrahedronNeighbor(cellId, localNeighborId, neighborId);
2020 else if(dimensionality_ == 2)
2021 getTriangleNeighbor(cellId, localNeighborId, neighborId);
2022 else if(dimensionality_ == 1) {
2023 printErr(
"getCellNeighbor() not implemented in 1D! (TODO)");
2030const vector<vector<SimplexId>> *
2031 PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL(
2034 if(cellNeighborList_.empty()) {
2037 if(dimensionality_ == 3)
2038 getTetrahedronNeighbors(cellNeighborList_);
2039 else if(dimensionality_ == 2)
2040 getTriangleNeighbors(cellNeighborList_);
2041 else if(dimensionality_ == 1) {
2042 printErr(
"getCellNeighbors() not implemented in 1D! (TODO)");
2046 printMsg(
"Built " + to_string(cellNumber_) +
" cell neighbors.", 1,
2050 return &cellNeighborList_;
2054template class ttk::PeriodicImplicitTriangulationCRTP<
2055 ttk::PeriodicWithPreconditions>;
2056template class ttk::PeriodicImplicitTriangulationCRTP<
2057 ttk::PeriodicNoPreconditions>;
#define TTK_FORCE_USE(x)
Force the compiler to use the function/method parameter.
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
bool ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL isTriangleOnBoundary(const SimplexId &triangleId) const
SimplexId ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getEdgeLinkNumber(const SimplexId &edgeId) const
int ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getVertexNeighbors()
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getEdgeLinks()
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getVertexStars()
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getEdgeStar(const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const
const vector< std::array< SimplexId, 3 > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getTriangles()
SimplexId ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getVertexLinkNumber(const SimplexId &vertexId) const
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getEdgeStars()
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getTriangleLink(const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const
SimplexId ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getTriangleStarNumber(const SimplexId &triangleId) const
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getVertexLink(const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getCellNeighbors()
SimplexId ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getEdgeStarNumber(const SimplexId &edgeId) const
bool ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL isEdgeOnBoundary(const SimplexId &edgeId) const
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getVertexPoint(const SimplexId &vertexId, float &x, float &y, float &z) const
int ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getCellVertex(const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getVertexStar(const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getVertexLinks()
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getTriangleStars()
bool ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL isVertexOnBoundary(const SimplexId &vertexId) const
SimplexId ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getCellNeighborNumber(const SimplexId &cellId) const
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getEdgeLink(const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) const
int ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getTriangleStar(const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const
SimplexId ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getCellVertexNumber(const SimplexId &) const
SimplexId ImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getVertexStarNumber(const SimplexId &vertexId) const
const vector< vector< SimplexId > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getTriangleLinks()
const vector< std::array< SimplexId, 2 > > *ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getEdges()
SimplexId ImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getTriangleLinkNumber(const SimplexId &triangleId) const
int PeriodicImplicitTriangulationCRTP< Derived >::TTK_TRIANGULATION_INTERNAL getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const
SimplexId PeriodicImplicitTriangulation::TTK_TRIANGULATION_INTERNAL getVertexNeighborNumber(const SimplexId &vertexId) const
std::vector< std::vector< SimplexId > > vertexStarList_
bool hasPeriodicBoundaries_
virtual int getVertexTriangleInternal(const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localTriangleId), SimplexId &ttkNotUsed(triangleId)) const
std::vector< std::vector< SimplexId > > vertexEdgeList_
std::vector< std::vector< SimplexId > > triangleEdgeVector_
virtual int getTriangleEdgeInternal(const SimplexId &ttkNotUsed(triangleId), const int &ttkNotUsed(localEdgeId), SimplexId &ttkNotUsed(edgeId)) const
virtual SimplexId getEdgeTriangleNumberInternal(const SimplexId &ttkNotUsed(edgeId)) const
virtual int getEdgeTriangleInternal(const SimplexId &ttkNotUsed(edgeId), const int &ttkNotUsed(localTriangleId), SimplexId &ttkNotUsed(triangleId)) const
virtual int getVertexEdgeInternal(const SimplexId &ttkNotUsed(vertexId), const int &ttkNotUsed(localEdgeId), SimplexId &ttkNotUsed(edgeId)) const
std::vector< std::vector< SimplexId > > vertexTriangleList_
std::vector< std::vector< SimplexId > > cellEdgeVector_
std::vector< std::vector< SimplexId > > cellTriangleVector_
std::vector< std::vector< SimplexId > > edgeTriangleList_
void setDebugMsgPrefix(const std::string &prefix)
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
int getTetrahedronVertex(const SimplexId &tetId, const int &localVertexId, SimplexId &vertexId) const override
int getTetrahedronTriangle(const SimplexId &tetId, const int &id, SimplexId &triangleId) const override
int getTriangleVertexInternal(const SimplexId &triangleId, const int &localVertexId, SimplexId &vertexId) const override
int getEdgeVertexInternal(const SimplexId &edgeId, const int &localVertexId, SimplexId &vertexId) const override
int getVertexTriangleInternal(const SimplexId &vertexId, const int &id, SimplexId &triangleId) const override
int getTriangleEdgeInternal(const SimplexId &triangleId, const int &id, SimplexId &edgeId) const override
int getTetrahedronNeighbor(const SimplexId &tetId, const int &localNeighborId, SimplexId &neighborId) const override
int getVertexEdgeInternal(const SimplexId &vertexId, const int &id, SimplexId &edgeId) const override
SimplexId getEdgeTriangleNumberInternal(const SimplexId &edgeId) const override
int getEdgeTriangleInternal(const SimplexId &edgeId, const int &id, SimplexId &triangleId) const override
int getTetrahedronEdge(const SimplexId &tetId, const int &id, SimplexId &edgeId) const override
int getTriangleNeighbor(const SimplexId &triangleId, const int &localNeighborId, SimplexId &neighborId) const override
int getTriangleNeighbors(std::vector< std::vector< SimplexId > > &neighbors)
virtual int getTetrahedronNeighbor(const SimplexId &tetId, const int &localNeighborId, SimplexId &neighborId) const =0
int getCellTriangleInternal(const SimplexId &cellId, const int &id, SimplexId &triangleId) const override
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
const std::vector< std::vector< SimplexId > > * getTriangleEdgesInternal() override
int getTetrahedronNeighbors(std::vector< std::vector< SimplexId > > &neighbors)
SimplexId getVertexEdgeNumberInternal(const SimplexId &vertexId) const override
SimplexId getCellEdgeNumberInternal(const SimplexId &cellId) const override
int getTetrahedronEdges(std::vector< std::vector< SimplexId > > &edges) const
SimplexId getTriangleNeighborNumber(const SimplexId &triangleId) const
const std::array< ttk::SimplexId, 3 > & getGridDimensions() const override
SimplexId tetrahedronNumber_
SimplexId triangleNumber_
const std::vector< std::vector< SimplexId > > * getEdgeTrianglesInternal() override
virtual int getTriangleNeighbor(const SimplexId &triangleId, const int &localNeighborId, SimplexId &neighborId) const =0
bool isPowerOfTwo(unsigned long long int v, unsigned long long int &r)
int TTK_TRIANGULATION_INTERNAL getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const override
SimplexId TTK_TRIANGULATION_INTERNAL getVertexNeighborNumber(const SimplexId &vertexId) const override
virtual int getTetrahedronEdge(const SimplexId &tetId, const int &id, SimplexId &edgeId) const =0
virtual int getTetrahedronTriangle(const SimplexId &tetId, const int &id, SimplexId &triangleId) const =0
const std::vector< std::vector< SimplexId > > * getVertexEdgesInternal() override
~PeriodicImplicitTriangulation() override
PeriodicImplicitTriangulation()
SimplexId getVertexTriangleNumberInternal(const SimplexId &vertexId) const override
int getTetrahedronTriangles(std::vector< std::vector< SimplexId > > &triangles) const
const std::vector< std::vector< SimplexId > > * getCellEdgesInternal() override
int getCellEdgeInternal(const SimplexId &cellId, const int &id, SimplexId &edgeId) const override
SimplexId getTetrahedronNeighborNumber(const SimplexId &tetId) const
const std::vector< std::vector< SimplexId > > * getCellTrianglesInternal() override
const std::vector< std::vector< SimplexId > > * getVertexTrianglesInternal() override
virtual void vertexToPosition(const SimplexId vertex, SimplexId p[3]) const =0
std::array< SimplexId, 3 > dimensions_
virtual void vertexToPosition2d(const SimplexId vertex, SimplexId p[2]) const =0
TTK base package defining the standard types.
COMMON_EXPORTS int MPIsize_
int SimplexId
Identifier type for simplices of any dimension.
COMMON_EXPORTS int MPIrank_
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/| (_) |"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)