Replace tables from ufc_geometry.h by functions based on FIAT

Issue #169 new
Jan Blechta created an issue

No description provided.

Comments (3)

  1. Jan Blechta reporter

    For the record, this snippet

    from FIAT.reference_element import ufc_cell
    import pprint
    
    T1 = ufc_cell("interval")
    T2 = ufc_cell("triangle")
    T3 = ufc_cell("tetrahedron")
    Q2 = ufc_cell("quadrilateral")
    Q3 = ufc_cell("hexahedron")
    
    def compute_facet_edge_vertices(cell):
        return [[cell.get_topology()[1][e] for e in f] for f in cell.get_connectivity()[(2,1)]]
    
    tetrahedron_facet_edge_vertices = compute_facet_edge_vertices(T3)
    hexahedron_facet_edge_vertices = compute_facet_edge_vertices(Q3)
    
    print("tetrahedron_facet_edge_vertices = ")
    pprint.pprint(tetrahedron_facet_edge_vertices)
    
    print("hexahedron_facet_edge_vertices = ")
    pprint.pprint(hexahedron_facet_edge_vertices)
    

    generates

    tetrahedron_facet_edge_vertices = 
    [[(2, 3), (1, 3), (1, 2)],
     [(2, 3), (0, 3), (0, 2)],
     [(1, 3), (0, 3), (0, 1)],
     [(1, 2), (0, 2), (0, 1)]]
    hexahedron_facet_edge_vertices = 
    [[(0, 1), (2, 3), (0, 2), (1, 3)],
     [(4, 5), (6, 7), (4, 6), (5, 7)],
     [(0, 1), (4, 5), (0, 4), (1, 5)],
     [(2, 3), (6, 7), (2, 6), (3, 7)],
     [(0, 2), (4, 6), (0, 4), (2, 6)],
     [(1, 3), (5, 7), (1, 5), (3, 7)]]
    

    which exactly matches ufc_geometry.h.

    All other connectivities should be easier.

  2. Log in to comment