Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pycodegen
  • pystencilspystencils
  • Issues
  • #56

Closed
Open
Created Feb 23, 2022 by Alexander Reinauer@alexander.reinauerContributor

Kernelcreation functions take different assignment types

The documentation for the create_indexed_kernel(assignments: List[Assignment], *, config: CreateKernelConfig): function has typehints for the assignments that are different to what the docstring says assignments: can be a single assignment, sequence of assignments or an AssignmentCollection.

The same is true for create_domain_kernel but i also did not check every single one of them.

Independently of that mismatch to me as a user it was suprising that the different kernel creation functions take different types of assignments. Since i mostly work with create_kernel i was used to use the AssignmentCollections which don't seem to work for the other functions.

The script i tried to use for the indexed kernel
import pystencils as ps

rho = ps.fields("rho :[3D]", layout='zyxf')

collection = ps.AssignmentCollection(main_assignments=[ps.Assignment(rho.center, 1.0)])

config = ps.CreateKernelConfig()
assignments = ps.create_indexed_kernel(assignments=collection, config=config)

If you don't feel like this is an issue, feel free to close it.

Assignee
Assign to
Time tracking