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 polyslab edge gradient assignment #2064

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

tylerflex
Copy link
Collaborator

There was a bug in polyslab, when transforming edge gradients to vertex gradients. The vertex assignments were shifted incorrectly by 1. This wouldnt affect finely discretized polyslabs but becomes a major issue with more coarse grained polylsab discretizations.

Copy link
Collaborator

@yaugenst-flex yaugenst-flex left a comment

Choose a reason for hiding this comment

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

Looks great. Took me a while to actually understand but can confirm, shift=-1 connects current and next edge, which is misaligned with the vertices.

@tylerflex
Copy link
Collaborator Author

Yea, basically to compute edges, we substract current vertex from vertex with shift=-1. then to get back to vertices, we need to apply shift=+1

@tylerflex tylerflex merged commit bf1645c into develop Nov 10, 2024
15 checks passed
@tylerflex tylerflex deleted the tyler/autograd_/fix/polyslab3 branch November 10, 2024 13:14
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