10 gridDimensions_[0] = gridDimensions_[1] = gridDimensions_[2] = -1;
11 triangulation_ =
nullptr;
18 vertexPositions_.resize(vertexNumber_);
19 vertexCoords_.resize(vertexNumber_);
21 if(dimensionality_ == 1) {
22 vertexPositions_[0] = VertexPosition::LEFT_CORNER_1D;
23#ifdef TTK_ENABLE_OPENMP
24#pragma omp parallel for num_threads(threadNumber_)
26 for(
SimplexId i = 1; i < vertexNumber_ - 1; ++i) {
27 vertexPositions_[i] = VertexPosition::CENTER_1D;
29 vertexPositions_[vertexNumber_ - 1] = VertexPosition::RIGHT_CORNER_1D;
31 }
else if(dimensionality_ == 2) {
32#ifdef TTK_ENABLE_OPENMP
33#pragma omp parallel for num_threads(threadNumber_)
35 for(
SimplexId i = 0; i < vertexNumber_; ++i) {
36 std::array<SimplexId, 3> p{};
37 vertexToPosition2d(i, p);
39 if(0 < p[0] and p[0] < nbvoxels_[Di_]) {
40 if(0 < p[1] and p[1] < nbvoxels_[Dj_])
41 vertexPositions_[i] = VertexPosition::CENTER_2D;
43 vertexPositions_[i] = VertexPosition::TOP_EDGE_2D;
45 vertexPositions_[i] = VertexPosition::BOTTOM_EDGE_2D;
46 }
else if(p[0] == 0) {
47 if(0 < p[1] and p[1] < nbvoxels_[Dj_])
48 vertexPositions_[i] = VertexPosition::LEFT_EDGE_2D;
50 vertexPositions_[i] = VertexPosition::TOP_LEFT_CORNER_2D;
52 vertexPositions_[i] = VertexPosition::BOTTOM_LEFT_CORNER_2D;
54 if(0 < p[1] and p[1] < nbvoxels_[Dj_])
55 vertexPositions_[i] = VertexPosition::RIGHT_EDGE_2D;
57 vertexPositions_[i] = VertexPosition::TOP_RIGHT_CORNER_2D;
59 vertexPositions_[i] = VertexPosition::BOTTOM_RIGHT_CORNER_2D;
64 }
else if(dimensionality_ == 3) {
65#ifdef TTK_ENABLE_OPENMP
66#pragma omp parallel for num_threads(threadNumber_)
68 for(
SimplexId i = 0; i < vertexNumber_; ++i) {
69 std::array<SimplexId, 3> p{};
70 vertexToPosition(i, p);
72 if(0 < p[0] and p[0] < nbvoxels_[0]) {
73 if(0 < p[1] and p[1] < nbvoxels_[1]) {
74 if(0 < p[2] and p[2] < nbvoxels_[2])
75 vertexPositions_[i] = VertexPosition::CENTER_3D;
77 vertexPositions_[i] = VertexPosition::FRONT_FACE_3D;
79 vertexPositions_[i] = VertexPosition::BACK_FACE_3D;
80 }
else if(p[1] == 0) {
81 if(0 < p[2] and p[2] < nbvoxels_[2])
82 vertexPositions_[i] = VertexPosition::TOP_FACE_3D;
84 vertexPositions_[i] = VertexPosition::TOP_FRONT_EDGE_3D;
86 vertexPositions_[i] = VertexPosition::TOP_BACK_EDGE_3D;
88 if(0 < p[2] and p[2] < nbvoxels_[2])
89 vertexPositions_[i] = VertexPosition::BOTTOM_FACE_3D;
91 vertexPositions_[i] = VertexPosition::BOTTOM_FRONT_EDGE_3D;
93 vertexPositions_[i] = VertexPosition::BOTTOM_BACK_EDGE_3D;
95 }
else if(p[0] == 0) {
96 if(0 < p[1] and p[1] < nbvoxels_[1]) {
97 if(0 < p[2] and p[2] < nbvoxels_[2])
98 vertexPositions_[i] = VertexPosition::LEFT_FACE_3D;
100 vertexPositions_[i] = VertexPosition::LEFT_FRONT_EDGE_3D;
102 vertexPositions_[i] = VertexPosition::LEFT_BACK_EDGE_3D;
103 }
else if(p[1] == 0) {
104 if(0 < p[2] and p[2] < nbvoxels_[2])
105 vertexPositions_[i] = VertexPosition::TOP_LEFT_EDGE_3D;
107 vertexPositions_[i] = VertexPosition::TOP_LEFT_FRONT_CORNER_3D;
109 vertexPositions_[i] = VertexPosition::TOP_LEFT_BACK_CORNER_3D;
111 if(0 < p[2] and p[2] < nbvoxels_[2])
112 vertexPositions_[i] = VertexPosition::BOTTOM_LEFT_EDGE_3D;
115 = VertexPosition::BOTTOM_LEFT_FRONT_CORNER_3D;
118 = VertexPosition::BOTTOM_LEFT_BACK_CORNER_3D;
121 if(0 < p[1] and p[1] < nbvoxels_[1]) {
122 if(0 < p[2] and p[2] < nbvoxels_[2])
123 vertexPositions_[i] = VertexPosition::RIGHT_FACE_3D;
125 vertexPositions_[i] = VertexPosition::RIGHT_FRONT_EDGE_3D;
127 vertexPositions_[i] = VertexPosition::RIGHT_BACK_EDGE_3D;
128 }
else if(p[1] == 0) {
129 if(0 < p[2] and p[2] < nbvoxels_[2])
130 vertexPositions_[i] = VertexPosition::TOP_RIGHT_EDGE_3D;
133 = VertexPosition::TOP_RIGHT_FRONT_CORNER_3D;
135 vertexPositions_[i] = VertexPosition::TOP_RIGHT_BACK_CORNER_3D;
137 if(0 < p[2] and p[2] < nbvoxels_[2])
138 vertexPositions_[i] = VertexPosition::BOTTOM_RIGHT_EDGE_3D;
141 = VertexPosition::BOTTOM_RIGHT_FRONT_CORNER_3D;
144 = VertexPosition::BOTTOM_RIGHT_BACK_CORNER_3D;
147 vertexCoords_[i] = p;
154 vertexShifts_.resize(vertexNumber_);
156 if(dimensionality_ == 3) {
157#ifdef TTK_ENABLE_OPENMP
158#pragma omp parallel for num_threads(threadNumber_)
160 for(
SimplexId i = 0; i < decimatedVertexNumber_; ++i) {
161 const auto v = localToGlobalVertexId(i);
162 const auto &p = this->vertexCoords_[v];
163 std::array<SimplexId, 3> shifts{decimation_, decimation_, decimation_};
165 if((nbvoxels_[0] % decimation_) and (p[0] + decimation_ > nbvoxels_[0])) {
166 shifts[0] = nbvoxels_[0] % decimation_;
168 if((nbvoxels_[1] % decimation_) and (p[1] + decimation_ > nbvoxels_[1])) {
169 shifts[1] = nbvoxels_[1] % decimation_;
171 if((nbvoxels_[2] % decimation_) and (p[2] + decimation_ > nbvoxels_[2])) {
172 shifts[2] = nbvoxels_[2] % decimation_;
174 this->vertexShifts_[v] = shifts;
176 }
else if(dimensionality_ == 2) {
177#ifdef TTK_ENABLE_OPENMP
178#pragma omp parallel for num_threads(threadNumber_)
180 for(
SimplexId i = 0; i < decimatedVertexNumber_; ++i) {
181 const auto v = localToGlobalVertexId(i);
182 const auto &p = this->vertexCoords_[v];
183 std::array<SimplexId, 3> shifts{decimation_, decimation_, decimation_};
185 if((nbvoxels_[Di_] % decimation_)
186 and (p[0] + decimation_ > nbvoxels_[Di_])) {
187 shifts[0] = nbvoxels_[0] % decimation_;
189 if((nbvoxels_[Dj_] % decimation_)
190 and (p[1] + decimation_ > nbvoxels_[Dj_])) {
191 shifts[1] = nbvoxels_[1] % decimation_;
193 this->vertexShifts_[v] = shifts;
205#ifndef TTK_ENABLE_KAMIKAZE
214 const auto &p = this->vertexCoords_[vertexId];
220 if(dimensionality_ == 3) {
221 if((nbvoxels_[0] % decimation_) and (p[0] + decimation_ > nbvoxels_[0])) {
222 shiftX = nbvoxels_[0] % decimation_;
224 if((nbvoxels_[1] % decimation_) and (p[1] + decimation_ > nbvoxels_[1])) {
225 shiftY = nbvoxels_[1] % decimation_;
227 if((nbvoxels_[2] % decimation_) and (p[2] + decimation_ > nbvoxels_[2])) {
228 shiftZ = nbvoxels_[2] % decimation_;
230 }
else if(dimensionality_ == 2) {
231 if((nbvoxels_[Di_] % decimation_)
232 and (p[0] + decimation_ > nbvoxels_[Di_])) {
233 shiftX = nbvoxels_[0] % decimation_;
235 if((nbvoxels_[Dj_] % decimation_)
236 and (p[1] + decimation_ > nbvoxels_[Dj_])) {
237 shiftY = nbvoxels_[1] % decimation_;
241 switch(vertexPositions_[vertexId]) {
242 case VertexPosition::CENTER_3D:
244 vertexId, neighborId, shiftX, shiftY, shiftZ);
246 case VertexPosition::FRONT_FACE_3D:
248 vertexId, neighborId, shiftX, shiftY, shiftZ);
250 case VertexPosition::BACK_FACE_3D:
252 vertexId, neighborId, shiftX, shiftY, shiftZ);
254 case VertexPosition::TOP_FACE_3D:
256 vertexId, neighborId, shiftX, shiftY, shiftZ);
258 case VertexPosition::TOP_FRONT_EDGE_3D:
260 vertexId, neighborId, shiftX, shiftY, shiftZ);
262 case VertexPosition::TOP_BACK_EDGE_3D:
264 vertexId, neighborId, shiftX, shiftY, shiftZ);
266 case VertexPosition::BOTTOM_FACE_3D:
268 vertexId, neighborId, shiftX, shiftY, shiftZ);
270 case VertexPosition::BOTTOM_FRONT_EDGE_3D:
272 vertexId, neighborId, shiftX, shiftY, shiftZ);
274 case VertexPosition::BOTTOM_BACK_EDGE_3D:
276 vertexId, neighborId, shiftX, shiftY, shiftZ);
278 case VertexPosition::LEFT_FACE_3D:
280 vertexId, neighborId, shiftX, shiftY, shiftZ);
282 case VertexPosition::LEFT_FRONT_EDGE_3D:
284 vertexId, neighborId, shiftX, shiftY, shiftZ);
286 case VertexPosition::LEFT_BACK_EDGE_3D:
288 vertexId, neighborId, shiftX, shiftY, shiftZ);
290 case VertexPosition::TOP_LEFT_EDGE_3D:
292 vertexId, neighborId, shiftX, shiftY, shiftZ);
294 case VertexPosition::TOP_LEFT_FRONT_CORNER_3D:
296 vertexId, neighborId, shiftX, shiftY, shiftZ);
298 case VertexPosition::TOP_LEFT_BACK_CORNER_3D:
300 vertexId, neighborId, shiftX, shiftY, shiftZ);
302 case VertexPosition::BOTTOM_LEFT_EDGE_3D:
304 vertexId, neighborId, shiftX, shiftY, shiftZ);
306 case VertexPosition::BOTTOM_LEFT_FRONT_CORNER_3D:
308 vertexId, neighborId, shiftX, shiftY, shiftZ);
310 case VertexPosition::BOTTOM_LEFT_BACK_CORNER_3D:
312 vertexId, neighborId, shiftX, shiftY, shiftZ);
314 case VertexPosition::RIGHT_FACE_3D:
316 vertexId, neighborId, shiftX, shiftY, shiftZ);
318 case VertexPosition::RIGHT_FRONT_EDGE_3D:
320 vertexId, neighborId, shiftX, shiftY, shiftZ);
322 case VertexPosition::RIGHT_BACK_EDGE_3D:
324 vertexId, neighborId, shiftX, shiftY, shiftZ);
326 case VertexPosition::TOP_RIGHT_EDGE_3D:
328 vertexId, neighborId, shiftX, shiftY, shiftZ);
330 case VertexPosition::TOP_RIGHT_FRONT_CORNER_3D:
332 vertexId, neighborId, shiftX, shiftY, shiftZ);
334 case VertexPosition::TOP_RIGHT_BACK_CORNER_3D:
336 vertexId, neighborId, shiftX, shiftY, shiftZ);
338 case VertexPosition::BOTTOM_RIGHT_EDGE_3D:
340 vertexId, neighborId, shiftX, shiftY, shiftZ);
342 case VertexPosition::BOTTOM_RIGHT_FRONT_CORNER_3D:
344 vertexId, neighborId, shiftX, shiftY, shiftZ);
346 case VertexPosition::BOTTOM_RIGHT_BACK_CORNER_3D:
348 vertexId, neighborId, shiftX, shiftY, shiftZ);
350 case VertexPosition::CENTER_2D:
352 vertexId, neighborId, shiftX, shiftY);
354 case VertexPosition::TOP_EDGE_2D:
356 vertexId, neighborId, shiftX, shiftY);
358 case VertexPosition::BOTTOM_EDGE_2D:
360 vertexId, neighborId, shiftX, shiftY);
362 case VertexPosition::LEFT_EDGE_2D:
364 vertexId, neighborId, shiftX, shiftY);
366 case VertexPosition::TOP_LEFT_CORNER_2D:
370 case VertexPosition::BOTTOM_LEFT_CORNER_2D:
374 case VertexPosition::RIGHT_EDGE_2D:
376 vertexId, neighborId, shiftX, shiftY);
378 case VertexPosition::TOP_RIGHT_CORNER_2D:
382 case VertexPosition::BOTTOM_RIGHT_CORNER_2D:
386 case VertexPosition::CENTER_1D:
388 : vertexId - decimation_;
390 case VertexPosition::LEFT_CORNER_1D:
393 case VertexPosition::RIGHT_CORNER_1D:
404 const int &localNeighborId,
406#ifndef TTK_ENABLE_KAMIKAZE
415 const auto &s = vertexShifts_[vertexId];
417 switch(vertexPositions_[vertexId]) {
418 case VertexPosition::CENTER_3D:
422 case VertexPosition::FRONT_FACE_3D:
426 case VertexPosition::BACK_FACE_3D:
430 case VertexPosition::TOP_FACE_3D:
434 case VertexPosition::BOTTOM_FACE_3D:
438 case VertexPosition::LEFT_FACE_3D:
442 case VertexPosition::RIGHT_FACE_3D:
446 case VertexPosition::TOP_FRONT_EDGE_3D:
450 case VertexPosition::BOTTOM_FRONT_EDGE_3D:
454 case VertexPosition::LEFT_FRONT_EDGE_3D:
458 case VertexPosition::RIGHT_FRONT_EDGE_3D:
462 case VertexPosition::TOP_BACK_EDGE_3D:
466 case VertexPosition::BOTTOM_BACK_EDGE_3D:
470 case VertexPosition::LEFT_BACK_EDGE_3D:
474 case VertexPosition::RIGHT_BACK_EDGE_3D:
478 case VertexPosition::TOP_LEFT_EDGE_3D:
482 case VertexPosition::TOP_RIGHT_EDGE_3D:
486 case VertexPosition::BOTTOM_LEFT_EDGE_3D:
490 case VertexPosition::BOTTOM_RIGHT_EDGE_3D:
494 case VertexPosition::TOP_LEFT_FRONT_CORNER_3D:
498 case VertexPosition::TOP_RIGHT_FRONT_CORNER_3D:
502 case VertexPosition::BOTTOM_LEFT_FRONT_CORNER_3D:
506 case VertexPosition::BOTTOM_RIGHT_FRONT_CORNER_3D:
510 case VertexPosition::TOP_LEFT_BACK_CORNER_3D:
514 case VertexPosition::TOP_RIGHT_BACK_CORNER_3D:
518 case VertexPosition::BOTTOM_LEFT_BACK_CORNER_3D:
522 case VertexPosition::BOTTOM_RIGHT_BACK_CORNER_3D:
526 case VertexPosition::CENTER_2D:
530 case VertexPosition::TOP_EDGE_2D:
533 case VertexPosition::BOTTOM_EDGE_2D:
536 case VertexPosition::LEFT_EDGE_2D:
539 case VertexPosition::RIGHT_EDGE_2D:
542 case VertexPosition::TOP_LEFT_CORNER_2D:
545 case VertexPosition::TOP_RIGHT_CORNER_2D:
548 case VertexPosition::BOTTOM_LEFT_CORNER_2D:
551 case VertexPosition::BOTTOM_RIGHT_CORNER_2D:
554 case VertexPosition::CENTER_1D:
556 : vertexId - decimation_);
558 case VertexPosition::LEFT_CORNER_1D:
559 neighborId = vertexId + decimation_;
561 case VertexPosition::RIGHT_CORNER_1D:
562 neighborId = vertexId - decimation_;
578 if(neighborId == v + shiftX)
580 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
595 return v + gridDimensions_[Di_] * shiftY;
606 if(neighborId == v - shiftX)
608 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
610 else if(neighborId == v + (gridDimensions_[Di_] * shiftY - shiftX))
625 return v + gridDimensions_[Di_] * shiftY;
627 return v + (gridDimensions_[Di_] * shiftY - shiftX);
638 if(neighborId == v + shiftX)
640 else if(neighborId == v - gridDimensions_[Di_] * shiftY)
642 else if(neighborId == v + (shiftX - gridDimensions_[Di_] * shiftY))
657 return v - gridDimensions_[Di_] * shiftY;
659 return v + (shiftX - gridDimensions_[Di_] * shiftY);
670 if(neighborId == v - shiftX)
672 else if(neighborId == v - gridDimensions_[Di_] * shiftY)
687 return v - gridDimensions_[Di_] * shiftY;
698 if(neighborId == v - decimation_)
700 else if(neighborId == v + (gridDimensions_[Di_] * shiftY - decimation_))
702 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
704 else if(neighborId == v + shiftX)
717 return v - decimation_;
719 return v + (gridDimensions_[Di_] * shiftY - decimation_);
721 return v + gridDimensions_[Di_] * shiftY;
734 if(neighborId == v - decimation_)
736 else if(neighborId == v - gridDimensions_[Di_] * shiftY)
738 else if(neighborId == v + (shiftX - gridDimensions_[Di_] * shiftY))
740 else if(neighborId == v + shiftX)
753 return v - decimation_;
755 return v - gridDimensions_[Di_] * shiftY;
757 return v + (shiftX - gridDimensions_[Di_] * shiftY);
770 if(neighborId == v - gridDimensions_[Di_] * decimation_)
772 else if(neighborId == v + (shiftX - gridDimensions_[Di_] * decimation_))
774 else if(neighborId == v + shiftX)
776 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
789 return v - gridDimensions_[Di_] * decimation_;
791 return v + (shiftX - gridDimensions_[Di_] * decimation_);
795 return v + gridDimensions_[Di_] * shiftY;
806 if(neighborId == v + (gridDimensions_[Di_] * shiftY - shiftX))
808 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
810 else if(neighborId == v - gridDimensions_[Di_] * decimation_)
812 else if(neighborId == v - shiftX)
825 return v + (gridDimensions_[Di_] * shiftY - shiftX);
827 return v + gridDimensions_[Di_] * shiftY;
829 return v - gridDimensions_[Di_] * decimation_;
842 if(neighborId == v - decimation_)
844 else if(neighborId == v - gridDimensions_[Di_] * decimation_)
846 else if(neighborId == v + (shiftX - gridDimensions_[Di_] * decimation_))
848 else if(neighborId == v + shiftX)
850 else if(neighborId == v + gridDimensions_[Di_] * shiftY)
852 else if(neighborId == v + (gridDimensions_[Di_] * shiftY - decimation_))
865 return v - decimation_;
867 return v - gridDimensions_[Di_] * decimation_;
869 return v + (shiftX - gridDimensions_[Di_] * decimation_);
873 return v + gridDimensions_[Di_] * shiftY;
875 return v + (gridDimensions_[Di_] * shiftY - decimation_);
883#ifndef TTK_ENABLE_KAMIKAZE
884 if(vertexId < 0 or vertexId >= vertexNumber_)
888 switch(vertexPositions_[vertexId]) {
889 case VertexPosition::CENTER_3D:
891 case VertexPosition::FRONT_FACE_3D:
892 case VertexPosition::BACK_FACE_3D:
893 case VertexPosition::TOP_FACE_3D:
894 case VertexPosition::BOTTOM_FACE_3D:
895 case VertexPosition::LEFT_FACE_3D:
896 case VertexPosition::RIGHT_FACE_3D:
898 case VertexPosition::TOP_FRONT_EDGE_3D:
899 case VertexPosition::RIGHT_FRONT_EDGE_3D:
900 case VertexPosition::BOTTOM_BACK_EDGE_3D:
901 case VertexPosition::LEFT_BACK_EDGE_3D:
902 case VertexPosition::BOTTOM_LEFT_EDGE_3D:
903 case VertexPosition::TOP_RIGHT_EDGE_3D:
905 case VertexPosition::TOP_RIGHT_FRONT_CORNER_3D:
906 case VertexPosition::BOTTOM_LEFT_BACK_CORNER_3D:
908 case VertexPosition::TOP_BACK_EDGE_3D:
909 case VertexPosition::BOTTOM_FRONT_EDGE_3D:
910 case VertexPosition::LEFT_FRONT_EDGE_3D:
911 case VertexPosition::TOP_LEFT_EDGE_3D:
912 case VertexPosition::RIGHT_BACK_EDGE_3D:
913 case VertexPosition::BOTTOM_RIGHT_EDGE_3D:
914 case VertexPosition::CENTER_2D:
916 case VertexPosition::TOP_LEFT_FRONT_CORNER_3D:
917 case VertexPosition::BOTTOM_LEFT_FRONT_CORNER_3D:
918 case VertexPosition::BOTTOM_RIGHT_FRONT_CORNER_3D:
919 case VertexPosition::TOP_LEFT_BACK_CORNER_3D:
920 case VertexPosition::TOP_RIGHT_BACK_CORNER_3D:
921 case VertexPosition::BOTTOM_RIGHT_BACK_CORNER_3D:
922 case VertexPosition::TOP_EDGE_2D:
923 case VertexPosition::BOTTOM_EDGE_2D:
924 case VertexPosition::LEFT_EDGE_2D:
925 case VertexPosition::RIGHT_EDGE_2D:
927 case VertexPosition::TOP_RIGHT_CORNER_2D:
928 case VertexPosition::BOTTOM_LEFT_CORNER_2D:
930 case VertexPosition::TOP_LEFT_CORNER_2D:
931 case VertexPosition::BOTTOM_RIGHT_CORNER_2D:
932 case VertexPosition::CENTER_1D:
934 case VertexPosition::LEFT_CORNER_1D:
935 case VertexPosition::RIGHT_CORNER_1D:
949 if(neighborId == v + shiftX)
951 else if(neighborId == v + vshift_[0] * shiftY)
953 else if(neighborId == v + vshift_[1] * shiftZ)
955 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
971 return v + vshift_[0] * shiftY;
973 return v + vshift_[1] * shiftZ;
975 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
987 if(neighborId == v - shiftX)
989 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
991 else if(neighborId == v + vshift_[0] * shiftY)
993 else if(neighborId == v + (vshift_[1] * shiftZ - shiftX))
995 else if(neighborId == v + vshift_[1] * shiftZ)
998 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX))
1000 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1016 return v + (vshift_[0] * shiftY - shiftX);
1018 return v + vshift_[0] * shiftY;
1020 return v + (vshift_[1] * shiftZ - shiftX);
1022 return v + vshift_[1] * shiftZ;
1024 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX);
1026 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1038 if(neighborId == v - vshift_[0] * shiftY)
1040 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
1042 else if(neighborId == v + shiftX)
1044 else if(neighborId == v + vshift_[1] * shiftZ)
1058 return v - vshift_[0] * shiftY;
1060 return v + (shiftX - vshift_[0] * shiftY);
1064 return v + vshift_[1] * shiftZ;
1076 if(neighborId == v - vshift_[0] * shiftY)
1078 else if(neighborId == v - shiftX)
1080 else if(neighborId == v + (-shiftX + vshift_[1] * shiftZ))
1082 else if(neighborId == v + vshift_[1] * shiftZ)
1096 return v - vshift_[0] * shiftY;
1100 return v + (-shiftX + vshift_[1] * shiftZ);
1102 return v + vshift_[1] * shiftZ;
1114 if(neighborId == v - vshift_[1] * shiftZ)
1116 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1118 else if(neighborId == v + shiftX)
1120 else if(neighborId == v + vshift_[0] * shiftY)
1134 return v - vshift_[1] * shiftZ;
1136 return v + (shiftX - vshift_[1] * shiftZ);
1140 return v + vshift_[0] * shiftY;
1152 if(neighborId == v - vshift_[1] * shiftZ)
1154 else if(neighborId == v - shiftX)
1156 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
1158 else if(neighborId == v + vshift_[0] * shiftY)
1172 return v - vshift_[1] * shiftZ;
1176 return v + (vshift_[0] * shiftY - shiftX);
1178 return v + vshift_[0] * shiftY;
1190 if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1193 == v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ))
1195 else if(neighborId == v - vshift_[1] * shiftZ)
1197 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1199 else if(neighborId == v - vshift_[0] * shiftY)
1201 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
1203 else if(neighborId == v + shiftX)
1217 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1219 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ);
1221 return v - vshift_[1] * shiftZ;
1223 return v + (shiftX - vshift_[1] * shiftZ);
1225 return v - vshift_[0] * shiftY;
1227 return v + (shiftX - vshift_[0] * shiftY);
1241 if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1243 else if(neighborId == v - vshift_[1] * shiftZ)
1245 else if(neighborId == v - vshift_[0] * shiftY)
1247 else if(neighborId == v - shiftX)
1261 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1263 return v - vshift_[1] * shiftZ;
1265 return v - vshift_[0] * shiftY;
1279 if(neighborId == v - decimation_)
1281 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
1283 else if(neighborId == v + vshift_[0] * shiftY)
1285 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
1287 else if(neighborId == v + vshift_[1] * shiftZ)
1290 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_))
1292 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1294 else if(neighborId == v + shiftX)
1308 return v - decimation_;
1310 return v + (vshift_[0] * shiftY - decimation_);
1312 return v + vshift_[0] * shiftY;
1314 return v + (vshift_[1] * shiftZ - decimation_);
1316 return v + vshift_[1] * shiftZ;
1318 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_);
1320 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1334 if(neighborId == v - vshift_[0] * shiftY)
1336 else if(neighborId == v - decimation_)
1338 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
1340 else if(neighborId == v + vshift_[1] * shiftZ)
1342 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
1344 else if(neighborId == v + shiftX)
1357 return v - vshift_[0] * shiftY;
1359 return v - decimation_;
1361 return v + (vshift_[1] * shiftZ - decimation_);
1363 return v + vshift_[1] * shiftZ;
1365 return v + (shiftX - vshift_[0] * shiftY);
1379 if(neighborId == v - vshift_[1] * shiftZ)
1381 else if(neighborId == v - decimation_)
1383 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
1385 else if(neighborId == v + vshift_[0] * shiftY)
1387 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1389 else if(neighborId == v + shiftX)
1402 return v - vshift_[1] * shiftZ;
1404 return v - decimation_;
1406 return v + (vshift_[0] * shiftY - decimation_);
1408 return v + vshift_[0] * shiftY;
1410 return v + (shiftX - vshift_[1] * shiftZ);
1424 if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1427 == v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ))
1429 else if(neighborId == v - vshift_[1] * shiftZ)
1431 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1433 else if(neighborId == v - vshift_[0] * shiftY)
1435 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
1437 else if(neighborId == v + shiftX)
1439 else if(neighborId == v - decimation_)
1453 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1455 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ);
1457 return v - vshift_[1] * shiftZ;
1459 return v + (shiftX - vshift_[1] * shiftZ);
1461 return v - vshift_[0] * shiftY;
1463 return v + (shiftX - vshift_[0] * shiftY);
1467 return v - decimation_;
1480 if(neighborId == v - vshift_[0] * decimation_)
1482 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
1484 else if(neighborId == v + shiftX)
1486 else if(neighborId == v + vshift_[1] * shiftZ)
1488 else if(neighborId == v + vshift_[0] * shiftY)
1490 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1503 return v - vshift_[0] * decimation_;
1505 return v + (shiftX - vshift_[0] * decimation_);
1509 return v + vshift_[1] * shiftZ;
1511 return v + vshift_[0] * shiftY;
1513 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1525 if(neighborId == v - shiftX)
1527 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
1529 else if(neighborId == v + vshift_[0] * shiftY)
1531 else if(neighborId == v + (vshift_[1] * shiftZ - shiftX))
1533 else if(neighborId == v + vshift_[1] * shiftZ)
1536 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX))
1538 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1540 else if(neighborId == v - vshift_[0] * decimation_)
1555 return v + (vshift_[0] * shiftY - shiftX);
1557 return v + vshift_[0] * shiftY;
1559 return v + (vshift_[1] * shiftZ - shiftX);
1561 return v + vshift_[1] * shiftZ;
1563 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX);
1565 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1567 return v - vshift_[0] * decimation_;
1579 if(neighborId == v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ))
1582 == v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * shiftZ))
1584 else if(neighborId == v - vshift_[1] * shiftZ)
1586 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1588 else if(neighborId == v - vshift_[0] * decimation_)
1590 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
1592 else if(neighborId == v + shiftX)
1594 else if(neighborId == v + vshift_[0] * shiftY)
1607 return v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ);
1609 return v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * shiftZ);
1611 return v - vshift_[1] * shiftZ;
1613 return v + (shiftX - vshift_[1] * shiftZ);
1615 return v - vshift_[0] * decimation_;
1617 return v + (shiftX - vshift_[0] * decimation_);
1621 return v + vshift_[0] * shiftY;
1633 if(neighborId == v - vshift_[1] * shiftZ)
1635 else if(neighborId == v - shiftX)
1637 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
1639 else if(neighborId == v + vshift_[0] * shiftY)
1641 else if(neighborId == v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ))
1643 else if(neighborId == v - vshift_[0] * decimation_)
1656 return v - vshift_[1] * shiftZ;
1660 return v + (vshift_[0] * shiftY - shiftX);
1662 return v + vshift_[0] * shiftY;
1664 return v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ);
1666 return v - vshift_[0] * decimation_;
1678 if(neighborId == v + shiftX)
1680 else if(neighborId == v + vshift_[0] * shiftY)
1682 else if(neighborId == v + vshift_[1] * shiftZ)
1684 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1686 else if(neighborId == v - vshift_[1] * decimation_)
1688 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
1703 return v + vshift_[0] * shiftY;
1705 return v + vshift_[1] * shiftZ;
1707 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1709 return v - vshift_[1] * decimation_;
1711 return v + (shiftX - vshift_[1] * decimation_);
1723 if(neighborId == v - shiftX)
1725 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
1727 else if(neighborId == v + vshift_[0] * shiftY)
1729 else if(neighborId == v + (vshift_[1] * shiftZ - shiftX))
1731 else if(neighborId == v + vshift_[1] * shiftZ)
1734 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX))
1736 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1738 else if(neighborId == v - vshift_[1] * decimation_)
1754 return v + (vshift_[0] * shiftY - shiftX);
1756 return v + vshift_[0] * shiftY;
1758 return v + (vshift_[1] * shiftZ - shiftX);
1760 return v + vshift_[1] * shiftZ;
1762 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX);
1764 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1766 return v - vshift_[1] * decimation_;
1778 if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * decimation_))
1781 == v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation_))
1783 else if(neighborId == v - vshift_[1] * decimation_)
1785 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
1787 else if(neighborId == v - vshift_[0] * shiftY)
1789 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
1791 else if(neighborId == v + shiftX)
1793 else if(neighborId == v + vshift_[1] * shiftZ)
1806 return v - (vshift_[0] * shiftY + vshift_[1] * decimation_);
1808 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation_);
1810 return v - vshift_[1] * decimation_;
1812 return v + (shiftX - vshift_[1] * decimation_);
1814 return v - vshift_[0] * shiftY;
1816 return v + (shiftX - vshift_[0] * shiftY);
1820 return v + vshift_[1] * shiftZ;
1832 if(neighborId == v - vshift_[0] * shiftY)
1834 else if(neighborId == v - shiftX)
1836 else if(neighborId == v + (vshift_[1] * shiftZ - shiftX))
1838 else if(neighborId == v + vshift_[1] * shiftZ)
1840 else if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * decimation_))
1842 else if(neighborId == v - vshift_[1] * decimation_)
1855 return v - vshift_[0] * shiftY;
1859 return v + (vshift_[1] * shiftZ - shiftX);
1861 return v + vshift_[1] * shiftZ;
1863 return v - (vshift_[0] * shiftY + vshift_[1] * decimation_);
1865 return v - vshift_[1] * decimation_;
1877 if(neighborId == v - decimation_)
1879 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
1881 else if(neighborId == v + vshift_[0] * shiftY)
1883 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
1885 else if(neighborId == v + vshift_[1] * shiftZ)
1888 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_))
1890 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
1892 else if(neighborId == v - vshift_[0] * decimation_)
1894 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
1896 else if(neighborId == v + shiftX)
1910 return v - decimation_;
1912 return v + (vshift_[0] * shiftY - decimation_);
1914 return v + vshift_[0] * shiftY;
1916 return v + (vshift_[1] * shiftZ - decimation_);
1918 return v + vshift_[1] * shiftZ;
1920 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_);
1922 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
1924 return v - vshift_[0] * decimation_;
1926 return v + (shiftX - vshift_[0] * decimation_);
1940 if(neighborId == v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ))
1943 == v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * shiftZ))
1945 else if(neighborId == v - vshift_[1] * shiftZ)
1947 else if(neighborId == v + (shiftX - vshift_[1] * shiftZ))
1949 else if(neighborId == v - vshift_[0] * decimation_)
1951 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
1953 else if(neighborId == v + shiftX)
1955 else if(neighborId == v - decimation_)
1957 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
1959 else if(neighborId == v + vshift_[0] * shiftY)
1972 return v - (vshift_[0] * decimation_ + vshift_[1] * shiftZ);
1974 return v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * shiftZ);
1976 return v - vshift_[1] * shiftZ;
1978 return v + (shiftX - vshift_[1] * shiftZ);
1980 return v - vshift_[0] * decimation_;
1982 return v + (shiftX - vshift_[0] * decimation_);
1986 return v - decimation_;
1988 return v + (vshift_[0] * shiftY - decimation_);
1990 return v + vshift_[0] * shiftY;
2002 if(neighborId == v - (vshift_[0] * decimation_ + vshift_[1] * decimation_))
2005 == v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * decimation_))
2007 else if(neighborId == v - vshift_[1] * decimation_)
2009 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
2011 else if(neighborId == v - vshift_[0] * decimation_)
2013 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
2015 else if(neighborId == v + shiftX)
2017 else if(neighborId == v + vshift_[0] * shiftY)
2019 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
2021 else if(neighborId == v + vshift_[1] * shiftZ)
2034 return v - (vshift_[0] * decimation_ + vshift_[1] * decimation_);
2037 + (shiftX - vshift_[0] * decimation_
2038 - vshift_[1] * decimation_);
2040 return v - vshift_[1] * decimation_;
2042 return v + (shiftX - vshift_[1] * decimation_);
2044 return v - vshift_[0] * decimation_;
2046 return v + (shiftX - vshift_[0] * decimation_);
2050 return v + vshift_[0] * shiftY;
2052 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
2054 return v + vshift_[1] * shiftZ;
2066 if(neighborId == v - shiftX)
2068 else if(neighborId == v + (vshift_[0] * shiftY - shiftX))
2070 else if(neighborId == v + vshift_[0] * shiftY)
2072 else if(neighborId == v + (vshift_[1] * shiftZ - shiftX))
2074 else if(neighborId == v + vshift_[1] * shiftZ)
2077 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX))
2079 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
2081 else if(neighborId == v - vshift_[1] * decimation_)
2084 == v - (vshift_[0] * decimation_ + vshift_[1] * decimation_))
2086 else if(neighborId == v - vshift_[0] * decimation_)
2101 return v + (vshift_[0] * shiftY - shiftX);
2103 return v + vshift_[0] * shiftY;
2105 return v + (vshift_[1] * shiftZ - shiftX);
2107 return v + vshift_[1] * shiftZ;
2109 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX);
2111 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
2113 return v - vshift_[1] * decimation_;
2116 - (vshift_[0] * decimation_
2117 + vshift_[1] * decimation_);
2119 return v - vshift_[0] * decimation_;
2131 if(neighborId == v - decimation_)
2133 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
2135 else if(neighborId == v + vshift_[0] * shiftY)
2137 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
2139 else if(neighborId == v + vshift_[1] * shiftZ)
2142 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_))
2144 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
2146 else if(neighborId == v + shiftX)
2148 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
2150 else if(neighborId == v - vshift_[1] * decimation_)
2163 return v - decimation_;
2165 return v + (vshift_[0] * shiftY - decimation_);
2167 return v + vshift_[0] * shiftY;
2169 return v + (vshift_[1] * shiftZ - decimation_);
2171 return v + vshift_[1] * shiftZ;
2173 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_);
2175 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
2179 return v + (shiftX - vshift_[1] * decimation_);
2181 return v - vshift_[1] * decimation_;
2193 if(neighborId == v - (vshift_[0] * shiftY + vshift_[1] * decimation_))
2196 == v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation_))
2198 else if(neighborId == v - vshift_[1] * decimation_)
2200 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
2202 else if(neighborId == v - vshift_[0] * shiftY)
2204 else if(neighborId == v + (shiftX - vshift_[0] * shiftY))
2206 else if(neighborId == v + shiftX)
2208 else if(neighborId == v - decimation_)
2210 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
2212 else if(neighborId == v + vshift_[1] * shiftZ)
2225 return v - (vshift_[0] * shiftY + vshift_[1] * decimation_);
2227 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation_);
2229 return v - vshift_[1] * decimation_;
2231 return v + (shiftX - vshift_[1] * decimation_);
2233 return v - vshift_[0] * shiftY;
2235 return v + (shiftX - vshift_[0] * shiftY);
2239 return v - decimation_;
2241 return v + (vshift_[1] * shiftZ - decimation_);
2243 return v + vshift_[1] * shiftZ;
2255 if(neighborId == v - (vshift_[0] * decimation_ + vshift_[1] * decimation_))
2258 == v + (shiftX - vshift_[0] * decimation_ - vshift_[1] * decimation_))
2260 else if(neighborId == v - vshift_[1] * decimation_)
2262 else if(neighborId == v + (shiftX - vshift_[1] * decimation_))
2264 else if(neighborId == v - vshift_[0] * decimation_)
2266 else if(neighborId == v + (shiftX - vshift_[0] * decimation_))
2268 else if(neighborId == v + shiftX)
2270 else if(neighborId == v + (vshift_[1] * shiftZ - decimation_))
2272 else if(neighborId == v + vshift_[1] * shiftZ)
2274 else if(neighborId == v - decimation_)
2276 else if(neighborId == v + (vshift_[0] * shiftY - decimation_))
2278 else if(neighborId == v + vshift_[0] * shiftY)
2281 == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation_))
2283 else if(neighborId == v + (vshift_[0] * shiftY + vshift_[1] * shiftZ))
2296 return v - (vshift_[0] * decimation_ + vshift_[1] * decimation_);
2299 + (shiftX - vshift_[0] * decimation_
2300 - vshift_[1] * decimation_);
2302 return v - vshift_[1] * decimation_;
2304 return v + (shiftX - vshift_[1] * decimation_);
2306 return v - vshift_[0] * decimation_;
2308 return v + (shiftX - vshift_[0] * decimation_);
2312 return v + (vshift_[1] * shiftZ - decimation_);
2314 return v + vshift_[1] * shiftZ;
2316 return v - decimation_;
2318 return v + (vshift_[0] * shiftY - decimation_);
2320 return v + vshift_[0] * shiftY;
2323 + (vshift_[0] * shiftY + vshift_[1] * shiftZ
2326 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
2336 SimplexId &invertedLocalNeighbor)
const {
2341 invertedLocalNeighbor = 13;
2343 = v - (vshift_[0] * decimation_ + vshift_[1] * decimation_);
2346 invertedLocalNeighbor = 12;
2349 + (shiftX - vshift_[0] * decimation_ - vshift_[1] * decimation_);
2352 invertedLocalNeighbor = 8;
2353 invertedVertexId = v - vshift_[1] * decimation_;
2356 invertedLocalNeighbor = 7;
2357 invertedVertexId = v + (shiftX - vshift_[1] * decimation_);
2360 invertedLocalNeighbor = 11;
2361 invertedVertexId = v - vshift_[0] * decimation_;
2364 invertedLocalNeighbor = 10;
2365 invertedVertexId = v + (shiftX - vshift_[0] * decimation_);
2368 invertedLocalNeighbor = 9;
2369 invertedVertexId = v + shiftX;
2372 invertedLocalNeighbor = 3;
2373 invertedVertexId = v + (vshift_[1] * shiftZ - decimation_);
2376 invertedLocalNeighbor = 2;
2377 invertedVertexId = v + vshift_[1] * shiftZ;
2380 invertedLocalNeighbor = 6;
2381 invertedVertexId = v - decimation_;
2384 invertedLocalNeighbor = 5;
2385 invertedVertexId = v + (vshift_[0] * shiftY - decimation_);
2388 invertedLocalNeighbor = 4;
2389 invertedVertexId = v + vshift_[0] * shiftY;
2392 invertedLocalNeighbor = 1;
2393 invertedVertexId = v
2394 + (vshift_[0] * shiftY + vshift_[1] * shiftZ
2398 invertedLocalNeighbor = 0;
2400 = v + (vshift_[0] * shiftY + vshift_[1] * shiftZ);
2403 return invertedVertexId;
2409 invertedLocalNeighbor = 6;
2412 invertedLocalNeighbor = 5;
2415 invertedLocalNeighbor = 4;
2418 invertedLocalNeighbor = 3;
2421 invertedLocalNeighbor = 2;
2424 invertedLocalNeighbor = 1;
2427 invertedLocalNeighbor = 0;
2430 invertedLocalNeighbor = 9;
2433 invertedLocalNeighbor = 8;
2436 invertedLocalNeighbor = 7;
2445 invertedLocalNeighbor = 0;
2448 invertedLocalNeighbor = 1;
2451 invertedLocalNeighbor = 2;
2454 invertedLocalNeighbor = 3;
2457 invertedLocalNeighbor = 4;
2460 invertedLocalNeighbor = 5;
2463 invertedLocalNeighbor = 6;
2466 invertedLocalNeighbor = 7;
2469 invertedLocalNeighbor = 8;
2472 invertedLocalNeighbor = 9;
2481 invertedLocalNeighbor = 0;
2484 invertedLocalNeighbor = 1;
2487 invertedLocalNeighbor = 2;
2490 invertedLocalNeighbor = 3;
2493 invertedLocalNeighbor = 4;
2496 invertedLocalNeighbor = 5;
2499 invertedLocalNeighbor = 6;
2502 invertedLocalNeighbor = 7;
2505 invertedLocalNeighbor = 8;
2508 invertedLocalNeighbor = 9;
2516 invertedLocalNeighbor = 0;
2519 invertedLocalNeighbor = 1;
2522 invertedLocalNeighbor = 2;
2525 invertedLocalNeighbor = 3;
2528 invertedLocalNeighbor = 4;
2531 invertedLocalNeighbor = 5;
2534 invertedLocalNeighbor = 6;
2537 invertedLocalNeighbor = 7;
2540 invertedLocalNeighbor = 8;
2543 invertedLocalNeighbor = 9;
2551 invertedLocalNeighbor = 0;
2554 invertedLocalNeighbor = 1;
2557 invertedLocalNeighbor = 2;
2560 invertedLocalNeighbor = 3;
2563 invertedLocalNeighbor = 4;
2566 invertedLocalNeighbor = 5;
2569 invertedLocalNeighbor = 6;
2572 invertedLocalNeighbor = 7;
2575 invertedLocalNeighbor = 8;
2578 invertedLocalNeighbor = 9;
2586 invertedLocalNeighbor = 0;
2589 invertedLocalNeighbor = 1;
2592 invertedLocalNeighbor = 2;
2595 invertedLocalNeighbor = 3;
2598 invertedLocalNeighbor = 4;
2601 invertedLocalNeighbor = 5;
2604 invertedLocalNeighbor = 6;
2607 invertedLocalNeighbor = 7;
2610 invertedLocalNeighbor = 8;
2613 invertedLocalNeighbor = 9;
2621 invertedLocalNeighbor = 0;
2624 invertedLocalNeighbor = 1;
2627 invertedLocalNeighbor = 2;
2630 invertedLocalNeighbor = 3;
2633 invertedLocalNeighbor = 4;
2636 invertedLocalNeighbor = 5;
2639 invertedLocalNeighbor = 6;
2642 invertedLocalNeighbor = 7;
2650 invertedLocalNeighbor = 0;
2653 invertedLocalNeighbor = 1;
2656 invertedLocalNeighbor = 2;
2659 invertedLocalNeighbor = 3;
2662 invertedLocalNeighbor = 4;
2665 invertedLocalNeighbor = 5;
2673 invertedLocalNeighbor = 0;
2676 invertedLocalNeighbor = 1;
2679 invertedLocalNeighbor = 2;
2682 invertedLocalNeighbor = 3;
2685 invertedLocalNeighbor = 4;
2688 invertedLocalNeighbor = 5;
2696 invertedLocalNeighbor = 0;
2699 invertedLocalNeighbor = 1;
2702 invertedLocalNeighbor = 2;
2705 invertedLocalNeighbor = 3;
2708 invertedLocalNeighbor = 4;
2711 invertedLocalNeighbor = 5;
2714 invertedLocalNeighbor = 6;
2717 invertedLocalNeighbor = 7;
2725 invertedLocalNeighbor = 0;
2728 invertedLocalNeighbor = 1;
2731 invertedLocalNeighbor = 2;
2734 invertedLocalNeighbor = 3;
2737 invertedLocalNeighbor = 4;
2740 invertedLocalNeighbor = 5;
2748 invertedLocalNeighbor = 0;
2751 invertedLocalNeighbor = 1;
2754 invertedLocalNeighbor = 2;
2757 invertedLocalNeighbor = 3;
2760 invertedLocalNeighbor = 4;
2763 invertedLocalNeighbor = 5;
2766 invertedLocalNeighbor = 6;
2769 invertedLocalNeighbor = 7;
2777 invertedLocalNeighbor = 0;
2780 invertedLocalNeighbor = 1;
2783 invertedLocalNeighbor = 2;
2786 invertedLocalNeighbor = 3;
2789 invertedLocalNeighbor = 4;
2792 invertedLocalNeighbor = 5;
2800 invertedLocalNeighbor = 0;
2803 invertedLocalNeighbor = 1;
2806 invertedLocalNeighbor = 2;
2809 invertedLocalNeighbor = 3;
2812 invertedLocalNeighbor = 4;
2815 invertedLocalNeighbor = 5;
2818 invertedLocalNeighbor = 6;
2821 invertedLocalNeighbor = 7;
2829 invertedLocalNeighbor = 0;
2832 invertedLocalNeighbor = 1;
2835 invertedLocalNeighbor = 2;
2838 invertedLocalNeighbor = 3;
2841 invertedLocalNeighbor = 4;
2844 invertedLocalNeighbor = 5;
2847 invertedLocalNeighbor = 6;
2850 invertedLocalNeighbor = 7;
2858 invertedLocalNeighbor = 0;
2861 invertedLocalNeighbor = 1;
2864 invertedLocalNeighbor = 2;
2867 invertedLocalNeighbor = 3;
2870 invertedLocalNeighbor = 4;
2873 invertedLocalNeighbor = 5;
2881 invertedLocalNeighbor = 0;
2884 invertedLocalNeighbor = 1;
2887 invertedLocalNeighbor = 2;
2890 invertedLocalNeighbor = 3;
2893 invertedLocalNeighbor = 4;
2896 invertedLocalNeighbor = 5;
2899 invertedLocalNeighbor = 6;
2902 invertedLocalNeighbor = 7;
2910 invertedLocalNeighbor = 0;
2913 invertedLocalNeighbor = 1;
2916 invertedLocalNeighbor = 2;
2919 invertedLocalNeighbor = 3;
2922 invertedLocalNeighbor = 4;
2925 invertedLocalNeighbor = 5;
2933 invertedLocalNeighbor = 0;
2936 invertedLocalNeighbor = 1;
2939 invertedLocalNeighbor = 2;
2942 invertedLocalNeighbor = 3;
2950 invertedLocalNeighbor = 0;
2953 invertedLocalNeighbor = 1;
2956 invertedLocalNeighbor = 2;
2959 invertedLocalNeighbor = 3;
2967 invertedLocalNeighbor = 0;
2970 invertedLocalNeighbor = 1;
2973 invertedLocalNeighbor = 2;
2976 invertedLocalNeighbor = 3;
2984 invertedLocalNeighbor = 0;
2987 invertedLocalNeighbor = 1;
2990 invertedLocalNeighbor = 2;
2993 invertedLocalNeighbor = 3;
2996 invertedLocalNeighbor = 4;
2999 invertedLocalNeighbor = 5;
3002 invertedLocalNeighbor = 6;
3010 invertedLocalNeighbor = 0;
3013 invertedLocalNeighbor = 1;
3016 invertedLocalNeighbor = 2;
3019 invertedLocalNeighbor = 3;
3022 invertedLocalNeighbor = 4;
3025 invertedLocalNeighbor = 5;
3028 invertedLocalNeighbor = 6;
3036 invertedLocalNeighbor = 0;
3039 invertedLocalNeighbor = 1;
3042 invertedLocalNeighbor = 2;
3045 invertedLocalNeighbor = 3;
3053 invertedLocalNeighbor = 0;
3056 invertedLocalNeighbor = 1;
3059 invertedLocalNeighbor = 2;
3062 invertedLocalNeighbor = 3;
3070 invertedLocalNeighbor = 0;
3073 invertedLocalNeighbor = 1;
3076 invertedLocalNeighbor = 2;
3079 invertedLocalNeighbor = 3;
3085 const SimplexId vertex, std::array<SimplexId, 3> &p)
const {
3086 p[0] = vertex % vshift_[0];
3087 p[1] = vertex / vshift_[0];
3091 const SimplexId vertex, std::array<SimplexId, 3> &p)
const {
3092 p[0] = vertex % vshift_[0];
3093 p[1] = (vertex % vshift_[1]) / vshift_[0];
3094 p[2] = vertex / vshift_[1];
3098 bool is_in_triangulation =
false;
3099 if(dimensionality_ == 1) {
3100 is_in_triangulation = ((vertexId % decimation_) == 0);
3101 }
else if(dimensionality_ == 2) {
3102 std::array<SimplexId, 3> p{};
3105 = ((p[0] % decimation_) == 0) and ((p[1] % decimation_) == 0);
3106 }
else if(dimensionality_ == 3) {
3107 std::array<SimplexId, 3> p{};
3109 is_in_triangulation = ((p[0] % decimation_) == 0)
3110 and ((p[1] % decimation_) == 0)
3111 and ((p[2] % decimation_) == 0);
3113 this->
printErr(
"Unknown dimension " + std::to_string(dimensionality_));
3115 return is_in_triangulation;
3121 if(decimation_ == 1)
3124 pLocal[0] = localId % gridDecimatedDimensions_[Di_];
3127 % (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]))
3128 / gridDecimatedDimensions_[Di_];
3130 = localId / (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]);
3136 if(nbvoxels_[0] % decimation_
3137 and pLocal[0] == gridDecimatedDimensions_[Di_] - 1) {
3138 p0 -= decimation_ - nbvoxels_[0] % decimation_;
3140 if(nbvoxels_[1] % decimation_
3141 and pLocal[1] == gridDecimatedDimensions_[Dj_] - 1) {
3142 p1 -= decimation_ - nbvoxels_[1] % decimation_;
3144 if(nbvoxels_[2] % decimation_
3145 and pLocal[2] == gridDecimatedDimensions_[2] - 1) {
3146 p2 -= decimation_ - nbvoxels_[2] % decimation_;
3148 SimplexId const globalId = p0 + p1 * gridDimensions_[0]
3149 + p2 * gridDimensions_[0] * gridDimensions_[1];
3163 SimplexId localNeighborId0 = -1, localNeighborId1 = -1;
3164 if(dimensionality_ == 3) {
3165 std::array<SimplexId, 3> p{};
3168 if(0 < p[0] and p[0] < nbvoxels_[0]) {
3169 if(0 < p[1] and p[1] < nbvoxels_[1]) {
3170 if(0 < p[2] and p[2] < nbvoxels_[2])
3177 }
else if(p[1] == 0) {
3178 if(0 < p[2] and p[2] < nbvoxels_[2])
3185 if(0 < p[2] and p[2] < nbvoxels_[2])
3192 }
else if(p[0] == 0) {
3193 if(0 < p[1] and p[1] < nbvoxels_[1]) {
3194 if(0 < p[2] and p[2] < nbvoxels_[2])
3202 }
else if(p[1] == 0) {
3203 if(0 < p[2] and p[2] < nbvoxels_[2])
3207 if(0 < p[2] and p[2] < nbvoxels_[2])
3212 if(0 < p[1] and p[1] < nbvoxels_[1]) {
3213 if(0 < p[2] and p[2] < nbvoxels_[2])
3222 }
else if(p[1] == 0) {
3223 if(0 < p[2] and p[2] < nbvoxels_[2])
3227 if(0 < p[2] and p[2] < nbvoxels_[2])
3233 }
else if(dimensionality_ == 2) {
3234 std::array<SimplexId, 3> p{};
3237 if(0 < p[0] and p[0] < nbvoxels_[Di_]) {
3238 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
3241 }
else if(p[1] == 0) {
3248 }
else if(p[0] == 0) {
3249 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
3254 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
3260 this->
printWrn(
"getImpactedVertices not implemented for 1D yet");
3262 v0[0] = localNeighborId0;
3263 v1[0] = localNeighborId1;
3272 this->
printMsg(
"BOUNDARY CASES TO TAKE CARE OF");
3275 pLocalNeighbor[0] = neighborId % gridDecimatedDimensions_[Di_];
3278 % (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]))
3279 / gridDecimatedDimensions_[Di_];
3282 / (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]);
3285 pLocalVertex[0] = vertexId % gridDecimatedDimensions_[Di_];
3288 % (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]))
3289 / gridDecimatedDimensions_[Di_];
3292 / (gridDecimatedDimensions_[Di_] * gridDecimatedDimensions_[Dj_]);
3294 int localNeighbor = -1;
3296 if(dimensionality_ == 2) {
3297 if(pLocalNeighbor[0] == pLocalVertex[0]) {
3298 if(pLocalNeighbor[1] == pLocalVertex[1]) {
3299 this->
printErr(
"localNeighbor: not a neighbor!");
3300 }
else if(pLocalNeighbor[1] == pLocalVertex[1] + 1) {
3302 }
else if(pLocalNeighbor[1] == pLocalVertex[1] - 1) {
3305 }
else if(pLocalNeighbor[0] == pLocalVertex[0] + 1) {
3306 if(pLocalNeighbor[1] == pLocalVertex[1]) {
3308 }
else if(pLocalNeighbor[1] == pLocalVertex[1] - 1) {
3311 this->
printErr(
"localNeighbor: not a neighbor!");
3313 }
else if(pLocalNeighbor[0] == pLocalVertex[0] - 1) {
3314 if(pLocalNeighbor[1] == pLocalVertex[1]) {
3316 }
else if(pLocalNeighbor[1] == pLocalVertex[1] + 1) {
3319 this->
printErr(
"localNeighbor: not a neighbor!");
3322 this->
printErr(
"localNeighbor: not a neighbor!");
3324 }
else if(dimensionality_ == 3) {
3325 this->
printWrn(
"Local neighbors ids not implemented yet for 3D");
3328 return localNeighbor;
3335 SimplexId &invertedLocalNeighborId)
const {
3337 if(dimensionality_ == 3) {
3338 std::array<SimplexId, 3> p{};
3344 if((nbvoxels_[0] % decimation_) and (p[0] + decimation_ > nbvoxels_[0])) {
3345 shiftX = nbvoxels_[0] % decimation_;
3347 if((nbvoxels_[1] % decimation_) and (p[1] + decimation_ > nbvoxels_[1])) {
3348 shiftY = nbvoxels_[1] % decimation_;
3350 if((nbvoxels_[2] % decimation_) and (p[2] + decimation_ > nbvoxels_[2])) {
3351 shiftZ = nbvoxels_[2] % decimation_;
3355 invertedLocalNeighborId);
3357 if(decimation_ < p[0] and p[0] < nbvoxels_[0] - shiftX) {
3358 if(decimation_ < p[1] and p[1] < nbvoxels_[1] - shiftY) {
3359 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ) {
3362 }
else if(p[2] == decimation_)
3368 }
else if(p[1] == decimation_) {
3369 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3372 else if(p[2] == decimation_)
3379 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3382 else if(p[2] == decimation_)
3389 }
else if(p[0] == decimation_) {
3390 if(decimation_ < p[1] and p[1] < nbvoxels_[1] - shiftY) {
3391 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3394 else if(p[2] == decimation_)
3400 }
else if(p[1] == decimation_) {
3401 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3404 else if(p[2] == decimation_)
3411 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3414 else if(p[2] == decimation_)
3422 if(decimation_ < p[1] and p[1] < nbvoxels_[1] - shiftY) {
3423 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3426 else if(p[2] == decimation_)
3432 }
else if(p[1] == decimation_) {
3433 if(0 < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3436 else if(p[2] == decimation_)
3443 if(decimation_ < p[2] and p[2] < nbvoxels_[2] - shiftZ)
3446 else if(p[2] == decimation_)
3456 }
else if(dimensionality_ == 2) {
3457 std::array<SimplexId, 3> p{};
3462 if((nbvoxels_[Di_] % decimation_)
3463 and (p[0] + decimation_ > nbvoxels_[Di_])) {
3464 shiftX = nbvoxels_[0] % decimation_;
3466 if((nbvoxels_[Dj_] % decimation_)
3467 and (p[1] + decimation_ > nbvoxels_[Dj_])) {
3468 shiftY = nbvoxels_[1] % decimation_;
3473 invertedLocalNeighborId);
3475 if(0 < p[0] and p[0] < nbvoxels_[Di_] - shiftX) {
3476 if(decimation_ < p[1] and p[1] < nbvoxels_[Dj_]) {
3478 }
else if(p[1] == decimation_) {
3483 }
else if(p[0] == decimation_) {
3484 if(decimation_ < p[1] and p[1] < nbvoxels_[Dj_] - shiftY) {
3486 }
else if(p[1] == decimation_) {
3492 if(decimation_ < p[1] and p[1] < nbvoxels_[Dj_] - shiftY) {
3494 }
else if(p[1] == decimation_) {
3500 }
else if(dimensionality_ == 1) {
3502 this->
printWrn(
"NOT TESTED IN 1D");
3503 if(vertexId > decimation_ and vertexId < nbvoxels_[Di_]) {
3505 invertedVertexId = vertexId + decimation_;
3507 invertedVertexId = vertexId - decimation_;
3508 }
else if(vertexId == decimation_)
3509 invertedVertexId = vertexId + decimation_;
3511 invertedVertexId = vertexId - decimation_;
3521 SimplexId &invertedLocalNeighbor)
const {
3525 invertedLocalNeighbor = 3;
3526 invertedVertexId = v - decimation_;
3529 invertedLocalNeighbor = 4;
3530 invertedVertexId = v - gridDimensions_[Di_] * decimation_;
3533 invertedLocalNeighbor = 5;
3534 invertedVertexId = v + (shiftX - gridDimensions_[Di_] * decimation_);
3537 invertedLocalNeighbor = 0;
3538 invertedVertexId = v + shiftX;
3541 invertedLocalNeighbor = 1;
3542 invertedVertexId = v + gridDimensions_[Di_] * shiftY;
3545 invertedLocalNeighbor = 2;
3546 invertedVertexId = v + (gridDimensions_[Di_] * shiftY - decimation_);
3549 return invertedVertexId;
3556 invertedLocalNeighbor = 0;
3559 invertedLocalNeighbor = 1;
3569 invertedLocalNeighbor = 0;
3572 invertedLocalNeighbor = 1;
3575 invertedLocalNeighbor = 2;
3585 invertedLocalNeighbor = 0;
3588 invertedLocalNeighbor = 1;
3591 invertedLocalNeighbor = 2;
3601 invertedLocalNeighbor = 0;
3604 invertedLocalNeighbor = 1;
3614 invertedLocalNeighbor = 0;
3617 invertedLocalNeighbor = 1;
3620 invertedLocalNeighbor = 2;
3623 invertedLocalNeighbor = 3;
3633 invertedLocalNeighbor = 0;
3636 invertedLocalNeighbor = 1;
3639 invertedLocalNeighbor = 2;
3642 invertedLocalNeighbor = 3;
3652 invertedLocalNeighbor = 0;
3655 invertedLocalNeighbor = 1;
3658 invertedLocalNeighbor = 2;
3661 invertedLocalNeighbor = 3;
3671 invertedLocalNeighbor = 0;
3674 invertedLocalNeighbor = 1;
3677 invertedLocalNeighbor = 2;
3680 invertedLocalNeighbor = 3;
3687 const int prev_decim,
const std::array<SimplexId, 3> &p)
const {
3688 this->
printErr(
"THIS SHOULDNT HAPPEN");
3689 this->
printErr(
"previous decimation: " + std::to_string(prev_decim));
3690 this->
printErr(
"position: " + std::to_string(p[0]) +
" "
3691 + std::to_string(p[1]) +
" " + std::to_string(p[2]));
3692 this->
printErr(
"grid size: " + std::to_string(gridDimensions_[0]) +
" "
3693 + std::to_string(gridDimensions_[1]) +
" "
3694 + std::to_string(gridDimensions_[2]));
3698 std::array<SimplexId, 3> &p,
3702 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3703 if((p[0] % previous_decimation) and (p[1] % previous_decimation)
3704 and (p[2] % previous_decimation)) {
3705 localNeighborId0 = 1;
3706 localNeighborId1 = 12;
3708 }
else if((p[0] % previous_decimation) and (p[1] % previous_decimation)) {
3709 localNeighborId0 = 5;
3710 localNeighborId1 = 10;
3711 }
else if((p[0] % previous_decimation) and (p[2] % previous_decimation)) {
3712 localNeighborId0 = 3;
3713 localNeighborId1 = 7;
3715 }
else if((p[1] % previous_decimation) and (p[2] % previous_decimation)) {
3716 localNeighborId0 = 0;
3717 localNeighborId1 = 13;
3719 }
else if(p[0] % previous_decimation) {
3720 localNeighborId0 = 6;
3721 localNeighborId1 = 9;
3723 }
else if(p[1] % previous_decimation) {
3724 localNeighborId0 = 4;
3725 localNeighborId1 = 11;
3727 }
else if(p[2] % previous_decimation) {
3728 localNeighborId0 = 2;
3729 localNeighborId1 = 8;
3736 std::array<SimplexId, 3> &p,
3739 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3741 if((p[0] % previous_decimation) and (p[1] % previous_decimation)) {
3742 localNeighborId0 = 1;
3743 localNeighborId1 = 8;
3745 }
else if(p[0] % previous_decimation) {
3746 localNeighborId0 = 0;
3747 localNeighborId1 = 9;
3749 }
else if(p[1] % previous_decimation) {
3750 localNeighborId0 = 2;
3751 localNeighborId1 = 7;
3758 std::array<SimplexId, 3> &p,
3761 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3763 if((p[0] % previous_decimation) and (p[1] % previous_decimation)) {
3764 localNeighborId0 = 5;
3765 localNeighborId1 = 8;
3767 }
else if(p[0] % previous_decimation) {
3768 localNeighborId0 = 7;
3769 localNeighborId1 = 6;
3771 }
else if(p[1] % previous_decimation) {
3772 localNeighborId0 = 4;
3773 localNeighborId1 = 9;
3780 std::array<SimplexId, 3> &p,
3783 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3785 if((p[1] % previous_decimation) and (p[2] % previous_decimation)) {
3786 localNeighborId0 = 0;
3787 localNeighborId1 = 8;
3789 }
else if(p[1] % previous_decimation) {
3790 localNeighborId0 = 4;
3791 localNeighborId1 = 7;
3793 }
else if(p[2] % previous_decimation) {
3794 localNeighborId0 = 2;
3795 localNeighborId1 = 9;
3801 std::array<SimplexId, 3> &p,
3804 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3806 if((p[1] % previous_decimation) and (p[2] % previous_decimation)) {
3807 localNeighborId0 = 8;
3808 localNeighborId1 = 6;
3810 }
else if(p[1] % previous_decimation) {
3811 localNeighborId0 = 9;
3812 localNeighborId1 = 2;
3814 }
else if(p[2] % previous_decimation) {
3815 localNeighborId0 = 7;
3816 localNeighborId1 = 4;
3822 std::array<SimplexId, 3> &p,
3825 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3827 if((p[0] % previous_decimation) and (p[2] % previous_decimation)) {
3828 localNeighborId0 = 3;
3829 localNeighborId1 = 8;
3831 }
else if(p[0] % previous_decimation) {
3832 localNeighborId0 = 0;
3833 localNeighborId1 = 7;
3835 }
else if(p[2] % previous_decimation) {
3836 localNeighborId0 = 9;
3837 localNeighborId1 = 4;
3843 std::array<SimplexId, 3> &p,
3846 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3848 if((p[0] % previous_decimation) and (p[2] % previous_decimation)) {
3849 localNeighborId0 = 3;
3850 localNeighborId1 = 8;
3852 }
else if(p[0] % previous_decimation) {
3853 localNeighborId0 = 7;
3854 localNeighborId1 = 6;
3856 }
else if(p[2] % previous_decimation) {
3857 localNeighborId0 = 2;
3858 localNeighborId1 = 9;
3864 std::array<SimplexId, 3> &p,
3867 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3869 if(p[0] % previous_decimation) {
3870 localNeighborId0 = 0;
3871 localNeighborId1 = 7;
3877 std::array<SimplexId, 3> &p,
3880 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3882 if(p[0] % previous_decimation) {
3883 localNeighborId0 = 1;
3884 localNeighborId1 = 5;
3890 std::array<SimplexId, 3> &p,
3893 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3895 if(p[0] % previous_decimation) {
3896 localNeighborId0 = 1;
3897 localNeighborId1 = 5;
3903 std::array<SimplexId, 3> &p,
3906 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3908 if(p[0] % previous_decimation) {
3909 localNeighborId0 = 7;
3910 localNeighborId1 = 6;
3916 std::array<SimplexId, 3> &p,
3919 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3921 if(p[1] % previous_decimation) {
3922 localNeighborId0 = 0;
3923 localNeighborId1 = 4;
3929 std::array<SimplexId, 3> &p,
3932 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3934 if(p[1] % previous_decimation) {
3935 localNeighborId0 = 2;
3936 localNeighborId1 = 7;
3942 std::array<SimplexId, 3> &p,
3945 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3947 if(p[1] % previous_decimation) {
3948 localNeighborId0 = 4;
3949 localNeighborId1 = 7;
3955 std::array<SimplexId, 3> &p,
3958 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3960 if(p[1] % previous_decimation) {
3961 localNeighborId0 = 5;
3962 localNeighborId1 = 3;
3968 std::array<SimplexId, 3> &p,
3971 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3973 if(p[2] % previous_decimation) {
3974 localNeighborId0 = 4;
3975 localNeighborId1 = 2;
3982 std::array<SimplexId, 3> &p,
3985 int const previous_decimation = pow(2, (decimationLevel_ + 1));
3987 if(p[2] % previous_decimation) {
3988 localNeighborId0 = 7;
3989 localNeighborId1 = 4;
3996 std::array<SimplexId, 3> &p,
3999 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4001 if(p[2] % previous_decimation) {
4002 localNeighborId0 = 2;
4003 localNeighborId1 = 7;
4010 std::array<SimplexId, 3> &p,
4013 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4015 if(p[2] % previous_decimation) {
4016 localNeighborId0 = 5;
4017 localNeighborId1 = 3;
4024 std::array<SimplexId, 3> &p,
4027 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4029 if((p[0] % previous_decimation) and (p[1] % previous_decimation)) {
4030 localNeighborId0 = 2;
4031 localNeighborId1 = 5;
4033 }
else if(p[0] % previous_decimation) {
4034 localNeighborId0 = 0;
4035 localNeighborId1 = 3;
4037 }
else if(p[1] % previous_decimation) {
4038 localNeighborId0 = 1;
4039 localNeighborId1 = 4;
4046 std::array<SimplexId, 3> &p,
4049 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4051 if(p[0] % previous_decimation) {
4052 localNeighborId0 = 0;
4053 localNeighborId1 = 3;
4060 std::array<SimplexId, 3> &p,
4063 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4065 if(p[0] % previous_decimation) {
4066 localNeighborId0 = 0;
4067 localNeighborId1 = 3;
4074 std::array<SimplexId, 3> &p,
4077 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4079 if(p[1] % previous_decimation) {
4080 localNeighborId0 = 0;
4081 localNeighborId1 = 3;
4087 std::array<SimplexId, 3> &p,
4090 int const previous_decimation = pow(2, (decimationLevel_ + 1));
4092 if(p[1] % previous_decimation) {
4093 localNeighborId0 = 2;
4094 localNeighborId1 = 1;
4100std::vector<SimplexId>
4103 std::vector<SimplexId> result;
4104 if(dimensionality_ == 3) {
4105 std::array<SimplexId, 3> p{};
4111 if((nbvoxels_[0] % decimation_) and (p[0] + decimation_ > nbvoxels_[0])) {
4112 shiftX = nbvoxels_[0] % decimation_;
4114 if((nbvoxels_[1] % decimation_) and (p[1] + decimation_ > nbvoxels_[1])) {
4115 shiftY = nbvoxels_[1] % decimation_;
4117 if((nbvoxels_[2] % decimation_) and (p[2] + decimation_ > nbvoxels_[2])) {
4118 shiftZ = nbvoxels_[2] % decimation_;
4121 std::vector<SimplexId> vi;
4122 vi.push_back(-decimation_);
4124 vi.push_back(shiftX);
4126 std::vector<SimplexId> vj;
4127 vj.push_back(-decimation_);
4129 vj.push_back(shiftY);
4131 std::vector<SimplexId> vk;
4132 vk.push_back(-decimation_);
4134 vk.push_back(shiftZ);
4137 vi.erase(vi.begin() + 0);
4138 if(p[0] == nbvoxels_[0])
4139 vi.erase(vi.begin() + 2);
4141 vj.erase(vj.begin() + 0);
4142 if(p[1] == nbvoxels_[1])
4143 vj.erase(vj.begin() + 2);
4145 vk.erase(vk.begin() + 0);
4146 if(p[2] == nbvoxels_[2])
4147 vk.erase(vk.begin() + 2);
4152 if(i != 0 or j != 0 or k != 0)
4153 result.push_back(vertexId + i + j * vshift_[0] + k * vshift_[1]);
4158 }
else if(dimensionality_ == 2) {
4159 std::array<SimplexId, 3> p{};
4164 if((nbvoxels_[Di_] % decimation_)
4165 and (p[0] + decimation_ > nbvoxels_[Di_])) {
4166 shiftX = nbvoxels_[0] % decimation_;
4168 if((nbvoxels_[Dj_] % decimation_)
4169 and (p[1] + decimation_ > nbvoxels_[Dj_])) {
4170 shiftY = nbvoxels_[1] % decimation_;
4173 std::vector<SimplexId> vi;
4174 vi.push_back(-decimation_);
4176 vi.push_back(shiftX);
4178 std::vector<SimplexId> vj;
4179 vj.push_back(-decimation_);
4181 vj.push_back(shiftY);
4184 vi.erase(vi.begin() + 0);
4185 if(p[0] == nbvoxels_[0])
4186 vi.erase(vi.begin() + 2);
4188 vj.erase(vj.begin() + 0);
4189 if(p[1] == nbvoxels_[1])
4190 vj.erase(vj.begin() + 2);
4194 if(i != 0 or j != 0) {
4195 result.push_back(vertexId + i + j * vshift_[Di_]);
4206 if(dimensionality_ == 3) {
4207 std::array<SimplexId, 3> p{};
4210 if(0 < p[0] and p[0] < nbvoxels_[0]) {
4211 if(0 < p[1] and p[1] < nbvoxels_[1]) {
4212 if(0 < p[2] and p[2] < nbvoxels_[2])
4218 }
else if(p[1] == 0) {
4219 if(0 < p[2] and p[2] < nbvoxels_[2])
4226 if(0 < p[2] and p[2] < nbvoxels_[2])
4233 }
else if(p[0] == 0) {
4234 if(0 < p[1] and p[1] < nbvoxels_[1]) {
4235 if(0 < p[2] and p[2] < nbvoxels_[2])
4241 }
else if(p[1] == 0) {
4242 if(0 < p[2] and p[2] < nbvoxels_[2])
4249 if(0 < p[2] and p[2] < nbvoxels_[2])
4257 if(0 < p[1] and p[1] < nbvoxels_[1]) {
4258 if(0 < p[2] and p[2] < nbvoxels_[2])
4264 }
else if(p[1] == 0) {
4265 if(0 < p[2] and p[2] < nbvoxels_[2])
4272 if(0 < p[2] and p[2] < nbvoxels_[2])
4281 }
else if(dimensionality_ == 2) {
4282 std::array<SimplexId, 3> p{};
4285 if(0 < p[0] and p[0] < nbvoxels_[Di_]) {
4286 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
4288 }
else if(p[1] == 0) {
4293 }
else if(p[0] == 0) {
4294 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
4296 }
else if(p[1] == 0) {
4302 if(0 < p[1] and p[1] < nbvoxels_[Dj_]) {
4304 }
else if(p[1] == 0) {
4315 std::vector<SimplexId> &boundaryRepresentatives) {
4316 int const currentDecimationLevel = decimationLevel_;
4318 if(dimensionality_ == 3) {
4319 boundaryRepresentatives.resize(27, -1);
4321 boundaryRepresentatives[13] = 0;
4322 boundaryRepresentatives[22] = gridDimensions_[0] - 1;
4323 boundaryRepresentatives[16]
4324 = vshift_[0] * (gridDimensions_[1] - 1);
4325 boundaryRepresentatives[14]
4326 = vshift_[1] * (gridDimensions_[2] - 1);
4327 boundaryRepresentatives[25]
4328 = gridDimensions_[0] - 1
4329 + vshift_[0] * (gridDimensions_[1] - 1);
4330 boundaryRepresentatives[23]
4331 = gridDimensions_[0] - 1
4332 + vshift_[1] * (gridDimensions_[2] - 1);
4333 boundaryRepresentatives[17]
4334 = vshift_[0] * (gridDimensions_[1] - 1)
4335 + vshift_[1] * (gridDimensions_[2] - 1);
4336 boundaryRepresentatives[26]
4337 = gridDimensions_[0] - 1 + vshift_[0] * (gridDimensions_[1] - 1)
4338 + vshift_[1] * (gridDimensions_[2] - 1);
4340 if(gridDimensions_[0] > 2) {
4341 boundaryRepresentatives[4] = 1;
4342 boundaryRepresentatives[7]
4343 = 1 + vshift_[0] * (gridDimensions_[1] - 1);
4344 boundaryRepresentatives[5]
4345 = 1 + vshift_[1] * (gridDimensions_[2] - 1);
4346 boundaryRepresentatives[8]
4347 = 1 + vshift_[0] * (gridDimensions_[1] - 1)
4348 + vshift_[1] * (gridDimensions_[2] - 1);
4350 if(gridDimensions_[1] > 2) {
4351 boundaryRepresentatives[10] = vshift_[0];
4352 boundaryRepresentatives[19]
4353 = gridDimensions_[0] - 1 + vshift_[0];
4354 boundaryRepresentatives[11]
4355 = vshift_[0] + vshift_[1] * (gridDimensions_[2] - 1);
4356 boundaryRepresentatives[20]
4357 = gridDimensions_[0] - 1 + vshift_[0]
4358 + vshift_[1] * (gridDimensions_[2] - 1);
4360 if(gridDimensions_[2] > 2) {
4361 boundaryRepresentatives[12] = vshift_[1];
4362 boundaryRepresentatives[15]
4363 = vshift_[0] * (gridDimensions_[1] - 1) + vshift_[1];
4364 boundaryRepresentatives[21]
4365 = (gridDimensions_[0] - 1) + vshift_[1];
4366 boundaryRepresentatives[24] = (gridDimensions_[0] - 1)
4367 + vshift_[0] * (gridDimensions_[1] - 1)
4370 if(gridDimensions_[0] > 2 and gridDimensions_[1] > 2) {
4371 boundaryRepresentatives[1] = 1 + vshift_[0];
4372 boundaryRepresentatives[2]
4373 = 1 + vshift_[0] + vshift_[1] * (gridDimensions_[2] - 1);
4375 if(gridDimensions_[0] > 2 and gridDimensions_[2] > 2) {
4376 boundaryRepresentatives[3] = 1 + vshift_[1];
4377 boundaryRepresentatives[6]
4378 = 1 + vshift_[0] * (gridDimensions_[1] - 1) + vshift_[1];
4380 if(gridDimensions_[1] > 2 and gridDimensions_[2] > 2) {
4381 boundaryRepresentatives[9] = vshift_[0] + vshift_[1];
4382 boundaryRepresentatives[18]
4383 = (gridDimensions_[0] - 1) + vshift_[0] + vshift_[1];
4385 if(gridDimensions_[0] > 2 and gridDimensions_[1] > 2
4386 and gridDimensions_[2] > 2) {
4387 boundaryRepresentatives[0] = 1 + vshift_[0] + vshift_[1];
4389 }
else if(dimensionality_ == 2) {
4390 boundaryRepresentatives.resize(9, -1);
4391 boundaryRepresentatives[4] = 0;
4392 boundaryRepresentatives[5] = vshift_[0] * (gridDimensions_[1] - 1);
4393 boundaryRepresentatives[7] = gridDimensions_[0] - 1;
4394 boundaryRepresentatives[8]
4395 = (gridDimensions_[0] - 1)
4396 + vshift_[0] * (gridDimensions_[1] - 1);
4398 boundaryRepresentatives[1] = 1;
4399 boundaryRepresentatives[2]
4400 = 1 + vshift_[0] * (gridDimensions_[1] - 1);
4401 boundaryRepresentatives[3] = vshift_[0];
4402 boundaryRepresentatives[6] = (gridDimensions_[0] - 1) + vshift_[0];
4404 boundaryRepresentatives[0] = 1 + vshift_[0];
4411 if(dimensionality_ == 3) {
4412 std::array<SimplexId, 3> p{};
4413 vertexToPosition(v, p);
4414 if((nbvoxels_[0] % decimation_) and (p[0] + decimation_ > nbvoxels_[0])) {
4417 if((nbvoxels_[1] % decimation_) and (p[1] + decimation_ > nbvoxels_[1])) {
4420 if((nbvoxels_[2] % decimation_) and (p[2] + decimation_ > nbvoxels_[2])) {
4428 int maxDim = std::max(
4429 gridDimensions_[0], std::max(gridDimensions_[1], gridDimensions_[2]));
4433 = ((maxDim - 1) % 2) ? ((maxDim - 1) / 2 + 2) : ((maxDim - 1) / 2 + 1);
4443 return std::max(coarsestDL_ - rl, 0);
4448 return coarsestDL_ - dl;
int printWrn(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
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
void getInvertedLocalNeighborFH(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVerticesFH(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborG(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesABCDEFGH(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
void vertexToPosition(const SimplexId vertex, std::array< SimplexId, 3 > &p) const
SimplexId getInvertedVertexNeighborABCDEFGH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborAE(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertedLocalNeighbor2dA(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVertices(SimplexId vertexId, SimplexId v0[3], SimplexId v1[3])
void getImpactedVerticesAEGC(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborE(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighbor2dA(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId getInvertVertexNeighborBFHD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborABDC(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborG(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborAB(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedVertexNeighbor2dABCD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborAEGC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborBFHD(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborDH(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborAB(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighborGH(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborABCDEFGH(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighbor2dBD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId getInvertVertexNeighborCG(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighbor2dAB(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId getInvertVertexNeighbor2dB(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
void getInvertedLocalNeighborA(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighbor2dAB(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
void getImpactedVerticesAEFB(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
bool isInTriangulation(const SimplexId vertexId) const
SimplexId getInvertVertexNeighborEF(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedLocalNeighbor2dAB(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborC(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborE(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesGHDC(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
int preconditionVerticesInternal()
Precondition vertices.
int getInteriorInvertedVertexNeighbor(SimplexId, SimplexId, SimplexId &, SimplexId &) const
SimplexId getInvertVertexNeighbor2dAC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId localToGlobalVertexId(const SimplexId localId) const
void getImpactedVerticesEG(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
void getInvertedLocalNeighborEG(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVerticesBD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
void getInvertedLocalNeighborCD(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborCG(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborBF(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesCG(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
~MultiresTriangulation() override
void getImpactedVerticesGH(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesDH(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getVertexNeighborFH(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
int getVertexBoundaryIndex(const SimplexId) const
void getInvertedLocalNeighborEF(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborAC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesEFHG(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborBF(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighbor2dC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
void getImpactedVerticesError(const int prev_decim, const std::array< SimplexId, 3 > &p) const
std::vector< SimplexId > getExtendedStar(const SimplexId &vertexId) const
SimplexId getInvertedLocalNeighbor2dAC(SimplexId id, SimplexId &invertedLocalNeighbor) const
int computeVerticesShifts()
void getImpactedVerticesBFHD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborABCDEFGH(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborAB(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighborEG(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborH(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedLocalNeighbor2dD(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborAEGC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighbor2dB(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborEG(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighbor2dA(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
void getInvertedLocalNeighborGHDC(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborCG(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborH(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborAE(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedLocalNeighbor2dC(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborGHDC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborGH(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborFH(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborAEFB(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborF(SimplexId id, SimplexId &invertedLocalNeighbor) const
void vertexToPosition2d(const SimplexId vertex, std::array< SimplexId, 3 > &p) const
SimplexId getInvertVertexNeighborBD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesAC(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
bool isBoundaryImpacted(SimplexId) const
void getInvertedLocalNeighborB(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborABDC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborBD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighborAE(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void setDecimationLevel(int decimationLevel)
int getVertexNeighbor(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId) const
SimplexId getVertexNeighbor2dAC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborAEFB(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVertices2dCD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighbor2dCD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId getInvertVertexNeighbor2dD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborDH(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborA(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
char localNeighborId(SimplexId neighborId, SimplexId vertexId)
void getInvertedLocalNeighborBF(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertedLocalNeighbor2dBD(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getInvertedLocalNeighborEFHG(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborF(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighborA(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborGHDC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedLocalNeighbor2dB(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVerticesABDC(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getVertexNeighborGH(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertedLocalNeighbor2dCD(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighbor2dCD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborB(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesCD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborAEFB(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighborEF(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighbor2dC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
void getImpactedVertices2dAC(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getVertexNeighborBFHD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborBD(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getVertexNeighborNumber(const SimplexId &vertexId) const
void getInvertedLocalNeighborG(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighborDH(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborD(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVertices2dAB(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborEFHG(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getInvertVertexNeighborCD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
SimplexId getVertexNeighbor2dABCD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getInvertVertexNeighborB(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesAB(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
void getImpactedVertices2dABCD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getVertexNeighborF(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void findBoundaryRepresentatives(std::vector< SimplexId > &boundaryRepresentatives)
SimplexId getVertexNeighborCD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
int getInvertVertexNeighbor(const SimplexId &vertexId, const SimplexId &neighborId, SimplexId &localNeighborId) const
SimplexId getVertexNeighbor2dBD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborABDC(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborE(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVertices2dBD(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborAC(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getImpactedVerticesEF(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getVertexNeighbor2dD(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY) const
SimplexId getVertexNeighborEFHG(const SimplexId v, const int id, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
void getInvertedLocalNeighborAEGC(SimplexId id, SimplexId &invertedLocalNeighbor) const
SimplexId getInvertVertexNeighbor2dABCD(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY) const
void computeCoarsestDecimationLevel()
void getInvertedLocalNeighborAC(SimplexId id, SimplexId &invertedLocalNeighbor) const
void getImpactedVerticesBF(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
void getImpactedVerticesAE(std::array< SimplexId, 3 > &p, SimplexId &localNeighborId0, SimplexId &localNeighborId1) const
SimplexId getInvertVertexNeighborH(const SimplexId v, const SimplexId neighborId, SimplexId shiftX, SimplexId shiftY, SimplexId shiftZ) const
int SimplexId
Identifier type for simplices of any dimension.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)