17
17
18
18
19
19
# Expression kernel description type
20
- ExpressionKernel = namedtuple ('ExpressionKernel' , ['ast' , 'oriented' , 'needs_cell_sizes' , 'coefficients' , 'tabulations' ])
20
+ ExpressionKernel = namedtuple ('ExpressionKernel' , ['ast' , 'oriented' , 'needs_cell_sizes' , 'coefficients' , 'first_coefficient_fake_coords' , ' tabulations' ])
21
21
22
22
23
23
def make_builder (* args , ** kwargs ):
@@ -153,12 +153,14 @@ def register_requirements(self, ir):
153
153
provided by the kernel interface."""
154
154
self .oriented , self .cell_sizes , self .tabulations = check_requirements (ir )
155
155
156
- def construct_kernel (self , return_arg , impero_c , index_names ):
156
+ def construct_kernel (self , return_arg , impero_c , index_names , first_coefficient_fake_coords ):
157
157
"""Constructs an :class:`ExpressionKernel`.
158
158
159
159
:arg return_arg: loopy.GlobalArg for the return value
160
160
:arg impero_c: gem.ImperoC object that represents the kernel
161
161
:arg index_names: pre-assigned index names
162
+ :arg first_coefficient_fake_coords: If true, the kernel's first
163
+ coefficient is a constructed UFL coordinate field
162
164
:returns: :class:`ExpressionKernel` object
163
165
"""
164
166
args = [return_arg ]
@@ -173,7 +175,8 @@ def construct_kernel(self, return_arg, impero_c, index_names):
173
175
loopy_kernel = generate_loopy (impero_c , args , self .scalar_type ,
174
176
"expression_kernel" , index_names )
175
177
return ExpressionKernel (loopy_kernel , self .oriented , self .cell_sizes ,
176
- self .coefficients , self .tabulations )
178
+ self .coefficients , first_coefficient_fake_coords ,
179
+ self .tabulations )
177
180
178
181
179
182
class KernelBuilder (KernelBuilderBase ):
0 commit comments