Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • 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
  • Merge requests
  • !207

add_subexpressions_for_constants and new_filtered fix

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Frederik Hennig requested to merge da15siwa/pystencils:simplification_patch into master Jan 26, 2021
  • Overview 7
  • Commits 8
  • Pipelines 4
  • Changes 6

Two small patches:

  • Added a function add_subexpressions_for_constants to pystencils.simp. This function extracts numerical constants like 2 or 1/3 from equations. This is helpful because SymPy does not exclude common factors from sums if they are not symbols. Excluding them this way can reduce the number of multiplications. In some cases, additional common subexpressions can also be found.
  • Changed AssignmentCollection.new_filtered to use self.copy to preserve other members of the assignment collection.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: simplification_patch