22 return this->vertexPositions_[v];
24 inline std::array<SimplexId, 3>
const &
26 return this->vertexCoords_[v];
29 return this->edgePositions_[e];
31 inline std::array<SimplexId, 3>
const &
33 return this->edgeCoords_[e];
36 return this->trianglePositions_[t];
38 inline std::array<SimplexId, 3>
const &
40 return this->triangleCoords_[t];
42 inline const std::array<SimplexId, 3> &
44 return this->tetrahedronCoords_[t];
48 vertexPositions_ = std::vector<VertexPosition>{};
49 vertexCoords_ = std::vector<std::array<SimplexId, 3>>{};
50 edgePositions_ = std::vector<EdgePosition>{};
51 edgeCoords_ = std::vector<std::array<SimplexId, 3>>{};
52 trianglePositions_ = std::vector<TrianglePosition>{};
53 triangleCoords_ = std::vector<std::array<SimplexId, 3>>{};
54 tetrahedronCoords_ = std::vector<std::array<SimplexId, 3>>{};
61 std::vector<VertexPosition> vertexPositions_{};
63 std::vector<std::array<SimplexId, 3>> vertexCoords_{};
65 std::vector<EdgePosition> edgePositions_{};
67 std::vector<std::array<SimplexId, 3>> edgeCoords_{};
69 std::vector<TrianglePosition> trianglePositions_{};
71 std::vector<std::array<SimplexId, 3>> triangleCoords_{};
73 std::vector<std::array<SimplexId, 3>> tetrahedronCoords_{};
116 }
else if(p[0] == 0) {
134 if(0 < p[0] and p[0] < this->
nbvoxels_[0]) {
135 if(0 < p[1] and p[1] < this->
nbvoxels_[1]) {
136 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
142 }
else if(p[1] == 0) {
143 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
150 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
157 }
else if(p[0] == 0) {
158 if(0 < p[1] and p[1] < this->
nbvoxels_[1]) {
159 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
165 }
else if(p[1] == 0) {
166 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
173 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
181 if(0 < p[1] and p[1] < this->
nbvoxels_[1]) {
182 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
188 }
else if(p[1] == 0) {
189 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
196 if(0 < p[2] and p[2] < this->
nbvoxels_[2])
209 std::array<SimplexId, 3> p{};
219 std::array<SimplexId, 3> p{};
223 this->edgeToPosition(e, 0, p.data());
224 if(p[1] > 0 and p[1] < this->
nbvoxels_[1]) {
225 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
231 }
else if(p[1] == 0) {
232 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
239 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
247 this->edgeToPosition(e, 1, p.data());
248 if(p[0] > 0 and p[0] < this->
nbvoxels_[0]) {
249 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
255 }
else if(p[0] == 0) {
256 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
263 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
271 this->edgeToPosition(e, 2, p.data());
272 if(p[0] > 0 and p[0] < this->
nbvoxels_[0]) {
273 if(p[1] > 0 and p[1] < this->
nbvoxels_[1])
279 }
else if(p[0] == 0) {
280 if(p[1] > 0 and p[1] < this->
nbvoxels_[1])
287 if(p[1] > 0 and p[1] < this->
nbvoxels_[1])
295 this->edgeToPosition(e, 3, p.data());
296 if(p[2] > 0 and p[2] < this->
nbvoxels_[2])
303 this->edgeToPosition(e, 4, p.data());
304 if(p[0] > 0 and p[0] < this->
nbvoxels_[0])
311 this->edgeToPosition(e, 5, p.data());
312 if(p[1] > 0 and p[1] < this->
nbvoxels_[1])
324 this->edgeToPosition2d(e, 0, p.data());
332 this->edgeToPosition2d(e, 1, p.data());
356 std::array<SimplexId, 3> p{};
359 this->edgeToPosition(e, 0, p.data());
361 this->edgeToPosition(e, 1, p.data());
363 this->edgeToPosition(e, 2, p.data());
365 this->edgeToPosition(e, 3, p.data());
367 this->edgeToPosition(e, 4, p.data());
369 this->edgeToPosition(e, 5, p.data());
371 this->edgeToPosition(e, 6, p.data());
376 this->edgeToPosition2d(e, 0, p.data());
378 this->edgeToPosition2d(e, 1, p.data());
380 this->edgeToPosition2d(e, 2, p.data());
412 std::array<SimplexId, 3> p{};
433 inline std::array<SimplexId, 3>
435 std::array<SimplexId, 3> p{};
void setDebugMsgPrefix(const std::string &prefix)
Implicit Triangulation class without preconditioning.
VertexPosition getVertexPosition(const SimplexId v) const
int preconditionEdgesInternal() override
std::array< SimplexId, 3 > getEdgeCoords(const SimplexId e) const
std::array< SimplexId, 3 > getTriangleCoords(const SimplexId t) const
std::array< SimplexId, 3 > getVertexCoords(const SimplexId v) const
int preconditionTrianglesInternal() override
TrianglePosition getTrianglePosition(const SimplexId t) const
std::array< SimplexId, 3 > getTetrahedronCoords(const SimplexId t) const
ImplicitNoPreconditions()
EdgePosition getEdgePosition(const SimplexId e) const
int preconditionTetrahedronsInternal() override
int preconditionVerticesInternal() override
bool hasPreconditionedVerticesAndCells_
@ BOTTOM_RIGHT_BACK_CORNER_3D
@ BOTTOM_LEFT_FRONT_CORNER_3D
@ BOTTOM_LEFT_BACK_CORNER_3D
@ TOP_LEFT_FRONT_CORNER_3D
@ BOTTOM_RIGHT_FRONT_CORNER_3D
@ TOP_RIGHT_BACK_CORNER_3D
@ TOP_RIGHT_FRONT_CORNER_3D
@ TOP_LEFT_BACK_CORNER_3D
Implicit Triangulation class with preconditioning.
std::array< SimplexId, 3 > const & getTriangleCoords(const SimplexId t) const
int preconditionEdgesInternal() override
int preconditionTetrahedronsInternal() override
EdgePosition getEdgePosition(const SimplexId e) const
std::array< SimplexId, 3 > const & getVertexCoords(const SimplexId v) const
TrianglePosition getTrianglePosition(const SimplexId t) const
int preconditionTrianglesInternal() override
VertexPosition getVertexPosition(const SimplexId v) const
const std::array< SimplexId, 3 > & getTetrahedronCoords(const SimplexId t) const
ImplicitWithPreconditions()
int preconditionVerticesInternal() override
std::array< SimplexId, 3 > const & getEdgeCoords(const SimplexId e) const
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
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
int SimplexId
Identifier type for simplices of any dimension.