Skip to content

Commit

Permalink
fix: removed unused code as suggest by githubs codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Steinmetzer committed Aug 9, 2023
1 parent ebe4e2f commit 494de1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion pysisyphus/wavefunction/dma.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Benda, Cances, Ehrlacher, Stamm, 2022


import dataclasses
import itertools as it
import time
from typing import Tuple
Expand Down
13 changes: 3 additions & 10 deletions scripts/gen_m2m.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"""
Generate python code to shift multipoles.
See pysisyphus.wavefunction.dma for more information.
Requires the sympleints-package:
https://github.com/eljost/sympleints
"""

import black
Expand Down Expand Up @@ -107,16 +110,6 @@ def get_W_sym(L_max: int = _LE_MAX):
expr = expr.evalf(PREC)
Wsym[key] = expr

# All non-zero keys
present_keys = set(Wsym.keys())
# Search for keys in all_keys for values that aren't 0.0.
nonzero_keys = [key for key in all_keys if key in present_keys]
# We can select nonzero_keys to get the expressions in the correct order
W_exprs = [Wsym[key] for key in nonzero_keys]

# Common subexpression elimination
repls, reduced = sym.cse(W_exprs, order="none", optimizations="basic")

Wmat = sym.ImmutableSparseMatrix(num, num, Wsym)
# Dummy multipole matrix
Q = sym.MatrixSymbol("Q", 1, num)
Expand Down

0 comments on commit 494de1c

Please sign in to comment.