This is a checklist of features that DoF kernel code generation needs.
Loop
Question - _should dof kerns have a different loop upper_bound_name? This would distinguish them from builtin loops (maybe not wanted) but would allow for less conditional branching in the setting of upperbound.
[x] Loop type "dof" should use 'df' name and 'dof_loop_idx' tag - LFRicKernCallFactory & LFRicLoop
[x] Loop stop is currently f1_proxy%vspace%get_ncell() but should be the undf_name belonging to the function space. Since there is only one FS allowed, this should work fine.
[x] When generating ubound for dof loop with dist mem, piggy-back off the LFRicBuiltin checks to set the upper loop bound.
Kernel call
[x] Do not include dofmap (map_FS(:,cell))
[x] Fields in kernel call must access by index the current dof in the loop (f1_data(df))
Declarations
[x] Potentially remove FS name from undf because there should only ever be one FS for dof kerns
^ Above introduces more conditionals which seem unnecessary. Most egregious is having a property of FunctionSpace class that returns just 'undf' and then finding all instances where 'undf_name' property is accessed and adding a conditional check for a dof kernel. Unfortunately, this seems like the only way to do it since the FunctionSpace class does not have access to the kernel it belongs to, and therefore cannot determine if said kernel is a dof kern.
Just a note for the future: there's no need to open an Issue 'towards' another Issue :-) Just add to the existing Issue. It is then the PR that is 'towards' that existing Issue.
Towards #1351
This is a checklist of features that DoF kernel code generation needs.
Loop
Question - _should dof kerns have a different loopupper_bound_name
? This would distinguish them from builtin loops (maybe not wanted) but would allow for less conditional branching in the setting of upperbound.'df'
name and'dof_loop_idx'
tag -LFRicKernCallFactory
&LFRicLoop
f1_proxy%vspace%get_ncell()
but should be theundf_name
belonging to the function space. Since there is only one FS allowed, this should work fine.Kernel call
map_FS(:,cell)
)f1_data(df)
)Declarations
Potentially remove FS name from^ Above introduces more conditionals which seem unnecessary. Most egregious is having a property ofundf
because there should only ever be one FS for dof kernsFunctionSpace
class that returns just'undf'
and then finding all instances where'undf_name'
property is accessed and adding a conditional check for a dof kernel. Unfortunately, this seems like the only way to do it since theFunctionSpace
class does not have access to the kernel it belongs to, and therefore cannot determine if said kernel is a dof kern.