std::vector<CellData<dim>> cells;
SubCellData subcelldata;
std::map<unsigned int, types::boundary_id> boundary_ids_1d;
- bool is_hex_mesh = false;
- bool is_tet_mesh = false;
+ bool is_quad_or_hex_mesh = false;
+ bool is_tria_or_tet_mesh = false;
{
unsigned int global_cell = 0;
vertices_per_cell = 2;
else if (cell_type == 2) // tri
{
- vertices_per_cell = 3;
- is_tet_mesh = true;
+ vertices_per_cell = 3;
+ is_tria_or_tet_mesh = true;
}
else if (cell_type == 3) // quad
{
- vertices_per_cell = 4;
- is_hex_mesh = true;
+ vertices_per_cell = 4;
+ is_quad_or_hex_mesh = true;
}
else if (cell_type == 4) // tet
{
- vertices_per_cell = 4;
- is_tet_mesh = true;
+ vertices_per_cell = 4;
+ is_tria_or_tet_mesh = true;
}
else if (cell_type == 5) // hex
{
- vertices_per_cell = 8;
- is_hex_mesh = true;
+ vertices_per_cell = 8;
+ is_quad_or_hex_mesh = true;
}
AssertThrow(nod_num == vertices_per_cell,
// check cell type
if (cell_type == 2) // tri
{
- vertices_per_cell = 3;
- is_tet_mesh = true;
+ vertices_per_cell = 3;
+ is_tria_or_tet_mesh = true;
}
else if (cell_type == 3) // quad
{
- vertices_per_cell = 4;
- is_hex_mesh = true;
+ vertices_per_cell = 4;
+ is_quad_or_hex_mesh = true;
}
subcelldata.boundary_quads.emplace_back();
// GridReordering::reorder_cells(),
// Triangulation::create_triangulation_compatibility()) need to be revisited
// for simplex meshes
- AssertThrow(dim == 1 || (is_tet_mesh ^ is_hex_mesh), ExcNotImplemented());
+ AssertThrow(dim == 1 || (is_tria_or_tet_mesh ^ is_quad_or_hex_mesh),
+ ExcNotImplemented());
- if (dim == 1 || is_hex_mesh)
+ if (dim == 1 || is_quad_or_hex_mesh)
{
// do some clean-up on vertices...
GridTools::delete_unused_vertices(vertices, cells, subcelldata);
template <int dim, int spacedim>
void
-check_file(const std::string &file_name, const unsigned int vertices_per_cell)
+check_file(const std::string &file_name)
{
Triangulation<dim, spacedim> tria;
// TRIANGULAR ELEMENTS
// dim = spacedim = 2
deallog.push("triangluar_elements_dim2_spacedim2: ");
- check_file<2, 2>(std::string(SOURCE_DIR "/grid_in_msh/tri.msh"), 3);
+ check_file<2, 2>(std::string(SOURCE_DIR "/grid_in_msh/tri.msh"));
deallog.pop();
// dim = 2, spacedim = 3
deallog.push("triangluar_elements_dim2_spacedim3: ");
- check_file<2, 3>(std::string(SOURCE_DIR "/grid_in_msh/tri.msh"), 3);
+ check_file<2, 3>(std::string(SOURCE_DIR "/grid_in_msh/tri.msh"));
deallog.pop();
// TETRAHEDRAL ELEMENTS
// dim = spacedim = 3
deallog.push("tetrahedral_elements_dim3_spacedim3: ");
- check_file<3, 3>(std::string(SOURCE_DIR "/grid_in_msh/tet.msh"), 4);
+ check_file<3, 3>(std::string(SOURCE_DIR "/grid_in_msh/tet.msh"));
deallog.pop();
}