@@ -76,19 +76,19 @@ def reference_facet_volume(tablename, cellname):
76
76
"""Write a reference facet volume."""
77
77
celltype = getattr (basix .CellType , cellname )
78
78
volumes = basix .cell .facet_reference_volumes (celltype )
79
- for i in volumes [1 :]:
80
- if not np .isclose (i , volumes [0 ]):
79
+ for i in volumes [1 :]: # type: ignore
80
+ if not np .isclose (i , volumes [0 ]): # type: ignore
81
81
raise ValueError ("Reference facet volume not supported for this cell type." )
82
82
symbol = L .Symbol (f"{ cellname } _{ tablename } " , dtype = L .DataType .REAL )
83
- return L .VariableDecl (symbol , volumes [0 ])
83
+ return L .VariableDecl (symbol , volumes [0 ]) # type: ignore
84
84
85
85
86
86
def reference_cell_edge_vectors (tablename , cellname ):
87
87
"""Write reference edge vectors."""
88
88
celltype = getattr (basix .CellType , cellname )
89
89
topology = basix .topology (celltype )
90
90
geometry = basix .geometry (celltype )
91
- edge_vectors = [geometry [j ] - geometry [i ] for i , j in topology [1 ]]
91
+ edge_vectors = [geometry [j ] - geometry [i ] for i , j in topology [1 ]] # type: ignore
92
92
out = np .array (edge_vectors )
93
93
symbol = L .Symbol (f"{ cellname } _{ tablename } " , dtype = L .DataType .REAL )
94
94
return L .ArrayDecl (symbol , values = out , const = True )
@@ -108,10 +108,11 @@ def reference_facet_edge_vectors(tablename, cellname):
108
108
edge_vectors = []
109
109
for facet in topology [- 2 ]:
110
110
if len (facet ) == 3 :
111
- edge_vectors += [geometry [facet [j ]] - geometry [facet [i ]] for i , j in triangle_edges ]
111
+ edge_vectors += [geometry [facet [j ]] - geometry [facet [i ]] for i , j in triangle_edges ] # type: ignore
112
112
elif len (facet ) == 4 :
113
113
edge_vectors += [
114
- geometry [facet [j ]] - geometry [facet [i ]] for i , j in quadrilateral_edges
114
+ geometry [facet [j ]] - geometry [facet [i ]]
115
+ for i , j in quadrilateral_edges # type: ignore
115
116
]
116
117
else :
117
118
raise ValueError ("Only triangular and quadrilateral faces supported." )
0 commit comments