73 using MeshType = TMesh;
74 using CellType =
typename MeshType::CellType;
78 if (mesh->GetNumberOfPoints())
81 mesh->ClearFreePointAndCellIndexesLists();
85 constexpr int expectedNumPts = 25;
86 constexpr int expectedNumCells = 16;
87 const int simpleSquareCells[64] = { 0, 1, 6, 5, 1, 2, 7, 6, 2, 3, 8, 7, 3, 4, 9, 8,
88 5, 6, 11, 10, 6, 7, 12, 11, 7, 8, 13, 12, 8, 9, 14, 13,
89 10, 11, 16, 15, 11, 12, 17, 16, 12, 13, 18, 17, 13, 14, 19, 18,
90 15, 16, 21, 20, 16, 17, 22, 21, 17, 18, 23, 22, 18, 19, 24, 23 };
92 using PointType =
typename MeshType::PointType;
96 for (
int i = 0; i < expectedNumPts; ++i)
98 mesh->SetPoint(i, pts[i]);
101 typename CellType::CellAutoPointer cellpointer;
102 for (
int i = 0; i < expectedNumCells; ++i)
104 QEPolygonCellType * poly =
new QEPolygonCellType(4);
105 cellpointer.TakeOwnership(poly);
106 cellpointer->SetPointId(0, simpleSquareCells[4 * i]);
107 cellpointer->SetPointId(1, simpleSquareCells[4 * i + 1]);
108 cellpointer->SetPointId(2, simpleSquareCells[4 * i + 2]);
109 cellpointer->SetPointId(3, simpleSquareCells[4 * i + 3]);
110 mesh->SetCell(i, cellpointer);
119 using MeshType = TMesh;
120 using CellType =
typename MeshType::CellType;
124 if (mesh->GetNumberOfPoints())
127 mesh->ClearFreePointAndCellIndexesLists();
131 constexpr int expectedNumPts = 25;
132 constexpr int expectedNumCells = 32;
133 const int simpleSquareCells[96] = { 0, 1, 6, 0, 6, 5, 1, 2, 7, 1, 7, 6, 2, 3, 8, 2, 8, 7, 3, 4,
134 9, 3, 9, 8, 5, 6, 11, 5, 11, 10, 6, 7, 12, 6, 12, 11, 7, 8, 13, 7,
135 13, 12, 8, 9, 14, 8, 14, 13, 10, 11, 16, 10, 16, 15, 11, 12, 17, 11, 17, 16,
136 12, 13, 18, 12, 18, 17, 13, 14, 19, 13, 19, 18, 15, 16, 21, 15, 21, 20, 16, 17,
137 22, 16, 22, 21, 17, 18, 23, 17, 23, 22, 18, 19, 24, 18, 24, 23 };
139 using PointType =
typename TMesh::PointType;
142 for (
int i = 0; i < expectedNumPts; ++i)
144 mesh->SetPoint(i, pts[i]);
147 typename CellType::CellAutoPointer cellpointer;
148 for (
int i = 0; i < expectedNumCells; ++i)
150 QEPolygonCellType * poly =
new QEPolygonCellType(3);
151 cellpointer.TakeOwnership(poly);
152 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
153 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
154 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
155 mesh->SetCell(i, cellpointer);
164 using MeshType = TMesh;
165 using CellType =
typename MeshType::CellType;
169 if (mesh->GetNumberOfPoints())
172 mesh->ClearFreePointAndCellIndexesLists();
176 constexpr int expectedNumPts = 4;
177 constexpr int expectedNumCells = 4;
178 const int simpleSquareCells[12] = { 0, 1, 2, 1, 0, 3, 1, 3, 2, 2, 3, 0 };
180 using PointType =
typename TMesh::PointType;
181 std::vector<PointType> pts(4);
197 for (
int i = 0; i < expectedNumPts; ++i)
199 mesh->SetPoint(i, pts[i]);
202 typename CellType::CellAutoPointer cellpointer;
204 for (
int i = 0; i < expectedNumCells; ++i)
206 QEPolygonCellType * poly =
new QEPolygonCellType(3);
207 cellpointer.TakeOwnership(poly);
208 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
209 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
210 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
211 mesh->SetCell(i, cellpointer);
221 using MeshType = TMesh;
222 using CellType =
typename MeshType::CellType;
226 if (mesh->GetNumberOfPoints())
229 mesh->ClearFreePointAndCellIndexesLists();
233 constexpr int expectedNumPts = 3;
234 constexpr int expectedNumCells = 2;
235 const int simpleSquareCells[6] = { 0, 1, 2, 1, 0, 2 };
237 using PointType =
typename TMesh::PointType;
238 std::vector<PointType> pts(3);
251 for (
int i = 0; i < expectedNumPts; ++i)
253 mesh->SetPoint(i, pts[i]);
256 typename CellType::CellAutoPointer cellpointer;
257 for (
int i = 0; i < expectedNumCells; ++i)
259 QEPolygonCellType * poly =
new QEPolygonCellType(3);
260 cellpointer.TakeOwnership(poly);
261 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
262 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
263 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
264 mesh->SetCell(i, cellpointer);