74 using MeshType = TMesh;
75 using CellType =
typename MeshType::CellType;
79 if (mesh->GetNumberOfPoints())
82 mesh->ClearFreePointAndCellIndexesLists();
86 constexpr int expectedNumPts = 25;
87 constexpr int expectedNumCells = 16;
88 const int simpleSquareCells[64] = { 0, 1, 6, 5, 1, 2, 7, 6, 2, 3, 8, 7, 3, 4, 9, 8,
89 5, 6, 11, 10, 6, 7, 12, 11, 7, 8, 13, 12, 8, 9, 14, 13,
90 10, 11, 16, 15, 11, 12, 17, 16, 12, 13, 18, 17, 13, 14, 19, 18,
91 15, 16, 21, 20, 16, 17, 22, 21, 17, 18, 23, 22, 18, 19, 24, 23 };
93 using PointType =
typename MeshType::PointType;
97 for (
int i = 0; i < expectedNumPts; ++i)
99 mesh->SetPoint(i, pts[i]);
102 typename CellType::CellAutoPointer cellpointer;
103 for (
int i = 0; i < expectedNumCells; ++i)
105 auto * poly =
new QEPolygonCellType(4);
106 cellpointer.TakeOwnership(poly);
107 cellpointer->SetPointId(0, simpleSquareCells[4 * i]);
108 cellpointer->SetPointId(1, simpleSquareCells[4 * i + 1]);
109 cellpointer->SetPointId(2, simpleSquareCells[4 * i + 2]);
110 cellpointer->SetPointId(3, simpleSquareCells[4 * i + 3]);
111 mesh->SetCell(i, cellpointer);
120 using MeshType = TMesh;
121 using CellType =
typename MeshType::CellType;
125 if (mesh->GetNumberOfPoints())
128 mesh->ClearFreePointAndCellIndexesLists();
132 constexpr int expectedNumPts = 25;
133 constexpr int expectedNumCells = 32;
134 const int simpleSquareCells[96] = { 0, 1, 6, 0, 6, 5, 1, 2, 7, 1, 7, 6, 2, 3, 8, 2, 8, 7, 3, 4,
135 9, 3, 9, 8, 5, 6, 11, 5, 11, 10, 6, 7, 12, 6, 12, 11, 7, 8, 13, 7,
136 13, 12, 8, 9, 14, 8, 14, 13, 10, 11, 16, 10, 16, 15, 11, 12, 17, 11, 17, 16,
137 12, 13, 18, 12, 18, 17, 13, 14, 19, 13, 19, 18, 15, 16, 21, 15, 21, 20, 16, 17,
138 22, 16, 22, 21, 17, 18, 23, 17, 23, 22, 18, 19, 24, 18, 24, 23 };
140 using PointType =
typename TMesh::PointType;
143 for (
int i = 0; i < expectedNumPts; ++i)
145 mesh->SetPoint(i, pts[i]);
148 typename CellType::CellAutoPointer cellpointer;
149 for (
int i = 0; i < expectedNumCells; ++i)
151 auto * poly =
new QEPolygonCellType(3);
152 cellpointer.TakeOwnership(poly);
153 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
154 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
155 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
156 mesh->SetCell(i, cellpointer);
165 using MeshType = TMesh;
166 using CellType =
typename MeshType::CellType;
170 if (mesh->GetNumberOfPoints())
173 mesh->ClearFreePointAndCellIndexesLists();
177 constexpr int expectedNumPts = 4;
178 constexpr int expectedNumCells = 4;
179 const int simpleSquareCells[12] = { 0, 1, 2, 1, 0, 3, 1, 3, 2, 2, 3, 0 };
181 using PointType =
typename TMesh::PointType;
182 std::array<PointType, 4> pts{};
198 for (
int i = 0; i < expectedNumPts; ++i)
200 mesh->SetPoint(i, pts[i]);
203 typename CellType::CellAutoPointer cellpointer;
205 for (
int i = 0; i < expectedNumCells; ++i)
207 auto * poly =
new QEPolygonCellType(3);
208 cellpointer.TakeOwnership(poly);
209 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
210 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
211 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
212 mesh->SetCell(i, cellpointer);
222 using MeshType = TMesh;
223 using CellType =
typename MeshType::CellType;
227 if (mesh->GetNumberOfPoints())
230 mesh->ClearFreePointAndCellIndexesLists();
234 constexpr int expectedNumPts = 3;
235 constexpr int expectedNumCells = 2;
236 const int simpleSquareCells[6] = { 0, 1, 2, 1, 0, 2 };
238 using PointType =
typename TMesh::PointType;
239 std::array<PointType, 3> pts{};
252 for (
int i = 0; i < expectedNumPts; ++i)
254 mesh->SetPoint(i, pts[i]);
257 typename CellType::CellAutoPointer cellpointer;
258 for (
int i = 0; i < expectedNumCells; ++i)
260 auto * poly =
new QEPolygonCellType(3);
261 cellpointer.TakeOwnership(poly);
262 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
263 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
264 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
265 mesh->SetCell(i, cellpointer);