Skip to content
Snippets Groups Projects

add_subexpressions_for_constants and new_filtered fix

Merged Frederik Hennig requested to merge da15siwa/pystencils:simplification_patch into master

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.

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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply