Reimplement create_staggered_kernel
create_staggered_kernel
now takes a list of assignments to staggered fields and otherwise behaves like create_kernel
. I have included a diffusion equation test case in both D2Q5 and D2Q9. Putting vectorial/tensorial quantities on the staggered points also works.
This merge requests break API compatibility with the previous create_staggered_kernel
.
Fixes #16 (closed). My next step is to implement automatic FV discretization.
Build of dependent projects (pygrandchem, pystencils_walberla) passes as per https://i10git.cs.fau.de/pycodegen/pycodegen/merge_requests/6.
Merge request reports
Activity
added 1 commit
- a5eda508 - Remove unneeded ghost layers from staggered kernel
added 1 commit
- fcdfc127 - Remove unneeded ghost layers from staggered kernel
added 4 commits
-
fcdfc127...8ca8b2ee - 3 commits from branch
master
- dcc76a01 - Merge remote-tracking branch 'origin/master' into staggered_kernel
-
fcdfc127...8ca8b2ee - 3 commits from branch
added 1 commit
- 244d02d0 - create_staggered_kernel_2: fix reversed ghost layer logic
289 301 return ast 302 303 304 def create_staggered_kernel_2(assignments, **kwargs): 305 """Kernel that updates a staggered field. 306 307 .. image:: /img/staggered_grid.svg 308 309 For a staggered field, the first index coordinate defines the location of the staggered value. 310 Further index coordinates can be used to store vectors/tensors at each point. 311 312 Args: 313 assignments: a sequence of assignments or AssignmentCollection with one item for each staggered grid point. 314 When storing vectors/tensors, the number of items expected is multiplied with the number of 315 components. 316 kwargs: passed directly to create_kernel changed this line in version 8 of the diff
added 1 commit
- c819048d - enable optimizations in create_staggered_kernel_2
added 1 commit
- 69e3439d - Allow multiple staggered fields in one create_staggered_kernel_2 call
mentioned in merge request pystencils_walberla!3 (merged)
added 1 commit
- ea2f167d - create_staggered_kernel bugfixes to store pygrandchem compatibility