PSyclone
PSyclone copied to clipboard
DoF kern code generation checklist
Towards #1351
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 upper_bound.~~
- [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 theundf_namebelonging 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
undfbecause there should only ever be one FS for dof kerns~~ ^ Above introduces more conditionals which seem unnecessary. Most egregious is having a property ofFunctionSpaceclass 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 theFunctionSpaceclass 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.
Noted, thanks :)