6
6
"""FFCx/UFC specific variable definitions."""
7
7
8
8
import logging
9
- from typing import List , Union
9
+ from typing import Union
10
10
11
11
import ufl
12
12
@@ -86,7 +86,7 @@ def get(
86
86
tabledata : UniqueTableReferenceT ,
87
87
quadrature_rule : QuadratureRule ,
88
88
access : L .Symbol ,
89
- ) -> Union [L .Section , List ]:
89
+ ) -> Union [L .Section , list ]:
90
90
"""Return definition code for a terminal."""
91
91
# Call appropriate handler, depending on the type of terminal
92
92
terminal = mt .terminal
@@ -111,7 +111,7 @@ def coefficient(
111
111
tabledata : UniqueTableReferenceT ,
112
112
quadrature_rule : QuadratureRule ,
113
113
access : L .Symbol ,
114
- ) -> Union [L .Section , List ]:
114
+ ) -> Union [L .Section , list ]:
115
115
"""Return definition code for coefficients."""
116
116
# For applying tensor product to coefficients, we need to know if the coefficient
117
117
# has a tensor factorisation and if the quadrature rule has a tensor factorisation.
@@ -146,7 +146,7 @@ def coefficient(
146
146
mt .terminal , (ic .global_index ) * bs + begin
147
147
)
148
148
149
- declaration : List [L .Declaration ] = [L .VariableDecl (access , 0.0 )]
149
+ declaration : list [L .Declaration ] = [L .VariableDecl (access , 0.0 )]
150
150
body = [L .AssignAdd (access , dof_access * FE )]
151
151
code = [L .create_nested_for_loops ([ic ], body )]
152
152
@@ -167,7 +167,7 @@ def _define_coordinate_dofs_lincomb(
167
167
tabledata : UniqueTableReferenceT ,
168
168
quadrature_rule : QuadratureRule ,
169
169
access : L .Symbol ,
170
- ) -> Union [L .Section , List ]:
170
+ ) -> Union [L .Section , list ]:
171
171
"""Define x or J as a linear combination of coordinate dofs with given table data."""
172
172
# Get properties of domain
173
173
domain = ufl .domain .extract_unique_domain (mt .terminal )
@@ -222,7 +222,7 @@ def spatial_coordinate(
222
222
tabledata : UniqueTableReferenceT ,
223
223
quadrature_rule : QuadratureRule ,
224
224
access : L .Symbol ,
225
- ) -> Union [L .Section , List ]:
225
+ ) -> Union [L .Section , list ]:
226
226
"""Return definition code for the physical spatial coordinates.
227
227
228
228
If physical coordinates are given:
@@ -248,7 +248,7 @@ def jacobian(
248
248
tabledata : UniqueTableReferenceT ,
249
249
quadrature_rule : QuadratureRule ,
250
250
access : L .Symbol ,
251
- ) -> Union [L .Section , List ]:
251
+ ) -> Union [L .Section , list ]:
252
252
"""Return definition code for the Jacobian of x(X)."""
253
253
return self ._define_coordinate_dofs_lincomb (mt , tabledata , quadrature_rule , access )
254
254
@@ -258,6 +258,6 @@ def pass_through(
258
258
tabledata : UniqueTableReferenceT ,
259
259
quadrature_rule : QuadratureRule ,
260
260
access : L .Symbol ,
261
- ) -> Union [L .Section , List ]:
261
+ ) -> Union [L .Section , list ]:
262
262
"""Return definition code for pass through terminals."""
263
263
return []
0 commit comments