@@ -74,17 +74,21 @@ def __init__(self, ir, symbols, options):
74
74
ufl .geometry .CellOrientation ,
75
75
ufl .geometry .FacetOrientation }
76
76
77
- def get (self , t , mt , tabledata , quadrature_rule , access ):
77
+ def get (self , mt , tabledata , quadrature_rule , access ):
78
78
# Call appropriate handler, depending on the type of t
79
- ttype = type (t )
79
+
80
+ terminal = mt .terminal
81
+ ttype = type (terminal )
80
82
81
83
if ttype in self .do_nothing_set :
82
84
return [], []
83
- else :
85
+ elif ttype in self . call_lookup :
84
86
handler = self .call_lookup [ttype ]
85
- return handler (t , mt , tabledata , quadrature_rule , access )
87
+ return handler (mt , tabledata , quadrature_rule , access )
88
+ else :
89
+ raise NotImplementedError (f"No handler for terminal type: { ttype } " )
86
90
87
- def coefficient (self , t , mt , tabledata , quadrature_rule , access ):
91
+ def coefficient (self , mt , tabledata , quadrature_rule , access ):
88
92
"""Return definition code for coefficients."""
89
93
# For applying tensor product to coefficients, we need to know if the coefficient
90
94
# has a tensor factorisation and if the quadrature rule has a tensor factorisation.
@@ -142,7 +146,7 @@ def coefficient(self, t, mt, tabledata, quadrature_rule, access):
142
146
143
147
return pre_code , code
144
148
145
- def _define_coordinate_dofs_lincomb (self , e , mt , tabledata , quadrature_rule , access ):
149
+ def _define_coordinate_dofs_lincomb (self , mt , tabledata , quadrature_rule , access ):
146
150
"""Define x or J as a linear combination of coordinate dofs with given table data."""
147
151
# Get properties of domain
148
152
domain = ufl .domain .extract_unique_domain (mt .terminal )
@@ -182,7 +186,7 @@ def _define_coordinate_dofs_lincomb(self, e, mt, tabledata, quadrature_rule, acc
182
186
183
187
return [], code
184
188
185
- def spatial_coordinate (self , e , mt , tabledata , quadrature_rule , access ):
189
+ def spatial_coordinate (self , mt , tabledata , quadrature_rule , access ):
186
190
"""Return definition code for the physical spatial coordinates.
187
191
188
192
If physical coordinates are given:
@@ -200,8 +204,8 @@ def spatial_coordinate(self, e, mt, tabledata, quadrature_rule, access):
200
204
logging .exception ("FIXME: Jacobian in custom integrals is not implemented." )
201
205
return []
202
206
else :
203
- return self ._define_coordinate_dofs_lincomb (e , mt , tabledata , quadrature_rule , access )
207
+ return self ._define_coordinate_dofs_lincomb (mt , tabledata , quadrature_rule , access )
204
208
205
- def jacobian (self , e , mt , tabledata , quadrature_rule , access ):
209
+ def jacobian (self , mt , tabledata , quadrature_rule , access ):
206
210
"""Return definition code for the Jacobian of x(X)."""
207
- return self ._define_coordinate_dofs_lincomb (e , mt , tabledata , quadrature_rule , access )
211
+ return self ._define_coordinate_dofs_lincomb (mt , tabledata , quadrature_rule , access )
0 commit comments