Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix on eigenvalue signs in quadric surfaces #19

Closed
wants to merge 2 commits into from

Conversation

SteSeg
Copy link
Contributor

@SteSeg SteSeg commented Nov 25, 2024

I believe there was a wrong sign definition in the eigenvalue signs of the coefficient matrix of quadric surfaces (gqs.py):

  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  # should be -1 
      else:
          signs[i] = -1  # should be 1

Now the conversion of fng_str and fng_w is not giving error anymore:

image

image

Copy link
Collaborator

@pshriwise pshriwise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix @SteSeg! Is it possible to identify one of the surfaces in the model for which this fix is successful so we can use it to design a test?

Also, it appears that the first of the two commits here are mainly style updates. I'd love to go through and update style at some point, but for now can you remove those (for now) to keep the changes relevant to the purpose of the PR?

@SteSeg SteSeg closed this Nov 27, 2024
@SteSeg SteSeg reopened this Nov 27, 2024
@SteSeg
Copy link
Contributor Author

SteSeg commented Nov 27, 2024

My bad, I realized it was the previous merged PR to solve the problems I was facing with quadrics. I'll close this PR.

@SteSeg SteSeg closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants