Skip to content

Commit

Permalink
simplify excitation vector for symmetry
Browse files Browse the repository at this point in the history
  • Loading branch information
otvam committed Aug 10, 2023
1 parent dae9671 commit 17c3853
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypeec/utils/solution_symmetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _get_excitation_compact(data, symmetry):

# combine excitations with the symmetry
for perm_tmp in perm:
data[:, perm_tmp] = data[:, perm[ref]]
data[perm_tmp] = data[perm[ref]]

return data

Expand Down Expand Up @@ -80,14 +80,14 @@ def get_excitation_all(n_winding, symmetry):
"""

# full excitations
excitation = np.eye(n_winding, dtype=bool)
excitation = np.arange(n_winding)

# combine excitations with the symmetries
for symmetry_tmp in symmetry:
excitation = _get_excitation_compact(excitation, symmetry_tmp)

# remove redundant excitations
(excitation, idx) = np.unique(excitation, axis=1, return_index=True)
(excitation, idx) = np.unique(excitation, return_index=True)

# get the number of solutions for the reduced problem
n_solution = len(idx)
Expand Down

0 comments on commit 17c3853

Please sign in to comment.