6#include <kernel/geometry/test_aux/standard_quad.hpp>
7#include <kernel/geometry/test_aux/copy_comp_set.hpp>
15 QuadMesh* create_quad_mesh_2d(
int orientation)
17 Index num_entities[] =
25 QuadMesh* mesh =
new QuadMesh(num_entities);
43 static const Real vtx0[4*2] =
52 static const Index v_e0[4*2] =
61 static const Index v_q0[1*4] =
67 static const Index e_q0[1*4] =
88 static const Real vtx1[4*2] =
97 static const Index v_e1[4*2] =
106 static const Index v_q1[1*4] =
112 static const Index e_q1[1*4] =
133 static const Real vtx2[4*2] =
142 static const Index v_e2[4*2] =
151 static const Index v_q2[1*4] =
157 static const Index e_q2[1*4] =
178 static const Real vtx3[4*2] =
187 static const Index v_e3[4*2] =
196 static const Index v_q3[1*4] =
202 static const Index e_q3[1*4] =
210 copy_vtx(mesh->get_vertex_set(), vtx0);
211 copy_idx(mesh->get_index_set<1,0>(), v_e0);
212 copy_idx(mesh->get_index_set<2,0>(), v_q0);
213 copy_idx(mesh->get_index_set<2,1>(), e_q0);
216 copy_vtx(mesh->get_vertex_set(), vtx1);
217 copy_idx(mesh->get_index_set<1,0>(), v_e1);
218 copy_idx(mesh->get_index_set<2,0>(), v_q1);
219 copy_idx(mesh->get_index_set<2,1>(), e_q1);
222 copy_vtx(mesh->get_vertex_set(), vtx2);
223 copy_idx(mesh->get_index_set<1,0>(), v_e2);
224 copy_idx(mesh->get_index_set<2,0>(), v_q2);
225 copy_idx(mesh->get_index_set<2,1>(), e_q2);
228 copy_vtx(mesh->get_vertex_set(), vtx3);
229 copy_idx(mesh->get_index_set<1,0>(), v_e3);
230 copy_idx(mesh->get_index_set<2,0>(), v_q3);
231 copy_idx(mesh->get_index_set<2,1>(), e_q3);
240 void validate_refined_quad_mesh_2d(
const QuadMesh& mesh,
int orientation)
243 if(mesh.get_num_entities(0) != 9)
244 throw String(
"Vertex count mismatch");
245 if(mesh.get_num_entities(1) != 12)
246 throw String(
"Edge count mismatch");
247 if(mesh.get_num_entities(2) != 4)
248 throw String(
"Quad count mismatch");
253 static const Real vtx0[] =
267 static const Index v_e0[] =
284 static const Index v_q0[] =
293 static const Index e_q0[] =
304 static const Real vtx1[] =
318 static const Index v_e1[] =
335 static const Index v_q1[] =
344 static const Index e_q1[] =
355 static const Real vtx2[] =
369 static const Index v_e2[] =
386 static const Index v_q2[] =
395 static const Index e_q2[] =
406 static const Real vtx3[] =
420 static const Index v_e3[] =
437 static const Index v_q3[] =
446 static const Index e_q3[] =
459 if(!comp_vtx(mesh.get_vertex_set(), vtx0))
460 throw String(
"Vertex coordinate refinement failure");
463 if(!comp_idx(mesh.get_index_set<1,0>(), v_e0))
464 throw String(
"Vertex-At-Edge index set refinement failure");
467 if(!comp_idx(mesh.get_index_set<2,0>(), v_q0))
468 throw String(
"Vertex-At-Quad index set refinement failure");
471 if(!comp_idx(mesh.get_index_set<2,1>(), e_q0))
472 throw String(
"Edge-At-Quad index set refinement failure");
477 if(!comp_vtx(mesh.get_vertex_set(), vtx1))
478 throw String(
"Vertex coordinate refinement failure");
481 if(!comp_idx(mesh.get_index_set<1,0>(), v_e1))
482 throw String(
"Vertex-At-Edge index set refinement failure");
485 if(!comp_idx(mesh.get_index_set<2,0>(), v_q1))
486 throw String(
"Vertex-At-Quad index set refinement failure");
489 if(!comp_idx(mesh.get_index_set<2,1>(), e_q1))
490 throw String(
"Edge-At-Quad index set refinement failure");
495 if(!comp_vtx(mesh.get_vertex_set(), vtx2))
496 throw String(
"Vertex coordinate refinement failure");
499 if(!comp_idx(mesh.get_index_set<1,0>(), v_e2))
500 throw String(
"Vertex-At-Edge index set refinement failure");
503 if(!comp_idx(mesh.get_index_set<2,0>(), v_q2))
504 throw String(
"Vertex-At-Quad index set refinement failure");
507 if(!comp_idx(mesh.get_index_set<2,1>(), e_q2))
508 throw String(
"Edge-At-Quad index set refinement failure");
513 if(!comp_vtx(mesh.get_vertex_set(), vtx3))
514 throw String(
"Vertex coordinate refinement failure");
517 if(!comp_idx(mesh.get_index_set<1,0>(), v_e3))
518 throw String(
"Vertex-At-Edge index set refinement failure");
521 if(!comp_idx(mesh.get_index_set<2,0>(), v_q3))
522 throw String(
"Vertex-At-Quad index set refinement failure");
525 if(!comp_idx(mesh.get_index_set<2,1>(), e_q3))
526 throw String(
"Edge-At-Quad index set refinement failure");
#define XABORTM(msg)
Abortion macro definition with custom message.
double Real
Real data type.
String stringify(const T_ &item)
Converts an item into a String.
std::uint64_t Index
Index data type.