-
Notifications
You must be signed in to change notification settings - Fork 60
Enable bulk PMC material #2502
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
Open
weiliangjin2021
wants to merge
1
commit into
develop
Choose a base branch
from
weiliang/pmc
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enable bulk PMC material #2502
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21ca64f
to
38a6f89
Compare
38a6f89
to
7568887
Compare
hmm, nothing happens. @yaugenst how do i get AI review on this PR? |
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
tidy3d/components/mode/mode_solver.pyLines 1810-1819 1810 apply_sibc = isinstance(sim._subpixel.lossy_metal, SurfaceImpedance)
1811 for medium in sim.scene.mediums:
1812 if medium.is_pec:
1813 return True
! 1814 if medium.is_pmc:
! 1815 return True
1816 if apply_sibc and isinstance(medium, LossyMetalMedium):
1817 return True
1818 return False tidy3d/components/scene.pyLines 1293-1301 1293 update={"facecolor": "gold", "edgecolor": "k", "linewidth": 1}
1294 )
1295 elif medium.is_pmc:
1296 # perfect magnetic conductor
! 1297 plot_params = plot_params.copy(
1298 update={"facecolor": "purple", "edgecolor": "k", "linewidth": 1}
1299 )
1300 elif isinstance(medium, Medium2D):
1301 # 2d material |
7568887
to
65c3414
Compare
hey sorry @weiliangjin2021 i enabled it again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile
65c3414
to
eb1803b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PMC material is plotted in purple, but please suggest if you have better color in mind.

Limitations to be addressed in a future PR:
Greptile Summary
Added support for Perfect Magnetic Conductor (PMC) material in Tidy3D, introducing PMCMedium class with visualization in purple and basic functionality similar to PEC materials.
PMCMedium
class intidy3d/components/medium.py
with properties foris_pmc
,eps_model
, andn_cfl
tidy3d/components/subpixel_spec.py
supporting Staircasing and HeuristicPECStaircasing methodsdocs/api/mediums.rst
to include PMCMedium under 'Non-Dispersive Medium'