Quad and hex mesh generation naming

Issue #898 new
Ivan Yashchuk created an issue

Names UnitQuadMesh and UnitHexMesh do not follow the convention that the name describes the domain, as these names say more about the cell shape than the domain.

It might be better to have it as

UnitSquareMesh.create(m, n, cell = "quadrilateral")
UnitCubeMesh.create(m, n, k, cell = "hexahedron")

with defaults set to triangle or tetrahedron cells.

Comments (8)

  1. Prof Garth Wells
    • removed responsible

    Should we use strings or enums? I like enums because they provide tab-completion with interactive Python.

  2. Jan Blechta

    @garth-wells, do you plan to finish this before release?

    @chris_richardson, this still in my opinion marked correctly as a release blocker.

  3. Chris Richardson

    I've set the branch to test on bamboo. Not sure if it needs more work, or if it can just be merged.

  4. Jan Blechta

    This should be even more abstract:

    UnitCubeMesh(std::vector<std::size_t> sizes,
                 CellType::Family cell_family=CellType::Family::Simplex,
                 std::string diagonal="right")
    
    UnitCubeMesh({{64}})                              # intervals
    UnitCubeMesh({{16, 16}})                          # triangles
    UnitCubeMesh({{16, 16}}, CellType::Family::Cube)  # quads
    UnitCubeMesh({{4, 4, 4}})                         # tetrahedrons
    UnitCubeMesh({{4, 4, 4}}, CellType::Family::Cube) # hexes
    
  5. Log in to comment