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 eigenmode coefficient objective function in Meep metagrating optimization #67

Merged
merged 1 commit into from
Jun 22, 2024

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Jun 22, 2024

The Meep scripts used to optimize the metagrating currently require using a "hack" for mpb.cpp described in NanoComp/meep#2054 (comment). A fix was provided in NanoComp/meep#2285 which involved specifying the eig_vol parameter of the meep.adjoint.EigenModeCoefficient of the adjoint solver to have a length of one pixel in the periodic direction. This PR applies this fix to the two scripts.

@oskooi oskooi added the enhancement New feature or request label Jun 22, 2024
@oskooi
Copy link
Collaborator Author

oskooi commented Jun 22, 2024

The test failures are due to Autograd's dependence on deprecated Numpy features as reported (and fixed but not yet merged) in HIPS/autograd#618.

@oskooi oskooi merged commit a065188 into NanoComp:main Jun 22, 2024
1 check failed
@oskooi oskooi deleted the metagrating_meep_adjoint_fix branch June 22, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant