Skip to content

Commit

Permalink
Provide names for eigenvalues and eigenvectors at call of eig
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Nov 22, 2024
1 parent 4833bed commit 5b35df0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/openmc_cad_adapter/gqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def characterize_general_quadratic( surface ): #s surface
else:
delta = -1 if det_Ac < 0 else 1

eigen_results = np.linalg.eig(Aa)
signs = np.array([ 0, 0, 0 ])
for i in range( 0, 3 ):
if eigen_results[0][i] > -1 * gq_tol:
eigenvalues, eigenvectors = np.linalg.eig(Aa)
signs = np.array([0, 0, 0])
for i in range(0, 3):
if eigenvalues[i] > -1 * gq_tol:
signs[i] = 1
else:
signs[i] = -1
Expand Down Expand Up @@ -113,8 +113,7 @@ def find_type( rAa, rAc, delta, S, D ):
#set the translation
translation = C

rotation_matrix = eigen_results.eigenvectors
eigenvalues = eigen_results.eigenvalues
rotation_matrix = eigenvectors

for i in range( 0, 3 ):
if abs(eigenvalues[i]) < gq_tol:
Expand Down

0 comments on commit 5b35df0

Please sign in to comment.