48 const int &localNeighborId,
54 const std::vector<std::vector<SimplexId>> *
68 const std::vector<std::vector<SimplexId>> *
73 const int &localVertexId,
86 const std::vector<std::vector<SimplexId>> *
89 const std::vector<std::vector<SimplexId>> *
92 const std::vector<std::vector<SimplexId>> *
95 const std::vector<std::array<SimplexId, 2>> *
125 std::vector<std::vector<SimplexId>> &triangles)
const;
128 const int &localNeighborId,
136 const int &localVertexId,
146 const std::vector<std::vector<SimplexId>> *
150 std::vector<std::vector<SimplexId>> &edges)
const;
153 const SimplexId &triangleId)
const override;
155 const std::vector<std::vector<SimplexId>> *
159 const int &localNeighborId,
166 const std::vector<std::vector<SimplexId>> *
169 const std::vector<std::array<SimplexId, 3>> *
175 const std::vector<std::vector<SimplexId>> *
179 const SimplexId &vertexId)
const override;
181 const std::vector<std::vector<SimplexId>> *
185 const SimplexId &vertexId)
const override;
187 const std::vector<std::vector<SimplexId>> *
191 const SimplexId &vertexId)
const override;
193 const std::vector<std::vector<SimplexId>> *
199 const std::vector<std::vector<SimplexId>> *
210 const SimplexId &triangleId)
const override;
213 const SimplexId &vertexId)
const override;
216 const float &yOrigin,
217 const float &zOrigin,
218 const float &xSpacing,
219 const float &ySpacing,
220 const float &zSpacing,
225 inline const std::array<ttk::SimplexId, 3> &
255 int &vtkId)
const override {
256#ifndef TTK_ENABLE_KAMIKAZE
262 vtkId = ttkId / nSimplexPerCell;
364 bool isPowerOfTwo(
unsigned long long int v,
unsigned long long int &r);
525 int preconditionDistributedCells()
override;
527 std::array<unsigned char, 6> isBoundaryPeriodic{};
530 void createMetaGrid(
const double *
const bounds)
override;
531 void setIsBoundaryPeriodic(std::array<unsigned char, 6> boundary);
532 int getCellRankInternal(
const SimplexId lcid)
const override;
535 std::array<SimplexId, 3>
536 getVertGlobalCoords(
const SimplexId lvid)
const override;
537 std::array<SimplexId, 3>
538 getVertLocalCoords(
const SimplexId gvid)
const override;
543 template <
typename Derived>
546 inline Derived &underlying() {
547 return static_cast<Derived &
>(*this);
549 inline Derived
const &underlying()
const {
550 return static_cast<Derived
const &
>(*this);
556 const int &localNeighborId,
569 const int &localLinkId,
574 const int &localStarId,
580 float &z)
const override;
583 const int &localVertexId,
595 const int &localLinkId,
603 const int &localStarId,
607 const int &localVertexId,
616 const int &localLinkId,
621 const int &localStarId,
625 const SimplexId &triangleId)
const override;
628 const int &localNeighborId,
632 const int &localVertexId,
644 const int &localNeighborId,
655 std::array<float, 3> p0{}, p1{};
659 const auto &ind0 = this->underlying().getVertexCoords(v0);
660 const auto &ind1 = this->underlying().getVertexCoords(v1);
670 for(
int i = 0; i < 3; ++i) {
671 incenter[i] = 0.5f * (p0[i] + p1[i]);
682 float incenter[3])
const {
689 std::array<float, 3> p0{}, p1{}, p2{};
694 const auto &ind0 = this->underlying().getVertexCoords(v0);
695 const auto &ind1 = this->underlying().getVertexCoords(v1);
696 const auto &ind2 = this->underlying().getVertexCoords(v2);
714 const float sum = d[0] + d[1] + d[2];
715 for(
int i = 0; i < 3; ++i) {
716 incenter[i] = (d[0] * p0[i] + d[1] * p1[i] + d[2] * p2[i]) / sum;
734 std::array<float, 3> p0{}, p1{}, p2{}, p3{};
740 const auto &ind0 = this->underlying().getVertexCoords(v0);
741 const auto &ind1 = this->underlying().getVertexCoords(v1);
742 const auto &ind2 = this->underlying().getVertexCoords(v2);
743 const auto &ind3 = this->underlying().getVertexCoords(v3);
765 for(
int i = 0; i < 3; ++i) {
766 incenter[i] = 0.25f * (p0[i] + p1[i] + p2[i] + p3[i]);
778 SimplexId p[2])
const {
780 p[0] = vertex &
mod_[0];
781 p[1] = vertex >>
div_[0];
788inline void ttk::PeriodicImplicitTriangulation::edgeToPosition2d(
790 const int e = (k) ? edge - esetshift_[k - 1] : edge;
791 p[0] = e % eshift_[2 * k];
792 p[1] = e / eshift_[2 * k];
797 p[0] = triangle % tshift_[0];
798 p[1] = triangle / tshift_[0];
801inline ttk::SimplexId ttk::PeriodicImplicitTriangulation::getVertexNeighbor2d(
808 wrapXLeft = wrap_[0];
809 if(p[0] == nbvoxels_[Di_])
810 wrapXRight = -wrap_[0];
813 if(p[1] == nbvoxels_[Dj_])
814 wrapYBottom = -wrap_[1];
817 return v - 1 + wrapXLeft;
819 return v - vshift_[0] + wrapYTop;
821 return v - vshift_[0] + 1 + wrapXRight + wrapYTop;
823 return v + 1 + wrapXRight;
825 return v + vshift_[0] + wrapYBottom;
827 return v + vshift_[0] - 1 + wrapXLeft + wrapYBottom;
833 ttk::PeriodicImplicitTriangulation::getVertexEdge2d(
const SimplexId p[2],
834 const int id)
const {
838 wrapXLeft = wrap_[0];
843 return esetshift_[0] + p[0] + (p[1] - 1) * eshift_[2] + wrapYTop;
845 return p[0] + p[1] * eshift_[0] - 1 + wrapXLeft;
847 return esetshift_[1] + p[0] + (p[1] - 1) * eshift_[4] + wrapYTop;
849 return p[0] + p[1] * eshift_[0];
851 return esetshift_[0] + p[0] + p[1] * eshift_[2];
853 return esetshift_[1] + p[0] + p[1] * eshift_[4] - 1 + wrapXLeft;
859 ttk::PeriodicImplicitTriangulation::getVertexStar2d(
const SimplexId p[2],
860 const int id)
const {
864 wrapXLeft = 2 * wrap_[0];
866 wrapYTop = 2 * wrap_[1];
869 return (p[0] - 1) * 2 + p[1] * tshift_[0] + wrapXLeft;
871 return (p[0] - 1) * 2 + p[1] * tshift_[0] + 1 + wrapXLeft;
873 return p[0] * 2 + p[1] * tshift_[0];
875 return p[0] * 2 + (p[1] - 1) * tshift_[0] + wrapYTop;
877 return p[0] * 2 + (p[1] - 1) * tshift_[0] + 1 + wrapYTop;
879 return (p[0] - 1) * 2 + (p[1] - 1) * tshift_[0] + 1 + wrapXLeft
886 ttk::PeriodicImplicitTriangulation::getVertexLink2d(
const SimplexId p[2],
887 const int id)
const {
893 wrapXLeft = wrap_[0];
894 if(p[0] == nbvoxels_[Di_])
895 wrapXRight = -wrap_[0];
898 if(p[1] == nbvoxels_[Dj_])
899 wrapYBottom = -wrap_[1];
902 return esetshift_[0] + p[0] + p[1] * eshift_[2] - 1 + wrapXLeft;
904 return p[0] + (p[1] + 1) * eshift_[0] - 1 + wrapXLeft + wrapYBottom;
906 return esetshift_[1] + p[0] + p[1] * eshift_[4];
908 return esetshift_[0] + p[0] + (p[1] - 1) * eshift_[2] + 1 + wrapXRight
911 return p[0] + (p[1] - 1) * eshift_[0] + wrapYTop;
913 return esetshift_[1] + p[0] + (p[1] - 1) * eshift_[4] - 1 + wrapXLeft
920 ttk::PeriodicImplicitTriangulation::getEdgeTriangle2dL(
const SimplexId p[3],
921 const int id)
const {
924 wrapYTop = 2 * wrap_[1];
927 return p[Di_] * 2 + p[Dj_] * tshift_[0];
929 return p[Di_] * 2 + (p[Dj_] - 1) * tshift_[0] + 1 + wrapYTop;
935 ttk::PeriodicImplicitTriangulation::getEdgeTriangle2dH(
const SimplexId p[3],
936 const int id)
const {
939 wrapXLeft = 2 * wrap_[0];
942 return p[Di_] * 2 + p[Dj_] * tshift_[0];
944 return (p[Di_] - 1) * 2 + p[Dj_] * tshift_[0] + 1 + wrapXLeft;
950 ttk::PeriodicImplicitTriangulation::getEdgeTriangle2dD1(
const SimplexId p[3],
951 const int id)
const {
954 return p[Di_] * 2 + p[Dj_] * tshift_[0];
956 return p[Di_] * 2 + p[Dj_] * tshift_[0] + 1;
962 ttk::PeriodicImplicitTriangulation::getEdgeLink2dL(
const SimplexId p[2],
963 const int id)
const {
964 if(p[1] > 0 and p[1] < nbvoxels_[Dj_]) {
967 return p[0] + (p[1] + 1) * vshift_[0];
969 return ((p[0] < nbvoxels_[Di_])
970 ? (p[0] + (p[1] - 1) * vshift_[0] + 1)
971 : (p[0] + (p[1] - 1) * vshift_[0] + 1 - wrap_[0]));
974 }
else if(p[1] == 0) {
977 return p[0] + (p[1] + 1) * vshift_[0];
979 return ((p[0] < nbvoxels_[Di_])
980 ? (p[0] + (p[1] - 1) * vshift_[0] + 1)
981 : (p[0] + (p[1] - 1) * vshift_[0] + 1 - wrap_[0]))
988 return p[0] + (p[1] + 1) * vshift_[0] - wrap_[1];
990 return ((p[0] < nbvoxels_[Di_])
991 ? (p[0] + (p[1] - 1) * vshift_[0] + 1)
992 : (p[0] + (p[1] - 1) * vshift_[0] + 1 - wrap_[0]));
999 ttk::PeriodicImplicitTriangulation::getEdgeLink2dH(
const SimplexId p[2],
1000 const int id)
const {
1001 if(p[0] > 0 and p[0] < nbvoxels_[Di_]) {
1004 return p[0] + p[1] * vshift_[0] + 1;
1006 return ((p[1] < nbvoxels_[Dj_])
1007 ? (p[0] + (p[1] + 1) * vshift_[0] - 1)
1008 : (p[0] + (p[1] + 1) * vshift_[0] - 1 - wrap_[1]));
1011 }
else if(p[0] == 0) {
1014 return p[0] + p[1] * vshift_[0] + 1 + wrap_[0];
1016 return ((p[1] < nbvoxels_[Dj_])
1017 ? (p[0] + (p[1] + 1) * vshift_[0] - 1)
1018 : (p[0] + (p[1] + 1) * vshift_[0] - 1 - wrap_[1]));
1024 return p[0] + p[1] * vshift_[0] + 1;
1026 return ((p[1] < nbvoxels_[Dj_])
1027 ? (p[0] + (p[1] + 1) * vshift_[0] - 1)
1028 : (p[0] + (p[1] + 1) * vshift_[0] - 1 - wrap_[1]))
1036 ttk::PeriodicImplicitTriangulation::getEdgeLink2dD1(
const SimplexId p[2],
1037 const int id)
const {
1038 const SimplexId wrapX = (p[0] < nbvoxels_[Di_]) ? 0 : wrap_[0];
1039 const SimplexId wrapY = (p[1] < nbvoxels_[Dj_]) ? 0 : wrap_[1];
1042 return p[0] + p[1] * vshift_[0];
1044 return p[0] + (p[1] + 1) * vshift_[0] + 1 - wrapX - wrapY;
1050 ttk::PeriodicImplicitTriangulation::getEdgeStar2dL(
const SimplexId p[2],
1051 const int id)
const {
1055 return p[0] * 2 + p[1] * tshift_[0];
1057 return p[0] * 2 + (p[1] - 1) * tshift_[0] + 1 + 2 * wrap_[1];
1063 return p[0] * 2 + p[1] * tshift_[0];
1065 return p[0] * 2 + (p[1] - 1) * tshift_[0] + 1;
1072 ttk::PeriodicImplicitTriangulation::getEdgeStar2dH(
const SimplexId p[2],
1073 const int id)
const {
1077 return p[0] * 2 + p[1] * tshift_[0];
1079 return (p[0] - 1) * 2 + p[1] * tshift_[0] + 1 + 2 * wrap_[0];
1085 return p[0] * 2 + p[1] * tshift_[0];
1087 return (p[0] - 1) * 2 + p[1] * tshift_[0] + 1;
1096 if(isAccelerated_) {
1097 p[0] = vertex & mod_[0];
1098 p[1] = (vertex & mod_[1]) >> div_[0];
1099 p[2] = vertex >> div_[1];
1101 p[0] = vertex % vshift_[0];
1102 p[1] = (vertex % vshift_[1]) / vshift_[0];
1103 p[2] = vertex / vshift_[1];
1107inline void ttk::PeriodicImplicitTriangulation::edgeToPosition(
1109 const int e = (k) ? edge - esetshift_[k - 1] : edge;
1110 p[0] = e % eshift_[2 * k];
1111 p[1] = (e % eshift_[2 * k + 1]) / eshift_[2 * k];
1112 p[2] = e / eshift_[2 * k + 1];
1117 const SimplexId t = (k) ? triangle - tsetshift_[k - 1] : triangle;
1118 p[0] = t % tshift_[2 * k];
1119 p[1] = (t % tshift_[2 * k + 1]) / tshift_[2 * k];
1120 p[2] = t / tshift_[2 * k + 1];
1125 p[0] = (tetrahedron % tetshift_[0]) / 6;
1126 p[1] = (tetrahedron % tetshift_[1]) / tetshift_[0];
1127 p[2] = tetrahedron / tetshift_[1];
1130inline ttk::SimplexId ttk::PeriodicImplicitTriangulation::getVertexNeighbor3d(
1139 wrapXLeft = wrap_[0];
1140 if(p[0] == nbvoxels_[0])
1141 wrapXRight = -wrap_[0];
1143 wrapYTop = wrap_[1];
1144 if(p[1] == nbvoxels_[1])
1145 wrapYBottom = -wrap_[1];
1147 wrapZBack = wrap_[2];
1148 if(p[2] == nbvoxels_[2])
1149 wrapZFront = -wrap_[2];
1152 return v - vshift_[0] - vshift_[1] + wrapYTop + wrapZBack;
1154 return v + 1 - vshift_[0] - vshift_[1] + wrapXRight + wrapYTop
1157 return v - vshift_[1] + wrapZBack;
1159 return v + 1 - vshift_[1] + wrapXRight + wrapZBack;
1161 return v - vshift_[0] + wrapYTop;
1163 return v + 1 - vshift_[0] + wrapXRight + wrapYTop;
1165 return v + 1 + wrapXRight;
1167 return v - 1 + vshift_[1] + wrapXLeft + wrapZFront;
1169 return v + vshift_[1] + wrapZFront;
1171 return v - 1 + wrapXLeft;
1173 return v - 1 + vshift_[0] + wrapXLeft + wrapYBottom;
1175 return v + vshift_[0] + wrapYBottom;
1177 return v - 1 + vshift_[0] + vshift_[1] + wrapXLeft + wrapYBottom
1180 return v + vshift_[0] + vshift_[1] + wrapYBottom + wrapZFront;
1186 ttk::PeriodicImplicitTriangulation::getVertexEdge3d(
const SimplexId p[3],
1187 const int id)
const {
1192 wrapXLeft = wrap_[0];
1194 wrapYTop = wrap_[1];
1196 wrapZBack = wrap_[2];
1199 return esetshift_[3] + p[0] + (p[1] - 1) * eshift_[8]
1200 + (p[2] - 1) * eshift_[9] + wrapYTop + wrapZBack;
1202 return esetshift_[5] + p[0] + (p[1] - 1) * eshift_[12]
1203 + (p[2] - 1) * eshift_[13] + wrapYTop + wrapZBack;
1205 return esetshift_[1] + p[0] + p[1] * eshift_[4] + (p[2] - 1) * eshift_[5]
1208 return esetshift_[4] + p[0] + p[1] * eshift_[10]
1209 + (p[2] - 1) * eshift_[11] + wrapZBack;
1211 return esetshift_[0] + p[0] + (p[1] - 1) * eshift_[2] + p[2] * eshift_[3]
1214 return esetshift_[2] + p[0] + (p[1] - 1) * eshift_[6] + p[2] * eshift_[7]
1217 return p[0] + p[1] * eshift_[0] + p[2] * eshift_[1];
1219 return esetshift_[4] + p[0] + p[1] * eshift_[10] + p[2] * eshift_[11] - 1
1222 return esetshift_[1] + p[0] + p[1] * eshift_[4] + p[2] * eshift_[5];
1224 return p[0] + p[1] * eshift_[0] + p[2] * eshift_[1] - 1 + wrapXLeft;
1226 return esetshift_[2] + p[0] + p[1] * eshift_[6] + p[2] * eshift_[7] - 1
1229 return esetshift_[0] + p[0] + p[1] * eshift_[2] + p[2] * eshift_[3];
1231 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13] - 1
1234 return esetshift_[3] + p[0] + p[1] * eshift_[8] + p[2] * eshift_[9];
1240 ttk::PeriodicImplicitTriangulation::getVertexLink3d(
const SimplexId p[3],
1241 const int id)
const {
1249 wrapXLeft = 2 * wrap_[0];
1250 if(p[0] == nbvoxels_[0])
1251 wrapXRight = -2 * wrap_[0];
1253 wrapYTop = 2 * wrap_[1];
1254 if(p[1] == nbvoxels_[1])
1255 wrapYBottom = -2 * wrap_[1];
1257 wrapZBack = 2 * wrap_[2];
1258 if(p[2] == nbvoxels_[2])
1259 wrapZFront = -2 * wrap_[2];
1262 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11];
1264 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7]
1267 return tsetshift_[1] + (p[0] - 1) * 2 + p[1] * tshift_[4]
1268 + p[2] * tshift_[5] + wrapXLeft;
1270 return tsetshift_[1] + (p[0] - 1) * 2 + p[1] * tshift_[4]
1271 + p[2] * tshift_[5] + 1 + wrapXLeft;
1273 return tsetshift_[0] + (p[0] - 1) * 2 + (p[1] + 1) * tshift_[2]
1274 + p[2] * tshift_[3] + wrapXLeft + wrapYBottom;
1276 return tsetshift_[0] + (p[0] - 1) * 2 + (p[1] + 1) * tshift_[2]
1277 + p[2] * tshift_[3] + 1 + wrapXLeft + wrapYBottom;
1279 return (p[0] - 1) * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1]
1280 + wrapXLeft + wrapZFront;
1282 return (p[0] - 1) * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1] + 1
1283 + wrapXLeft + wrapZFront;
1285 return tsetshift_[3] + p[0] * 2 + (p[1] - 1) * tshift_[8]
1286 + p[2] * tshift_[9] + wrapYTop;
1288 return tsetshift_[2] + p[0] * 2 + (p[1] - 1) * tshift_[6]
1289 + p[2] * tshift_[7] + wrapYTop;
1291 return tsetshift_[4] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[10]
1292 + p[2] * tshift_[11] + wrapXLeft + wrapYTop;
1294 return tsetshift_[3] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[8]
1295 + p[2] * tshift_[9] + 1 + wrapXLeft + wrapYTop;
1297 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8]
1298 + (p[2] - 1) * tshift_[9] + wrapZBack;
1300 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10]
1301 + (p[2] - 1) * tshift_[11] + 1 + wrapZBack;
1303 return tsetshift_[2] + (p[0] - 1) * 2 + p[1] * tshift_[6]
1304 + (p[2] - 1) * tshift_[7] + 1 + wrapXLeft + wrapZBack;
1306 return tsetshift_[3] + (p[0] - 1) * 2 + p[1] * tshift_[8]
1307 + (p[2] - 1) * tshift_[9] + 1 + wrapXLeft + wrapZBack;
1309 return tsetshift_[1] + (p[0] + 1) * 2 + (p[1] - 1) * tshift_[4]
1310 + (p[2] - 1) * tshift_[5] + wrapXRight + wrapYTop + wrapZBack;
1312 return tsetshift_[1] + (p[0] + 1) * 2 + (p[1] - 1) * tshift_[4]
1313 + (p[2] - 1) * tshift_[5] + 1 + wrapXRight + wrapYTop + wrapZBack;
1315 return tsetshift_[0] + p[0] * 2 + (p[1] - 1) * tshift_[2]
1316 + (p[2] - 1) * tshift_[3] + wrapYTop + wrapZBack;
1318 return tsetshift_[0] + p[0] * 2 + (p[1] - 1) * tshift_[2]
1319 + (p[2] - 1) * tshift_[3] + 1 + wrapYTop + wrapZBack;
1321 return p[0] * 2 + (p[1] - 1) * tshift_[0] + (p[2] - 1) * tshift_[1]
1322 + wrapYTop + wrapZBack;
1324 return p[0] * 2 + (p[1] - 1) * tshift_[0] + (p[2] - 1) * tshift_[1] + 1
1325 + wrapYTop + wrapZBack;
1327 return tsetshift_[4] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[10]
1328 + (p[2] - 1) * tshift_[11] + 1 + wrapXLeft + wrapYTop + wrapZBack;
1330 return tsetshift_[2] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[6]
1331 + (p[2] - 1) * tshift_[7] + wrapXLeft + wrapYTop + wrapZBack;
1337 ttk::PeriodicImplicitTriangulation::getVertexTriangle3d(
const SimplexId p[3],
1338 const int id)
const {
1343 wrapXLeft = 2 * wrap_[0];
1345 wrapYTop = 2 * wrap_[1];
1347 wrapZBack = 2 * wrap_[2];
1350 return (p[0] - 1) * 2 + p[1] * tshift_[0] + p[2] * tshift_[1] + 1
1353 return tsetshift_[4] + (p[0] - 1) * 2 + p[1] * tshift_[10]
1354 + p[2] * tshift_[11] + wrapXLeft;
1356 return tsetshift_[2] + (p[0] - 1) * 2 + p[1] * tshift_[6]
1357 + p[2] * tshift_[7] + wrapXLeft;
1359 return tsetshift_[3] + (p[0] - 1) * 2 + p[1] * tshift_[8]
1360 + p[2] * tshift_[9] + 1 + wrapXLeft;
1362 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5];
1364 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5]
1367 return tsetshift_[4] + (p[0] - 1) * 2 + p[1] * tshift_[10]
1368 + p[2] * tshift_[11] + 1 + wrapXLeft;
1370 return tsetshift_[0] + (p[0] - 1) * 2 + p[1] * tshift_[2]
1371 + p[2] * tshift_[3] + 1 + wrapXLeft;
1373 return tsetshift_[2] + (p[0] - 1) * 2 + p[1] * tshift_[6]
1374 + p[2] * tshift_[7] + 1 + wrapXLeft;
1376 return tsetshift_[3] + (p[0] - 1) * 2 + p[1] * tshift_[8]
1377 + p[2] * tshift_[9] + wrapXLeft;
1379 return tsetshift_[0] + (p[0] - 1) * 2 + p[1] * tshift_[2]
1380 + p[2] * tshift_[3] + wrapXLeft;
1382 return (p[0] - 1) * 2 + p[1] * tshift_[0] + p[2] * tshift_[1] + wrapXLeft;
1384 return p[0] * 2 + tsetshift_[2] + (p[1] - 1) * tshift_[6]
1385 + (p[2] - 1) * tshift_[7] + wrapYTop + wrapZBack;
1387 return p[0] * 2 + tsetshift_[2] + (p[1] - 1) * tshift_[6]
1388 + (p[2] - 1) * tshift_[7] + 1 + wrapYTop + wrapZBack;
1390 return p[0] * 2 + tsetshift_[1] + (p[1] - 1) * tshift_[4]
1391 + (p[2] - 1) * tshift_[5] + wrapYTop + wrapZBack;
1393 return p[0] * 2 + tsetshift_[1] + (p[1] - 1) * tshift_[4]
1394 + (p[2] - 1) * tshift_[5] + 1 + wrapYTop + wrapZBack;
1396 return p[0] * 2 + tsetshift_[3] + (p[1] - 1) * tshift_[8]
1397 + (p[2] - 1) * tshift_[9] + wrapYTop + wrapZBack;
1399 return p[0] * 2 + tsetshift_[3] + (p[1] - 1) * tshift_[8]
1400 + (p[2] - 1) * tshift_[9] + 1 + wrapYTop + wrapZBack;
1402 return p[0] * 2 + tsetshift_[4] + (p[1] - 1) * tshift_[10]
1403 + (p[2] - 1) * tshift_[11] + wrapYTop + wrapZBack;
1405 return p[0] * 2 + tsetshift_[4] + (p[1] - 1) * tshift_[10]
1406 + (p[2] - 1) * tshift_[11] + 1 + wrapYTop + wrapZBack;
1408 return p[0] * 2 + (p[1] - 1) * tshift_[0] + p[2] * tshift_[1] + wrapYTop;
1410 return p[0] * 2 + (p[1] - 1) * tshift_[0] + p[2] * tshift_[1] + 1
1413 return p[0] * 2 + tsetshift_[0] + p[1] * tshift_[2]
1414 + (p[2] - 1) * tshift_[3] + wrapZBack;
1416 return p[0] * 2 + tsetshift_[0] + p[1] * tshift_[2]
1417 + (p[2] - 1) * tshift_[3] + 1 + wrapZBack;
1419 return (p[0] - 1) * 2 + (p[1] - 1) * tshift_[0] + p[2] * tshift_[1] + 1
1420 + wrapXLeft + wrapYTop;
1422 return tsetshift_[2] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[6]
1423 + p[2] * tshift_[7] + wrapXLeft + wrapYTop;
1425 return tsetshift_[1] + p[0] * 2 + (p[1] - 1) * tshift_[4]
1426 + p[2] * tshift_[5] + wrapYTop;
1428 return p[0] * 2 + tsetshift_[2] + p[1] * tshift_[6]
1429 + (p[2] - 1) * tshift_[7] + 1 + wrapZBack;
1431 return p[0] * 2 + tsetshift_[1] + p[1] * tshift_[4]
1432 + (p[2] - 1) * tshift_[5] + 1 + wrapZBack;
1434 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1];
1436 return tsetshift_[3] + (p[0] - 1) * 2 + (p[1] - 1) * tshift_[8]
1437 + (p[2] - 1) * tshift_[9] + 1 + wrapXLeft + wrapYTop + wrapZBack;
1439 return tsetshift_[0] + (p[0] - 1) * 2 + p[1] * tshift_[2]
1440 + (p[2] - 1) * tshift_[3] + 1 + wrapXLeft + wrapZBack;
1442 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3];
1444 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
1446 return tsetshift_[4] + (p[0] - 1) * 2 + p[1] * tshift_[10]
1447 + (p[2] - 1) * tshift_[11] + 1 + wrapXLeft + wrapZBack;
1449 return p[0] * 2 + tsetshift_[4] + (p[1] - 1) * tshift_[10]
1450 + p[2] * tshift_[11] + wrapYTop;
1456 ttk::PeriodicImplicitTriangulation::getVertexStar3d(
const SimplexId p[3],
1457 const int id)
const {
1462 wrapXLeft = 6 * wrap_[0];
1464 wrapYTop = 6 * wrap_[1];
1466 wrapZBack = 6 * wrap_[2];
1469 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1]
1472 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 1
1475 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2
1478 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 3
1481 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 4
1484 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 5
1487 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1488 + wrapYTop + wrapZBack;
1490 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1491 + 1 + wrapYTop + wrapZBack;
1493 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1494 + 2 + wrapYTop + wrapZBack;
1496 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1497 + 3 + wrapYTop + wrapZBack;
1499 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1500 + 4 + wrapYTop + wrapZBack;
1502 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1503 + 5 + wrapYTop + wrapZBack;
1505 return p[0] * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1];
1507 return p[0] * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2;
1509 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1]
1512 return p[0] * 6 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1] + 1
1515 return (p[0] - 1) * 6 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1]
1516 + 1 + wrapXLeft + wrapYTop;
1518 return (p[0] - 1) * 6 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1]
1519 + 5 + wrapXLeft + wrapYTop;
1521 return p[0] * 6 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1] + 2
1524 return p[0] * 6 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1] + 3
1527 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1528 + 3 + wrapXLeft + wrapZBack;
1530 return (p[0] - 1) * 6 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1]
1531 + 4 + wrapXLeft + wrapZBack;
1533 return (p[0] - 1) * 6 + (p[1] - 1) * tetshift_[0]
1534 + (p[2] - 1) * tetshift_[1] + 4 + wrapXLeft + wrapYTop + wrapZBack;
1536 return (p[0] - 1) * 6 + (p[1] - 1) * tetshift_[0]
1537 + (p[2] - 1) * tetshift_[1] + 5 + wrapXLeft + wrapYTop + wrapZBack;
1543 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dL(
const SimplexId p[3],
1544 const int id)
const {
1548 wrapYTop = 2 * wrap_[1];
1550 wrapZBack = 2 * wrap_[2];
1553 return p[0] * 2 + (p[1] - 1) * tshift_[0] + p[2] * tshift_[1] + 1
1556 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3];
1558 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2]
1559 + (p[2] - 1) * tshift_[3] + 1 + wrapZBack;
1561 return tsetshift_[3] + p[0] * 2 + (p[1] - 1) * tshift_[8]
1562 + (p[2] - 1) * tshift_[9] + 1 + wrapYTop + wrapZBack;
1564 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1];
1566 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
1572 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dH(
const SimplexId p[3],
1573 const int id)
const {
1577 wrapXLeft = 2 * wrap_[0];
1579 wrapZBack = 2 * wrap_[2];
1582 return (p[0] - 1) * 2 + p[1] * tshift_[0] + p[2] * tshift_[1] + 1
1585 return tsetshift_[2] + (p[0] - 1) * 2 + p[1] * tshift_[6]
1586 + p[2] * tshift_[7] + wrapXLeft;
1588 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5];
1590 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4]
1591 + (p[2] - 1) * tshift_[5] + 1 + wrapZBack;
1593 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6]
1594 + (p[2] - 1) * tshift_[7] + 1 + wrapZBack;
1596 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1];
1602 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dP(
const SimplexId p[3],
1603 const int id)
const {
1607 wrapXLeft = 2 * wrap_[0];
1609 wrapYTop = 2 * wrap_[1];
1612 return tsetshift_[0] + (p[0] - 1) * 2 + p[1] * tshift_[2]
1613 + p[2] * tshift_[3] + 1 + wrapXLeft;
1615 return tsetshift_[4] + (p[0] - 1) * 2 + p[1] * tshift_[10]
1616 + p[2] * tshift_[11] + 1 + wrapXLeft;
1618 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5]
1621 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3];
1623 return tsetshift_[4] + p[0] * 2 + (p[1] - 1) * tshift_[10]
1624 + p[2] * tshift_[11] + wrapYTop;
1626 return tsetshift_[1] + p[0] * 2 + (p[1] - 1) * tshift_[4]
1627 + p[2] * tshift_[5] + wrapYTop;
1633 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dD1(
const SimplexId p[3],
1634 const int id)
const {
1637 wrapZBack = 2 * wrap_[2];
1640 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1];
1642 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1] + 1;
1644 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11];
1646 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10]
1647 + (p[2] - 1) * tshift_[11] + 1 + wrapZBack;
1653 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dD2(
const SimplexId p[3],
1654 const int id)
const {
1657 wrapXLeft = 2 * wrap_[0];
1660 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5];
1662 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5]
1665 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
1667 return tsetshift_[3] + (p[0] - 1) * 2 + p[1] * tshift_[8]
1668 + p[2] * tshift_[9] + 1 + wrapXLeft;
1674 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dD3(
const SimplexId p[3],
1675 const int id)
const {
1678 wrapYTop = 2 * wrap_[1];
1681 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3];
1683 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3]
1686 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7]
1689 return tsetshift_[2] + p[0] * 2 + (p[1] - 1) * tshift_[6]
1690 + p[2] * tshift_[7] + wrapYTop;
1696 ttk::PeriodicImplicitTriangulation::getEdgeTriangle3dD4(
const SimplexId p[3],
1697 const int id)
const {
1700 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7];
1702 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7]
1705 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
1707 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9]
1710 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11];
1712 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11]
1719 ttk::PeriodicImplicitTriangulation::getEdgeLinkL(
const SimplexId p[3],
1720 const int id)
const {
1726 if(p[0] == nbvoxels_[0])
1727 wrapXRight = -wrap_[0];
1729 wrapYTop = wrap_[1];
1730 if(p[1] == nbvoxels_[1])
1731 wrapYBottom = -wrap_[1];
1733 wrapZBack = wrap_[2];
1734 if(p[2] == nbvoxels_[2])
1735 wrapZFront = -wrap_[2];
1738 return esetshift_[1] + p[0] + (p[1] + 1) * eshift_[4] + p[2] * eshift_[5]
1741 return esetshift_[0] + p[0] + p[1] * eshift_[2] + (p[2] + 1) * eshift_[3]
1744 return esetshift_[5] + p[0] + (p[1] - 1) * eshift_[12]
1745 + p[2] * eshift_[13] + wrapYTop;
1747 return esetshift_[1] + p[0] + 1 + (p[1] - 1) * eshift_[4]
1748 + (p[2] - 1) * eshift_[5] + wrapXRight + wrapYTop + wrapZBack;
1750 return esetshift_[0] + p[0] + 1 + (p[1] - 1) * eshift_[2]
1751 + (p[2] - 1) * eshift_[3] + wrapXRight + wrapYTop + wrapZBack;
1753 return esetshift_[5] + p[0] + p[1] * eshift_[12]
1754 + (p[2] - 1) * eshift_[13] + wrapZBack;
1760 ttk::PeriodicImplicitTriangulation::getEdgeLinkH(
const SimplexId p[3],
1761 const int id)
const {
1768 wrapXLeft = wrap_[0];
1769 if(p[0] == nbvoxels_[0])
1770 wrapXRight = -wrap_[0];
1771 if(p[1] == nbvoxels_[1])
1772 wrapYBottom = -wrap_[1];
1774 wrapZBack = wrap_[2];
1775 if(p[2] == nbvoxels_[2])
1776 wrapZFront = -wrap_[2];
1779 return p[0] + p[1] * eshift_[0] + (p[2] - 1) * eshift_[1] + wrapZBack;
1781 return p[0] + (p[1] + 1) * eshift_[0] + (p[2] + 1) * eshift_[1] - 1
1782 + wrapXLeft + wrapYBottom + wrapZFront;
1784 return esetshift_[1] + p[0] - 1 + (p[1] + 1) * eshift_[4]
1785 + p[2] * eshift_[5] + wrapXLeft + wrapYBottom;
1787 return esetshift_[1] + p[0] + 1 + p[1] * eshift_[4]
1788 + (p[2] - 1) * eshift_[5] + wrapXRight + wrapZBack;
1790 return esetshift_[5] + (p[0] - 1) + p[1] * eshift_[12]
1791 + (p[2] - 1) * eshift_[13] + wrapXLeft + wrapZBack;
1793 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
1799 ttk::PeriodicImplicitTriangulation::getEdgeLinkP(
const SimplexId p[3],
1800 const int id)
const {
1807 wrapXLeft = wrap_[0];
1808 if(p[0] == nbvoxels_[0])
1809 wrapXRight = -wrap_[0];
1811 wrapYTop = wrap_[1];
1812 if(p[1] == nbvoxels_[1])
1813 wrapYBottom = -wrap_[1];
1814 if(p[2] == nbvoxels_[2])
1815 wrapZFront = -wrap_[2];
1818 return p[0] + (p[1] - 1) * eshift_[0] + p[2] * eshift_[1] + wrapYTop;
1820 return p[0] + (p[1] + 1) * eshift_[0] + (p[2] + 1) * eshift_[1] - 1
1821 + wrapXLeft + wrapYBottom + wrapZFront;
1823 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
1825 return esetshift_[5] + p[0] + (p[1] - 1) * eshift_[12]
1826 + p[2] * eshift_[13] - 1 + wrapXLeft + wrapYTop;
1828 return esetshift_[0] + p[0] + p[1] * eshift_[2] + (p[2] + 1) * eshift_[3]
1829 - 1 + wrapXLeft + wrapZFront;
1831 return esetshift_[0] + p[0] + (p[1] - 1) * eshift_[2] + p[2] * eshift_[3]
1832 + 1 + wrapXRight + wrapYTop;
1838 ttk::PeriodicImplicitTriangulation::getEdgeLinkD1(
const SimplexId p[3],
1839 const int id)
const {
1843 if(p[0] == nbvoxels_[0])
1844 wrapXRight = -wrap_[0];
1845 if(p[1] == nbvoxels_[1])
1846 wrapYBottom = -wrap_[1];
1848 wrapZBack = wrap_[2];
1851 return esetshift_[4] + p[0] + p[1] * eshift_[10]
1852 + (p[2] - 1) * eshift_[11] + wrapZBack;
1854 return esetshift_[4] + p[0] + (p[1] + 1) * eshift_[10]
1855 + p[2] * eshift_[11] + wrapYBottom;
1857 return esetshift_[3] + p[0] + p[1] * eshift_[8] + p[2] * eshift_[9];
1859 return esetshift_[3] + p[0] + p[1] * eshift_[8] + (p[2] - 1) * eshift_[9]
1860 + 1 + wrapXRight + wrapZBack;
1866 ttk::PeriodicImplicitTriangulation::getEdgeLinkD2(
const SimplexId p[3],
1867 const int id)
const {
1872 wrapXLeft = wrap_[0];
1873 if(p[1] == nbvoxels_[1])
1874 wrapYBottom = -wrap_[1];
1875 if(p[2] == nbvoxels_[2])
1876 wrapZFront = -wrap_[2];
1879 return esetshift_[4] + p[0] + p[1] * eshift_[10] + p[2] * eshift_[11];
1881 return esetshift_[4] + p[0] + (p[1] + 1) * eshift_[10]
1882 + p[2] * eshift_[11] - 1 + wrapXLeft + wrapYBottom;
1884 return esetshift_[2] + p[0] + p[1] * eshift_[6] + p[2] * eshift_[7];
1886 return esetshift_[2] + p[0] + p[1] * eshift_[6] + (p[2] + 1) * eshift_[7]
1887 - 1 + wrapXLeft + wrapZFront;
1893 ttk::PeriodicImplicitTriangulation::getEdgeLinkD3(
const SimplexId p[3],
1894 const int id)
const {
1898 if(p[0] == nbvoxels_[0])
1899 wrapXRight = -wrap_[0];
1901 wrapYTop = wrap_[1];
1902 if(p[2] == nbvoxels_[2])
1903 wrapZFront = -wrap_[2];
1906 return esetshift_[2] + p[0] + (p[1] - 1) * eshift_[6] + p[2] * eshift_[7]
1909 return esetshift_[2] + p[0] + p[1] * eshift_[6] + (p[2] + 1) * eshift_[7]
1912 return esetshift_[3] + p[0] + p[1] * eshift_[8] + p[2] * eshift_[9];
1914 return esetshift_[3] + p[0] + (p[1] - 1) * eshift_[8] + p[2] * eshift_[9]
1915 + 1 + wrapXRight + wrapYTop;
1921 ttk::PeriodicImplicitTriangulation::getEdgeLinkD4(
const SimplexId p[3],
1922 const int id)
const {
1926 if(p[0] == nbvoxels_[0])
1927 wrapXRight = -wrap_[0];
1928 if(p[1] == nbvoxels_[1])
1929 wrapYBottom = -wrap_[1];
1930 if(p[2] == nbvoxels_[2])
1931 wrapZFront = -wrap_[2];
1934 return p[0] + (p[1] + 1) * eshift_[0] + p[2] * eshift_[1] + wrapYBottom;
1936 return p[0] + p[1] * eshift_[0] + (p[2] + 1) * eshift_[1] + wrapZFront;
1938 return esetshift_[1] + p[0] + p[1] * eshift_[4] + p[2] * eshift_[5];
1940 return esetshift_[1] + p[0] + 1 + (p[1] + 1) * eshift_[4]
1941 + p[2] * eshift_[5] + wrapXRight + wrapYBottom;
1943 return esetshift_[0] + p[0] + p[1] * eshift_[2] + p[2] * eshift_[3];
1945 return esetshift_[0] + p[0] + 1 + p[1] * eshift_[2]
1946 + (p[2] + 1) * eshift_[3] + wrapXRight + wrapZFront;
1952 ttk::PeriodicImplicitTriangulation::getEdgeStarL(
const SimplexId p[3],
1953 const int id)
const {
1957 wrapYTop = 6 * wrap_[1];
1959 wrapZBack = 6 * wrap_[2];
1962 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6;
1964 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 2;
1966 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6 + 1
1969 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 3
1972 return (p[2] - 1) * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6
1973 + 4 + wrapYTop + wrapZBack;
1975 return (p[2] - 1) * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6
1976 + 5 + wrapYTop + wrapZBack;
1982 ttk::PeriodicImplicitTriangulation::getEdgeStarH(
const SimplexId p[3],
1983 const int id)
const {
1987 wrapXLeft = 6 * wrap_[0];
1989 wrapZBack = 6 * wrap_[2];
1992 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6;
1994 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 2
1997 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 3
2000 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6
2001 + 4 + wrapXLeft + wrapZBack;
2003 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 1
2006 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 5
2013 ttk::PeriodicImplicitTriangulation::getEdgeStarP(
const SimplexId p[3],
2014 const int id)
const {
2018 wrapXLeft = 6 * wrap_[0];
2020 wrapYTop = 6 * wrap_[1];
2023 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + (p[0] - 1) * 6
2024 + 5 + wrapXLeft + wrapYTop;
2026 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6
2029 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6 + 1
2032 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 2;
2034 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 3
2037 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 4
2044 ttk::PeriodicImplicitTriangulation::getEdgeStarD1(
const SimplexId p[3],
2045 const int id)
const {
2048 wrapZBack = 6 * wrap_[2];
2051 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6;
2053 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 1;
2055 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 3
2058 return (p[2] - 1) * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 4
2065 ttk::PeriodicImplicitTriangulation::getEdgeStarD2(
const SimplexId p[3],
2066 const int id)
const {
2069 wrapXLeft = 6 * wrap_[0];
2072 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6;
2074 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 2;
2076 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 5
2079 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + (p[0] - 1) * 6 + 4
2086 ttk::PeriodicImplicitTriangulation::getEdgeStarD3(
const SimplexId p[3],
2087 const int id)
const {
2090 wrapYTop = 6 * wrap_[1];
2093 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 2;
2095 return p[2] * tetshift_[1] + p[1] * tetshift_[0] + p[0] * 6 + 3;
2097 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6 + 1
2100 return p[2] * tetshift_[1] + (p[1] - 1) * tetshift_[0] + p[0] * 6 + 5
2107 ttk::PeriodicImplicitTriangulation::getTriangleVertexF(
const SimplexId p[3],
2108 const int id)
const {
2111 if(p[0] / 2 == nbvoxels_[0])
2112 wrapXRight = -wrap_[0];
2113 if(p[1] == nbvoxels_[1])
2114 wrapYBottom = -wrap_[1];
2118 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2121 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2124 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0] + 1
2125 + wrapXRight + wrapYBottom;
2130 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1];
2132 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2135 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2143 ttk::PeriodicImplicitTriangulation::getTriangleVertexH(
const SimplexId p[3],
2144 const int id)
const {
2147 if(p[0] / 2 == nbvoxels_[0])
2148 wrapXRight = -wrap_[0];
2149 if(p[2] == nbvoxels_[2])
2150 wrapZFront = -wrap_[2];
2154 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2157 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1] + 1
2158 + wrapXRight + wrapZFront;
2160 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2166 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1];
2168 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2171 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2179 ttk::PeriodicImplicitTriangulation::getTriangleVertexC(
const SimplexId p[3],
2180 const int id)
const {
2183 if(p[1] == nbvoxels_[1])
2184 wrapYBottom = -wrap_[1];
2185 if(p[2] == nbvoxels_[2])
2186 wrapZFront = -wrap_[2];
2190 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1];
2192 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2195 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2196 + vshift_[0] + wrapYBottom + wrapZFront;
2201 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1];
2203 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2206 return (p[0] / 2) + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2207 + vshift_[0] + wrapYBottom + wrapZFront;
2214 ttk::PeriodicImplicitTriangulation::getTriangleVertexD1(
const SimplexId p[3],
2215 const int id)
const {
2219 if(p[0] / 2 == nbvoxels_[0])
2220 wrapXRight = -wrap_[0];
2221 if(p[1] == nbvoxels_[1])
2222 wrapYBottom = -wrap_[1];
2223 if(p[2] == nbvoxels_[2])
2224 wrapZFront = -wrap_[2];
2228 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2231 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2234 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2235 + vshift_[0] + wrapYBottom + wrapZFront;
2240 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2243 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0] + 1
2244 + wrapXRight + wrapYBottom;
2246 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2247 + vshift_[0] + wrapYBottom + wrapZFront;
2254 ttk::PeriodicImplicitTriangulation::getTriangleVertexD2(
const SimplexId p[3],
2255 const int id)
const {
2259 if(p[0] / 2 == nbvoxels_[0])
2260 wrapXRight = -wrap_[0];
2261 if(p[1] == nbvoxels_[1])
2262 wrapYBottom = -wrap_[1];
2263 if(p[2] == nbvoxels_[2])
2264 wrapZFront = -wrap_[2];
2268 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2271 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2272 + vshift_[1] + 1 + wrapXRight + wrapYBottom + wrapZFront;
2274 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2275 + vshift_[1] + wrapYBottom + wrapZFront;
2280 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1];
2282 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2285 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2286 + vshift_[1] + wrapYBottom + wrapZFront;
2293 ttk::PeriodicImplicitTriangulation::getTriangleVertexD3(
const SimplexId p[3],
2294 const int id)
const {
2298 if(p[0] / 2 == nbvoxels_[0])
2299 wrapXRight = -wrap_[0];
2300 if(p[1] == nbvoxels_[1])
2301 wrapYBottom = -wrap_[1];
2302 if(p[2] == nbvoxels_[2])
2303 wrapZFront = -wrap_[2];
2307 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2310 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1] + 1
2311 + wrapXRight + wrapZFront;
2313 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2314 + vshift_[1] + wrapYBottom + wrapZFront;
2319 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1
2322 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2325 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2326 + vshift_[1] + wrapYBottom + wrapZFront;
2333 ttk::PeriodicImplicitTriangulation::getTriangleEdgeF_0(
const SimplexId p[3],
2334 const int id)
const {
2337 return p[0] / 2 + p[1] * eshift_[0] + p[2] * eshift_[1];
2339 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2] + p[2] * eshift_[3];
2341 return esetshift_[2] + p[0] / 2 + p[1] * eshift_[6] + p[2] * eshift_[7];
2347 ttk::PeriodicImplicitTriangulation::getTriangleEdgeF_1(
const SimplexId p[3],
2348 const int id)
const {
2350 if(p[0] / 2 == nbvoxels_[0])
2351 wrapXRight = -wrap_[0];
2353 if(p[1] == nbvoxels_[1])
2354 wrapYBottom = -wrap_[1];
2357 return p[0] / 2 + (p[1] + 1) * eshift_[0] + p[2] * eshift_[1]
2360 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2] + p[2] * eshift_[3]
2363 return esetshift_[2] + p[0] / 2 + p[1] * eshift_[6] + p[2] * eshift_[7];
2369 ttk::PeriodicImplicitTriangulation::getTriangleEdgeH_0(
const SimplexId p[3],
2370 const int id)
const {
2373 return p[0] / 2 + p[1] * eshift_[0] + p[2] * eshift_[1];
2375 return esetshift_[1] + p[0] / 2 + p[1] * eshift_[4] + p[2] * eshift_[5];
2377 return esetshift_[4] + p[0] / 2 + p[1] * eshift_[10] + p[2] * eshift_[11];
2383 ttk::PeriodicImplicitTriangulation::getTriangleEdgeH_1(
const SimplexId p[3],
2384 const int id)
const {
2386 if(p[0] / 2 == nbvoxels_[0])
2387 wrapXRight = -wrap_[0];
2389 if(p[2] == nbvoxels_[2])
2390 wrapZFront = -wrap_[2];
2393 return p[0] / 2 + p[1] * eshift_[0] + (p[2] + 1) * eshift_[1]
2396 return esetshift_[1] + p[0] / 2 + p[1] * eshift_[4] + p[2] * eshift_[5]
2399 return esetshift_[4] + p[0] / 2 + p[1] * eshift_[10] + p[2] * eshift_[11];
2405 ttk::PeriodicImplicitTriangulation::getTriangleEdgeC_0(
const SimplexId p[3],
2406 const int id)
const {
2408 if(p[1] == nbvoxels_[1])
2409 wrapYBottom = -wrap_[1];
2412 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2] + p[2] * eshift_[3];
2414 return esetshift_[1] + p[0] / 2 + (p[1] + 1) * eshift_[4]
2415 + p[2] * eshift_[5] + wrapYBottom;
2417 return esetshift_[3] + p[0] / 2 + p[1] * eshift_[8] + p[2] * eshift_[9];
2423 ttk::PeriodicImplicitTriangulation::getTriangleEdgeC_1(
const SimplexId p[3],
2424 const int id)
const {
2426 if(p[2] == nbvoxels_[2])
2427 wrapZFront = -wrap_[2];
2430 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2]
2431 + (p[2] + 1) * eshift_[3] + wrapZFront;
2433 return esetshift_[1] + p[0] / 2 + p[1] * eshift_[4] + p[2] * eshift_[5];
2435 return esetshift_[3] + p[0] / 2 + p[1] * eshift_[8] + p[2] * eshift_[9];
2441 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD1_0(
const SimplexId p[3],
2442 const int id)
const {
2444 if(p[0] / 2 == nbvoxels_[0])
2445 wrapXRight = -wrap_[0];
2447 if(p[1] == nbvoxels_[1])
2448 wrapYBottom = -wrap_[1];
2451 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2] + p[2] * eshift_[3]
2454 return esetshift_[4] + p[0] / 2 + (p[1] + 1) * eshift_[10]
2455 + p[2] * eshift_[11] + wrapYBottom;
2457 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2463 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD1_1(
const SimplexId p[3],
2464 const int id)
const {
2466 if(p[2] == nbvoxels_[2])
2467 wrapZFront = -wrap_[2];
2470 return esetshift_[0] + p[0] / 2 + p[1] * eshift_[2]
2471 + (p[2] + 1) * eshift_[3] + wrapZFront;
2473 return esetshift_[4] + p[0] / 2 + p[1] * eshift_[10] + p[2] * eshift_[11];
2475 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2481 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD2_0(
const SimplexId p[3],
2482 const int id)
const {
2485 return p[0] / 2 + p[1] * eshift_[0] + p[2] * eshift_[1];
2487 return esetshift_[3] + p[0] / 2 + p[1] * eshift_[8] + p[2] * eshift_[9];
2489 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2495 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD2_1(
const SimplexId p[3],
2496 const int id)
const {
2500 if(p[0] / 2 == nbvoxels_[0])
2501 wrapXRight = -wrap_[0];
2502 if(p[1] == nbvoxels_[1])
2503 wrapYBottom = -wrap_[1];
2504 if(p[2] == nbvoxels_[2])
2505 wrapZFront = -wrap_[2];
2508 return p[0] / 2 + (p[1] + 1) * eshift_[0] + (p[2] + 1) * eshift_[1]
2509 + wrapYBottom + wrapZFront;
2511 return esetshift_[3] + p[0] / 2 + p[1] * eshift_[8] + p[2] * eshift_[9]
2514 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2520 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD3_0(
const SimplexId p[3],
2521 const int id)
const {
2523 if(p[1] == nbvoxels_[1])
2524 wrapYBottom = -wrap_[1];
2527 return esetshift_[1] + p[0] / 2 + (p[1] + 1) * eshift_[4]
2528 + p[2] * eshift_[5] + wrapYBottom;
2530 return esetshift_[2] + p[0] / 2 + p[1] * eshift_[6] + p[2] * eshift_[7];
2532 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2538 ttk::PeriodicImplicitTriangulation::getTriangleEdgeD3_1(
const SimplexId p[3],
2539 const int id)
const {
2542 if(p[0] / 2 == nbvoxels_[0])
2543 wrapXRight = -wrap_[0];
2544 if(p[2] == nbvoxels_[2])
2545 wrapZFront = -wrap_[2];
2548 return esetshift_[1] + p[0] / 2 + p[1] * eshift_[4] + p[2] * eshift_[5]
2551 return esetshift_[2] + p[0] / 2 + p[1] * eshift_[6]
2552 + (p[2] + 1) * eshift_[7] + wrapZFront;
2554 return esetshift_[5] + p[0] / 2 + p[1] * eshift_[12] + p[2] * eshift_[13];
2560 ttk::PeriodicImplicitTriangulation::getTriangleLinkF(
const SimplexId p[3],
2561 const int id)
const {
2566 if(p[0] / 2 == nbvoxels_[0])
2567 wrapXRight = -wrap_[0];
2568 if(p[1] == nbvoxels_[1])
2569 wrapYBottom = -wrap_[1];
2571 wrapZBack = wrap_[2];
2572 if(p[2] == nbvoxels_[2])
2573 wrapZFront = -wrap_[2];
2576 return p[0] / 2 + (p[1] + 1) * vshift_[0] + (p[2] + 1) * vshift_[1]
2577 + wrapYBottom + wrapZFront;
2579 return p[0] / 2 + p[1] * vshift_[0] + (p[2] - 1) * vshift_[1] + 1
2580 + wrapXRight + wrapZBack;
2586 ttk::PeriodicImplicitTriangulation::getTriangleLinkH(
const SimplexId p[3],
2587 const int id)
const {
2592 if(p[0] / 2 == nbvoxels_[0])
2593 wrapXRight = -wrap_[0];
2595 wrapYTop = wrap_[1];
2596 if(p[1] == nbvoxels_[1])
2597 wrapYBottom = -wrap_[1];
2598 if(p[2] == nbvoxels_[2])
2599 wrapZFront = -wrap_[2];
2602 return p[0] / 2 + (p[1] + 1) * vshift_[0] + (p[2] + 1) * vshift_[1]
2603 + wrapYBottom + wrapZFront;
2605 return p[0] / 2 + (p[1] - 1) * vshift_[0] + p[2] * vshift_[1] + 1
2606 + wrapXRight + wrapYTop;
2612 ttk::PeriodicImplicitTriangulation::getTriangleLinkC(
const SimplexId p[3],
2613 const int id)
const {
2619 wrapXLeft = wrap_[0];
2620 if(p[0] / 2 == nbvoxels_[0])
2621 wrapXRight = -wrap_[0];
2622 if(p[1] == nbvoxels_[1])
2623 wrapYBottom = -wrap_[1];
2624 if(p[2] == nbvoxels_[2])
2625 wrapZFront = -wrap_[2];
2628 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
2630 return p[0] / 2 + (p[1] + 1) * vshift_[0] + (p[2] + 1) * vshift_[1] - 1
2631 + wrapXLeft + wrapYBottom + wrapZFront;
2637 ttk::PeriodicImplicitTriangulation::getTriangleLinkD1(
const SimplexId p[3],
2638 const int id)
const {
2642 if(p[0] / 2 == nbvoxels_[0])
2643 wrapXRight = -wrap_[0];
2644 if(p[1] == nbvoxels_[1])
2645 wrapYBottom = -wrap_[1];
2646 if(p[2] == nbvoxels_[2])
2647 wrapZFront = -wrap_[2];
2651 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1];
2653 return p[0] / 2 + p[1] * vshift_[0] + (p[2] + 1) * vshift_[1] + 1
2654 + wrapXRight + wrapZFront;
2659 return p[0] / 2 + (p[1] + 1) * vshift_[0] + p[2] * vshift_[1]
2662 return p[0] / 2 + (p[1] + 1) * vshift_[0] + (p[2] + 1) * vshift_[1] + 1
2663 + wrapXRight + wrapYBottom + wrapZFront;
2670 ttk::PeriodicImplicitTriangulation::getTriangleLinkD2(
const SimplexId p[3],
2671 const int id)
const {
2675 if(p[0] / 2 == nbvoxels_[0])
2676 wrapXRight = -wrap_[0];
2677 if(p[1] == nbvoxels_[1])
2678 wrapYBottom = -wrap_[1];
2679 if(p[2] == nbvoxels_[2])
2680 wrapZFront = -wrap_[2];
2684 return p[0] / 2 + (p[1] + 1) * vshift_[0] + p[2] * vshift_[1] + 1
2685 + wrapXRight + wrapYBottom;
2687 return p[0] / 2 + p[1] * vshift_[0] + (p[2] + 1) * vshift_[1] + 1
2688 + wrapXRight + wrapZFront;
2693 return p[0] / 2 + (p[1] + 1) * vshift_[0] + p[2] * vshift_[1]
2696 return p[0] / 2 + p[1] * vshift_[0] + (p[2] + 1) * vshift_[1]
2704 ttk::PeriodicImplicitTriangulation::getTriangleLinkD3(
const SimplexId p[3],
2705 const int id)
const {
2709 if(p[0] / 2 == nbvoxels_[0])
2710 wrapXRight = -wrap_[0];
2711 if(p[1] == nbvoxels_[1])
2712 wrapYBottom = -wrap_[1];
2713 if(p[2] == nbvoxels_[2])
2714 wrapZFront = -wrap_[2];
2718 return p[0] / 2 + p[1] * vshift_[0] + (p[2] + 1) * vshift_[1]
2721 return p[0] / 2 + (p[1] + 1) * vshift_[0] + (p[2] + 1) * vshift_[1] + 1
2722 + wrapXRight + wrapYBottom + wrapZFront;
2727 return p[0] / 2 + p[1] * vshift_[0] + p[2] * vshift_[1];
2729 return p[0] / 2 + (p[1] + 1) * vshift_[0] + p[2] * vshift_[1] + 1
2730 + wrapXRight + wrapYBottom;
2737 ttk::PeriodicImplicitTriangulation::getTriangleStarF(
const SimplexId p[3],
2738 const int id)
const {
2741 wrapZBack = 6 * wrap_[2];
2745 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 1;
2747 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1]
2753 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1];
2755 return p[0] * 3 + p[1] * tetshift_[0] + (p[2] - 1) * tetshift_[1] + 3
2763 ttk::PeriodicImplicitTriangulation::getTriangleStarH(
const SimplexId p[3],
2764 const int id)
const {
2767 wrapYTop = 6 * wrap_[1];
2771 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 3;
2773 return (p[0] - 1) * 3 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1]
2779 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2;
2781 return p[0] * 3 + (p[1] - 1) * tetshift_[0] + p[2] * tetshift_[1] + 1
2789 ttk::PeriodicImplicitTriangulation::getTriangleStarC(
const SimplexId p[3],
2790 const int id)
const {
2793 wrapXLeft = 6 * wrap_[0];
2797 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2;
2799 return (p[0] / 2 - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1]
2805 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1];
2807 return (p[0] / 2 - 1) * 6 + p[1] * tetshift_[0] + p[2] * tetshift_[1]
2815 ttk::PeriodicImplicitTriangulation::getTriangleStarD1(
const SimplexId p[3],
2816 const int id)
const {
2820 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2;
2822 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 3;
2827 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 1;
2829 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 5;
2836 ttk::PeriodicImplicitTriangulation::getTriangleStarD2(
const SimplexId p[3],
2837 const int id)
const {
2841 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 5;
2843 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 4;
2848 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1];
2850 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 2;
2857 ttk::PeriodicImplicitTriangulation::getTriangleStarD3(
const SimplexId p[3],
2858 const int id)
const {
2862 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 3;
2864 return (p[0] - 1) * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 4;
2869 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1];
2871 return p[0] * 3 + p[1] * tetshift_[0] + p[2] * tetshift_[1] + 1;
2878 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexABCG(
2879 const SimplexId p[3],
const int id)
const {
2883 if(p[0] == nbvoxels_[0])
2884 wrapXRight = -wrap_[0];
2885 if(p[1] == nbvoxels_[1])
2886 wrapYBottom = -wrap_[1];
2887 if(p[2] == nbvoxels_[2])
2888 wrapZFront = -wrap_[2];
2891 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1];
2893 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
2895 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2898 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2899 + vshift_[1] + wrapYBottom + wrapZFront;
2905 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexBCDG(
2906 const SimplexId p[3],
const int id)
const {
2910 if(p[0] == nbvoxels_[0])
2911 wrapXRight = -wrap_[0];
2912 if(p[1] == nbvoxels_[1])
2913 wrapYBottom = -wrap_[1];
2914 if(p[2] == nbvoxels_[2])
2915 wrapZFront = -wrap_[2];
2918 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
2920 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2923 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0] + 1
2924 + wrapXRight + wrapYBottom;
2926 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2927 + vshift_[1] + wrapYBottom + wrapZFront;
2933 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexABEG(
2934 const SimplexId p[3],
const int id)
const {
2938 if(p[0] == nbvoxels_[0])
2939 wrapXRight = -wrap_[0];
2940 if(p[1] == nbvoxels_[1])
2941 wrapYBottom = -wrap_[1];
2942 if(p[2] == nbvoxels_[2])
2943 wrapZFront = -wrap_[2];
2946 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1];
2948 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
2950 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2953 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2954 + vshift_[1] + wrapYBottom + wrapZFront;
2960 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexBEFG(
2961 const SimplexId p[3],
const int id)
const {
2965 if(p[0] == nbvoxels_[0])
2966 wrapXRight = -wrap_[0];
2967 if(p[1] == nbvoxels_[1])
2968 wrapYBottom = -wrap_[1];
2969 if(p[2] == nbvoxels_[2])
2970 wrapZFront = -wrap_[2];
2973 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
2975 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1]
2978 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1] + 1
2979 + wrapXRight + wrapZFront;
2981 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
2982 + vshift_[1] + wrapYBottom + wrapZFront;
2988 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexBFGH(
2989 const SimplexId p[3],
const int id)
const {
2993 if(p[0] == nbvoxels_[0])
2994 wrapXRight = -wrap_[0];
2995 if(p[1] == nbvoxels_[1])
2996 wrapYBottom = -wrap_[1];
2997 if(p[2] == nbvoxels_[2])
2998 wrapZFront = -wrap_[2];
3001 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
3003 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[1] + 1
3004 + wrapXRight + wrapZFront;
3006 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
3007 + vshift_[1] + wrapYBottom + wrapZFront;
3009 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
3010 + vshift_[1] + 1 + wrapXRight + wrapYBottom + wrapZFront;
3016 ttk::PeriodicImplicitTriangulation::getTetrahedronVertexBDGH(
3017 const SimplexId p[3],
const int id)
const {
3021 if(p[0] == nbvoxels_[0])
3022 wrapXRight = -wrap_[0];
3023 if(p[1] == nbvoxels_[1])
3024 wrapYBottom = -wrap_[1];
3025 if(p[2] == nbvoxels_[2])
3026 wrapZFront = -wrap_[2];
3029 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + 1 + wrapXRight;
3031 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0] + 1
3032 + wrapXRight + wrapYBottom;
3034 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
3035 + vshift_[1] + wrapYBottom + wrapZFront;
3037 return p[0] + p[1] * vshift_[0] + p[2] * vshift_[1] + vshift_[0]
3038 + vshift_[1] + 1 + wrapXRight + wrapYBottom + wrapZFront;
3044 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeABCG(
3045 const SimplexId p[3],
const int id)
const {
3047 if(p[1] == nbvoxels_[1])
3048 wrapYBottom = -wrap_[1];
3051 return p[0] + p[1] * eshift_[0] + p[2] * eshift_[1];
3053 return esetshift_[0] + p[0] + p[1] * eshift_[2] + p[2] * eshift_[3];
3055 return esetshift_[1] + p[0] + (p[1] + 1) * eshift_[4] + p[2] * eshift_[5]
3058 return esetshift_[2] + p[0] + p[1] * eshift_[6] + p[2] * eshift_[7];
3060 return esetshift_[3] + p[0] + p[1] * eshift_[8] + p[2] * eshift_[9];
3062 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3068 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeBCDG(
3069 const SimplexId p[3],
const int id)
const {
3072 if(p[0] == nbvoxels_[0])
3073 wrapXRight = -wrap_[0];
3074 if(p[1] == nbvoxels_[1])
3075 wrapYBottom = -wrap_[1];
3078 return p[0] + (p[1] + 1) * eshift_[0] + p[2] * eshift_[1] + wrapYBottom;
3080 return esetshift_[0] + (p[0] + 1) + p[1] * eshift_[2] + p[2] * eshift_[3]
3083 return esetshift_[1] + p[0] + (p[1] + 1) * eshift_[4] + p[2] * eshift_[5]
3086 return esetshift_[2] + p[0] + p[1] * eshift_[6] + p[2] * eshift_[7];
3088 return esetshift_[4] + p[0] + (p[1] + 1) * eshift_[10]
3089 + p[2] * eshift_[11] + wrapYBottom;
3091 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3097 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeABEG(
3098 const SimplexId p[3],
const int id)
const {
3100 if(p[2] == nbvoxels_[2])
3101 wrapZFront = -wrap_[2];
3104 return p[0] + p[1] * eshift_[0] + p[2] * eshift_[1];
3106 return esetshift_[0] + p[0] + p[1] * eshift_[2] + (p[2] + 1) * eshift_[3]
3109 return esetshift_[1] + p[0] + p[1] * eshift_[4] + p[2] * eshift_[5];
3111 return esetshift_[3] + p[0] + p[1] * eshift_[8] + p[2] * eshift_[9];
3113 return esetshift_[4] + p[0] + p[1] * eshift_[10] + p[2] * eshift_[11];
3115 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3121 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeBEFG(
3122 const SimplexId p[3],
const int id)
const {
3125 if(p[0] == nbvoxels_[0])
3126 wrapXRight = -wrap_[0];
3127 if(p[2] == nbvoxels_[2])
3128 wrapZFront = -wrap_[2];
3131 return p[0] + p[1] * eshift_[0] + (p[2] + 1) * eshift_[1] + wrapZFront;
3133 return esetshift_[0] + p[0] + p[1] * eshift_[2] + (p[2] + 1) * eshift_[3]
3136 return esetshift_[1] + (p[0] + 1) + p[1] * eshift_[4] + p[2] * eshift_[5]
3139 return esetshift_[2] + p[0] + p[1] * eshift_[6] + (p[2] + 1) * eshift_[7]
3142 return esetshift_[4] + p[0] + p[1] * eshift_[10] + p[2] * eshift_[11];
3144 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3150 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeBFGH(
3151 const SimplexId p[3],
const int id)
const {
3155 if(p[0] == nbvoxels_[0])
3156 wrapXRight = -wrap_[0];
3157 if(p[1] == nbvoxels_[1])
3158 wrapYBottom = -wrap_[1];
3159 if(p[2] == nbvoxels_[2])
3160 wrapZFront = -wrap_[2];
3163 return p[0] + (p[1] + 1) * eshift_[0] + (p[2] + 1) * eshift_[1]
3164 + wrapYBottom + wrapZFront;
3166 return esetshift_[0] + (p[0] + 1) + p[1] * eshift_[2]
3167 + (p[2] + 1) * eshift_[3] + wrapXRight + wrapZFront;
3169 return esetshift_[1] + (p[0] + 1) + p[1] * eshift_[4] + p[2] * eshift_[5]
3172 return esetshift_[2] + p[0] + p[1] * eshift_[6] + (p[2] + 1) * eshift_[7]
3175 return esetshift_[3] + (p[0] + 1) + p[1] * eshift_[8] + p[2] * eshift_[9]
3178 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3184 ttk::PeriodicImplicitTriangulation::getTetrahedronEdgeBDGH(
3185 const SimplexId p[3],
const int id)
const {
3189 if(p[0] == nbvoxels_[0])
3190 wrapXRight = -wrap_[0];
3191 if(p[1] == nbvoxels_[1])
3192 wrapYBottom = -wrap_[1];
3193 if(p[2] == nbvoxels_[2])
3194 wrapZFront = -wrap_[2];
3197 return p[0] + (p[1] + 1) * eshift_[0] + (p[2] + 1) * eshift_[1]
3198 + wrapYBottom + wrapZFront;
3200 return esetshift_[0] + (p[0] + 1) + p[1] * eshift_[2] + p[2] * eshift_[3]
3203 return esetshift_[1] + (p[0] + 1) + (p[1] + 1) * eshift_[4]
3204 + p[2] * eshift_[5] + wrapXRight + wrapYBottom;
3206 return esetshift_[3] + (p[0] + 1) + p[1] * eshift_[8] + p[2] * eshift_[9]
3209 return esetshift_[4] + p[0] + (p[1] + 1) * eshift_[10]
3210 + p[2] * eshift_[11] + wrapYBottom;
3212 return esetshift_[5] + p[0] + p[1] * eshift_[12] + p[2] * eshift_[13];
3218 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleABCG(
3219 const SimplexId p[3],
const int id)
const {
3222 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1];
3224 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5];
3226 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
3228 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11];
3234 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleBCDG(
3235 const SimplexId p[3],
const int id)
const {
3238 return p[0] * 2 + p[1] * tshift_[0] + p[2] * tshift_[1] + 1;
3240 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11];
3242 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7];
3244 return (p[1] < nbvoxels_[1])
3245 ? tsetshift_[0] + p[0] * 2 + (p[1] + 1) * tshift_[2]
3247 : tsetshift_[0] + p[0] * 2 + (p[1] + 1) * tshift_[2]
3248 + p[2] * tshift_[3] - wrap_[1] * 2;
3254 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleABEG(
3255 const SimplexId p[3],
const int id)
const {
3258 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3];
3260 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9];
3262 return tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4] + p[2] * tshift_[5]
3265 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7]
3272 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleBEFG(
3273 const SimplexId p[3],
const int id)
const {
3276 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7]
3279 return tsetshift_[0] + p[0] * 2 + p[1] * tshift_[2] + p[2] * tshift_[3]
3282 return (p[2] < nbvoxels_[2])
3283 ? p[0] * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1]
3284 : p[0] * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1]
3287 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11]
3294 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleBFGH(
3295 const SimplexId p[3],
const int id)
const {
3298 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9]
3301 return tsetshift_[4] + p[0] * 2 + p[1] * tshift_[10] + p[2] * tshift_[11]
3304 return (p[0] < nbvoxels_[0])
3305 ? tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4]
3306 + p[2] * tshift_[5] + 3
3307 : tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4]
3308 + p[2] * tshift_[5] + 3 - wrap_[0] * 2;
3310 return (p[2] < nbvoxels_[2])
3311 ? p[0] * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1] + 1
3312 : p[0] * 2 + p[1] * tshift_[0] + (p[2] + 1) * tshift_[1] + 1
3319 ttk::PeriodicImplicitTriangulation::getTetrahedronTriangleBDGH(
3320 const SimplexId p[3],
const int id)
const {
3323 return (p[0] < nbvoxels_[0])
3324 ? tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4]
3325 + p[2] * tshift_[5] + 2
3326 : tsetshift_[1] + p[0] * 2 + p[1] * tshift_[4]
3327 + p[2] * tshift_[5] + 2 - wrap_[0] * 2;
3329 return tsetshift_[2] + p[0] * 2 + p[1] * tshift_[6] + p[2] * tshift_[7];
3331 return tsetshift_[3] + p[0] * 2 + p[1] * tshift_[8] + p[2] * tshift_[9]
3334 return (p[1] < nbvoxels_[1])
3335 ? tsetshift_[0] + p[0] * 2 + (p[1] + 1) * tshift_[2]
3336 + p[2] * tshift_[3] + 1
3337 : tsetshift_[0] + p[0] * 2 + (p[1] + 1) * tshift_[2]
3338 + p[2] * tshift_[3] + 1 - wrap_[1] * 2;
3344 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborABCG(
3352 return p[0] > 0 ? t - 1 : t - 1 + wrap_[0] * 6;
3354 return p[2] > 0 ? t - tetshift_[1] + 3
3355 : t - tetshift_[1] + 3 + wrap_[2] * 6;
3361 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborBCDG(
3369 return p[2] > 0 ? t - tetshift_[1] + 3
3370 : t - tetshift_[1] + 3 + wrap_[2] * 6;
3372 return p[1] < nbvoxels_[1] ? t + tetshift_[0] + 1
3373 : t + tetshift_[0] + 1 - wrap_[1] * 6;
3379 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborABEG(
3387 return p[0] > 0 ? t - 4 : t - 4 + wrap_[0] * 6;
3389 return p[1] > 0 ? t - tetshift_[0] - 1
3390 : t - tetshift_[0] - 1 + wrap_[1] * 6;
3396 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborBEFG(
3404 return p[1] > 0 ? t - tetshift_[0] + 2
3405 : t - tetshift_[0] + 2 + wrap_[1] * 6;
3407 return p[2] < nbvoxels_[2] ? t + tetshift_[1] - 3
3408 : t + tetshift_[1] - 3 - wrap_[2] * 6;
3414 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborBFGH(
3422 return p[0] < nbvoxels_[0] ? t + 4 : t + 4 - wrap_[0] * 6;
3424 return p[2] < nbvoxels_[2] ? t + tetshift_[1] - 3
3425 : t + tetshift_[1] - 3 - wrap_[2] * 6;
3431 ttk::PeriodicImplicitTriangulation::getTetrahedronNeighborBDGH(
3439 return p[0] < nbvoxels_[0] ? t + 1 : t + 1 - wrap_[0] * 6;
3441 return p[1] < nbvoxels_[1] ? t + tetshift_[0] - 2
3442 : t + tetshift_[0] - 2 - wrap_[1] * 6;
#define TTK_TRIANGULATION_INTERNAL(NAME)
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
virtual int getVertexPointInternal(const SimplexId &ttkNotUsed(vertexId), float &ttkNotUsed(x), float &ttkNotUsed(y), float &ttkNotUsed(z)) const
bool hasPreconditionedTriangles_
virtual int getCellVertexInternal(const SimplexId &ttkNotUsed(cellId), const int &ttkNotUsed(localVertexId), SimplexId &ttkNotUsed(vertexId)) const
virtual int getEdgeIncenter(SimplexId edgeId, float incenter[3]) const
SimplexId TTK_TRIANGULATION_INTERNAL() getEdgeStarNumber(const SimplexId &edgeId) const override
int TTK_TRIANGULATION_INTERNAL() getVertexStar(const SimplexId &vertexId, const int &localStarId, SimplexId &starId) const override
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
virtual int getTetraIncenter(SimplexId tetraId, float incenter[3]) const
int TTK_TRIANGULATION_INTERNAL() getEdgeStar(const SimplexId &edgeId, const int &localStarId, SimplexId &starId) const override
int TTK_TRIANGULATION_INTERNAL() getVertexLink(const SimplexId &vertexId, const int &localLinkId, SimplexId &linkId) const override
int TTK_TRIANGULATION_INTERNAL() getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const override
virtual int getTriangleIncenter(SimplexId triangleId, float incenter[3]) const
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
int TTK_TRIANGULATION_INTERNAL() getTriangleLink(const SimplexId &triangleId, const int &localLinkId, SimplexId &linkId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getTriangleStarNumber(const SimplexId &triangleId) const override
int TTK_TRIANGULATION_INTERNAL() getTriangleStar(const SimplexId &triangleId, const int &localStarId, SimplexId &starId) const override
int TTK_TRIANGULATION_INTERNAL() getVertexPoint(const SimplexId &vertexId, float &x, float &y, float &z) const override
SimplexId getEdgeTriangleNumberInternal(const SimplexId &edgeId) const override
int getEdgeTriangleInternal(const SimplexId &edgeId, const int &id, SimplexId &triangleId) const override
int TTK_TRIANGULATION_INTERNAL() getEdgeLink(const SimplexId &edgeId, const int &localLinkId, SimplexId &linkId) 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
TTK triangulation class for grids with periodic boundary conditions implemented in all directions.
virtual int preconditionTetrahedronsInternal()=0
SimplexId TTK_TRIANGULATION_INTERNAL() getTriangleLinkNumber(const SimplexId &triangleId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getEdgeLinks() override
int getTriangleNeighbors(std::vector< std::vector< SimplexId > > &neighbors)
virtual int getTetrahedronNeighbor(const SimplexId &tetId, const int &localNeighborId, SimplexId &neighborId) const =0
int TTK_TRIANGULATION_INTERNAL() getCellVertex(const SimplexId &cellId, const int &localVertexId, SimplexId &vertexId) const override
int getCellTriangleInternal(const SimplexId &cellId, const int &id, SimplexId &triangleId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getTriangleLinks() 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
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getTriangleStars() override
SimplexId TTK_TRIANGULATION_INTERNAL() getEdgeLinkNumber(const SimplexId &edgeId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexLinks() override
int getTetrahedronNeighbors(std::vector< std::vector< SimplexId > > &neighbors)
SimplexId getVertexEdgeNumberInternal(const SimplexId &vertexId) const override
SimplexId getCellEdgeNumberInternal(const SimplexId &cellId) const override
const std::vector< std::array< SimplexId, 2 > > *TTK_TRIANGULATION_INTERNAL() getEdges() override
bool TTK_TRIANGULATION_INTERNAL() isTriangleOnBoundary(const SimplexId &triangleId) const override
int TTK_TRIANGULATION_INTERNAL() getDimensionality() const override
int getTetrahedronEdges(std::vector< std::vector< SimplexId > > &edges) const
bool TTK_TRIANGULATION_INTERNAL() isEdgeOnBoundary(const SimplexId &edgeId) const override
SimplexId getTriangleNeighborNumber(const SimplexId &triangleId) const
bool hasPreconditionedVerticesAndCells_
const std::array< ttk::SimplexId, 3 > & getGridDimensions() const override
SimplexId tetrahedronNumber_
virtual int getTetrahedronVertex(const SimplexId &tetId, const int &localVertexId, SimplexId &vertexId) const =0
SimplexId triangleNumber_
const std::vector< std::vector< SimplexId > > * getEdgeTrianglesInternal() override
SimplexId TTK_TRIANGULATION_INTERNAL() getNumberOfVertices() const override
int preconditionTrianglesInternal() override=0
SimplexId TTK_TRIANGULATION_INTERNAL() getCellVertexNumber(const SimplexId &cellId) const override
int preconditionEdgesInternal() override=0
virtual int getTriangleNeighbor(const SimplexId &triangleId, const int &localNeighborId, SimplexId &neighborId) const =0
int preconditionVerticesAndCells()
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexStarNumber(const SimplexId &vertexId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getCellNeighborNumber(const SimplexId &cellId) const override
bool isPowerOfTwo(unsigned long long int v, unsigned long long int &r)
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexStars() override
PeriodicImplicitTriangulation(const PeriodicImplicitTriangulation &)=default
virtual int getTetrahedronEdge(const SimplexId &tetId, const int &id, SimplexId &edgeId) const =0
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getEdgeStars() override
virtual int getTetrahedronTriangle(const SimplexId &tetId, const int &id, SimplexId &triangleId) const =0
PeriodicImplicitTriangulation & operator=(const PeriodicImplicitTriangulation &)=default
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getCellNeighbors() override
const std::vector< std::vector< SimplexId > > * getVertexEdgesInternal() override
~PeriodicImplicitTriangulation() override
SimplexId getTriangleEdgeNumberInternal(const SimplexId &ttkNotUsed(triangleId)) const override
PeriodicImplicitTriangulation & operator=(PeriodicImplicitTriangulation &&)=default
SimplexId getCellTriangleNumberInternal(const SimplexId &ttkNotUsed(cellId)) const override
PeriodicImplicitTriangulation()
const std::vector< std::array< SimplexId, 3 > > *TTK_TRIANGULATION_INTERNAL() getTriangles() override
SimplexId getVertexTriangleNumberInternal(const SimplexId &vertexId) const override
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexLinkNumber(const SimplexId &vertexId) const override
int getTetrahedronTriangles(std::vector< std::vector< SimplexId > > &triangles) const
const std::vector< std::vector< SimplexId > > * getCellEdgesInternal() override
virtual int preconditionVerticesInternal()=0
int getCellEdgeInternal(const SimplexId &cellId, const int &id, SimplexId &edgeId) const override
SimplexId getNumberOfTrianglesInternal() const override
bool TTK_TRIANGULATION_INTERNAL() isVertexOnBoundary(const SimplexId &vertexId) const override
const std::vector< std::vector< SimplexId > > *TTK_TRIANGULATION_INTERNAL() getVertexNeighbors() override
SimplexId getTetrahedronNeighborNumber(const SimplexId &tetId) const
SimplexId TTK_TRIANGULATION_INTERNAL() getNumberOfCells() const override
SimplexId TTK_TRIANGULATION_INTERNAL() getVertexNeighborNumber(const SimplexId &vertexId) const override
int TTK_TRIANGULATION_INTERNAL() getCellNeighbor(const SimplexId &cellId, const int &localNeighborId, SimplexId &neighborId) const override
PeriodicImplicitTriangulation(PeriodicImplicitTriangulation &&)=default
const std::vector< std::vector< SimplexId > > * getCellTrianglesInternal() override
const std::vector< std::vector< SimplexId > > * getVertexTrianglesInternal() override
int preconditionCellsInternal()
bool isEmpty() const override
int getCellVTKIDInternal(const int &ttkId, int &vtkId) const override
SimplexId getNumberOfEdgesInternal() const override
RegularGridTriangulation is an abstract subclass of ttk::AbstractTriangulation that exposes a common ...
virtual void tetrahedronToPosition(const SimplexId tetrahedron, SimplexId p[3]) const =0
virtual void vertexToPosition(const SimplexId vertex, SimplexId p[3]) const =0
virtual void triangleToPosition2d(const SimplexId triangle, SimplexId p[2]) const =0
std::array< SimplexId, 3 > dimensions_
virtual void vertexToPosition2d(const SimplexId vertex, SimplexId p[2]) const =0
virtual void triangleToPosition(const SimplexId triangle, const int k, SimplexId p[3]) const =0
T distance(const T *p0, const T *p1, const int &dimension=3)
int SimplexId
Identifier type for simplices of any dimension.