MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / perm_gmsh

Method perm_gmsh

cpp/dolfinx/io/cells.cpp:571–607  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

569}
570//-----------------------------------------------------------------------------
571std::vector<std::uint16_t> io::cells::perm_gmsh(mesh::CellType type,
572 int num_nodes)
573{
574 std::vector<std::uint16_t> map;
575 switch (type)
576 {
577 case mesh::CellType::point:
578 map = {0};
579 break;
580 case mesh::CellType::interval:
581 map.resize(num_nodes);
582 std::iota(map.begin(), map.end(), 0);
583 break;
584 case mesh::CellType::triangle:
585 map = gmsh_triangle(num_nodes);
586 break;
587 case mesh::CellType::tetrahedron:
588 map = gmsh_tetrahedron(num_nodes);
589 break;
590 case mesh::CellType::quadrilateral:
591 map = gmsh_quadrilateral(num_nodes);
592 break;
593 case mesh::CellType::hexahedron:
594 map = gmsh_hexahedron(num_nodes);
595 break;
596 case mesh::CellType::prism:
597 map = gmsh_prism(num_nodes);
598 break;
599 case mesh::CellType::pyramid:
600 map = gmsh_pyramid(num_nodes);
601 break;
602 default:
603 throw std::runtime_error("Unknown cell type.");
604 }
605
606 return cells::transpose(map);
607}
608//-----------------------------------------------------------------------------
609int io::cells::cell_degree(mesh::CellType type, int num_nodes)
610{

Callers 1

cell_perm_arrayFunction · 0.80

Calls 7

gmsh_triangleFunction · 0.85
gmsh_tetrahedronFunction · 0.85
gmsh_quadrilateralFunction · 0.85
gmsh_hexahedronFunction · 0.85
gmsh_prismFunction · 0.85
gmsh_pyramidFunction · 0.85
transposeFunction · 0.85

Tested by

no test coverage detected