add_subexpressions_for_constants and new_filtered fix
Two small patches:
- Added a function
add_subexpressions_for_constantstopystencils.simp. This function extracts numerical constants like2or1/3from 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_filteredto useself.copyto preserve other members of the assignment collection.