Skip to content

Commit 0f1cb69

Browse files
committed
remove sign for coupling
1 parent fb1bcb4 commit 0f1cb69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pypeec/utils/matrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def _get_matrix_coupling(n_winding, RL_mat):
7676
k_mat = np.zeros((n_winding, n_winding), dtype=np.float64)
7777
for i in range(n_winding):
7878
for j in range(n_winding):
79-
k_mat[i, j] = RL_mat[i, j] / np.sqrt(RL_mat[i, i] * RL_mat[j, j])
80-
k_mat[j, i] = RL_mat[j, i] / np.sqrt(RL_mat[i, i] * RL_mat[j, j])
79+
k_mat[i, j] = np.abs(RL_mat[i, j]) / np.sqrt(RL_mat[i, i] * RL_mat[j, j])
80+
k_mat[j, i] = np.abs(RL_mat[j, i]) / np.sqrt(RL_mat[i, i] * RL_mat[j, j])
8181

8282
return k_mat
8383

0 commit comments

Comments
 (0)