Skip to content

Commit

Permalink
And more
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgensd committed Jan 14, 2025
1 parent 0e5ff0f commit 0bdcb80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ffcx/codegeneration/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ def facet_edge_vectors(self, mt, tabledata, num_points):

# Get edge vertices
facet = self.symbols.entity("facet", mt.restriction)
facet_ridge = mt.component[0]
edge_ridge = mt.component[0]
facet_edge_vertices = L.Symbol(f"{cellname}_facet_edge_vertices", dtype=L.DataType.INT)
vertex0 = facet_edge_vertices[facet][facet_ridge][0]
vertex1 = facet_edge_vertices[facet][facet_ridge][1]
vertex0 = facet_edge_vertices[facet][edge_ridge][0]
vertex1 = facet_edge_vertices[facet][edge_ridge][1]

# Get dofs and component
component = mt.component[1]
Expand Down
8 changes: 4 additions & 4 deletions ffcx/codegeneration/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ def facet_edge_vertices(tablename, cellname):
if len(topology) != 4:
raise ValueError("Can only get facet ridges for 3D cells.")

ridge_vertices = []
edge_vertices = []
for facet in topology[-2]:
if len(facet) == 3:
ridge_vertices += [[[facet[i] for i in ridge] for ridge in triangle_edges]]
edge_vertices += [[[facet[i] for i in edge] for edge in triangle_edges]]
elif len(facet) == 4:
ridge_vertices += [[[facet[i] for i in ridge] for ridge in quadrilateral_edges]]
edge_vertices += [[[facet[i] for i in edge] for edge in quadrilateral_edges]]
else:
raise ValueError("Only triangular and quadrilateral faces supported.")

out = np.array(ridge_vertices, dtype=int)
out = np.array(edge_vertices, dtype=int)
symbol = L.Symbol(f"{cellname}_{tablename}", dtype=L.DataType.INT)
return L.ArrayDecl(symbol, values=out, const=True)

Expand Down

0 comments on commit 0bdcb80

Please sign in to comment.