Skip to content
Snippets Groups Projects

Reimplement create_staggered_kernel

Merged Michael Kuron requested to merge staggered_kernel into master

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.

Edited by Michael Kuron

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • Michael Kuron added 1 commit

    added 1 commit

    • c819048d - enable optimizations in create_staggered_kernel_2

    Compare with previous version

  • Michael Kuron added 1 commit

    added 1 commit

    • 69e3439d - Allow multiple staggered fields in one create_staggered_kernel_2 call

    Compare with previous version

  • Michael Kuron added 1 commit

    added 1 commit

    • 4ca0006b - Remove old create_staggered_kernel

    Compare with previous version

  • Michael Kuron unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Michael Kuron added 1 commit

    added 1 commit

    • 3b18545b - Remove old create_staggered_kernel

    Compare with previous version

  • Michael Kuron changed the description

    changed the description

  • Michael Kuron added 1 commit

    added 1 commit

    • ea2f167d - create_staggered_kernel bugfixes to store pygrandchem compatibility

    Compare with previous version

  • Michael Kuron changed the description

    changed the description

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading