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 QEPolygonCellType * poly;
104 for (
int i = 0; i < expectedNumCells; ++i)
106 poly =
new QEPolygonCellType(4);
107 cellpointer.TakeOwnership(poly);
108 cellpointer->SetPointId(0, simpleSquareCells[4 * i]);
109 cellpointer->SetPointId(1, simpleSquareCells[4 * i + 1]);
110 cellpointer->SetPointId(2, simpleSquareCells[4 * i + 2]);
111 cellpointer->SetPointId(3, simpleSquareCells[4 * i + 3]);
112 mesh->SetCell(i, cellpointer);
121 using MeshType = TMesh;
122 using CellType =
typename MeshType::CellType;
126 if (mesh->GetNumberOfPoints())
129 mesh->ClearFreePointAndCellIndexesLists();
133 constexpr int expectedNumPts = 25;
134 constexpr int expectedNumCells = 32;
135 const int simpleSquareCells[96] = { 0, 1, 6, 0, 6, 5, 1, 2, 7, 1, 7, 6, 2, 3, 8, 2, 8, 7, 3, 4,
136 9, 3, 9, 8, 5, 6, 11, 5, 11, 10, 6, 7, 12, 6, 12, 11, 7, 8, 13, 7,
137 13, 12, 8, 9, 14, 8, 14, 13, 10, 11, 16, 10, 16, 15, 11, 12, 17, 11, 17, 16,
138 12, 13, 18, 12, 18, 17, 13, 14, 19, 13, 19, 18, 15, 16, 21, 15, 21, 20, 16, 17,
139 22, 16, 22, 21, 17, 18, 23, 17, 23, 22, 18, 19, 24, 18, 24, 23 };
141 using PointType =
typename TMesh::PointType;
144 for (
int i = 0; i < expectedNumPts; ++i)
146 mesh->SetPoint(i, pts[i]);
149 typename CellType::CellAutoPointer cellpointer;
150 QEPolygonCellType * poly;
152 for (
int i = 0; i < expectedNumCells; ++i)
154 poly =
new QEPolygonCellType(3);
155 cellpointer.TakeOwnership(poly);
156 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
157 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
158 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
159 mesh->SetCell(i, cellpointer);
168 using MeshType = TMesh;
169 using CellType =
typename MeshType::CellType;
173 if (mesh->GetNumberOfPoints())
176 mesh->ClearFreePointAndCellIndexesLists();
180 constexpr int expectedNumPts = 4;
181 constexpr int expectedNumCells = 4;
182 const int simpleSquareCells[12] = { 0, 1, 2, 1, 0, 3, 1, 3, 2, 2, 3, 0 };
184 using PointType =
typename TMesh::PointType;
185 std::vector<PointType> pts(4);
201 for (
int i = 0; i < expectedNumPts; ++i)
203 mesh->SetPoint(i, pts[i]);
206 typename CellType::CellAutoPointer cellpointer;
208 for (
int i = 0; i < expectedNumCells; ++i)
210 QEPolygonCellType * poly =
new QEPolygonCellType(3);
211 cellpointer.TakeOwnership(poly);
212 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
213 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
214 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
215 mesh->SetCell(i, cellpointer);
225 using MeshType = TMesh;
226 using CellType =
typename MeshType::CellType;
230 if (mesh->GetNumberOfPoints())
233 mesh->ClearFreePointAndCellIndexesLists();
237 constexpr int expectedNumPts = 3;
238 constexpr int expectedNumCells = 2;
239 const int simpleSquareCells[6] = { 0, 1, 2, 1, 0, 2 };
241 using PointType =
typename TMesh::PointType;
242 std::vector<PointType> pts(3);
255 for (
int i = 0; i < expectedNumPts; ++i)
257 mesh->SetPoint(i, pts[i]);
260 typename CellType::CellAutoPointer cellpointer;
261 for (
int i = 0; i < expectedNumCells; ++i)
263 QEPolygonCellType * poly =
new QEPolygonCellType(3);
264 cellpointer.TakeOwnership(poly);
265 cellpointer->SetPointId(0, simpleSquareCells[3 * i]);
266 cellpointer->SetPointId(1, simpleSquareCells[3 * i + 1]);
267 cellpointer->SetPointId(2, simpleSquareCells[3 * i + 2]);
268 mesh->SetCell(i, cellpointer);