-
Notifications
You must be signed in to change notification settings - Fork 44
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
Warning if a nonuniform custom medium is intersecting certain sources and monitors #1588
Conversation
d2a7e6c
to
6589c52
Compare
6589c52
to
20bcf0a
Compare
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.
looks good to me, thanks @weiliangjin2021 !
40aef78
to
50fc403
Compare
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.
Hey, sorry, just now had a look at this, I have a small comment and then if you could please rebase to fix conflicts.
tidy3d/components/simulation.py
Outdated
f"{len(mediums)} different mediums detected on plane " | ||
f"intersecting a {monitor.type}. Plane must be homogeneous." | ||
) | ||
# if <=1 medium, check if the medium is spatially uniform |
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.
Is it possible to have 0 media? That kinda feels like something is wrong too, unless we're not taking the simulation background into account, but I think we are?
In other words not sure if we can remove the for mat in mediums
and / or raise a different error if mediums
is empty.
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.
It shouldn't be possible. An error has been raised now if 0 media.
tidy3d/components/simulation.py
Outdated
"not supported." | ||
) | ||
|
||
# if <=1 medium, check if the medium is spatially uniform |
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.
Same comment as above.
50fc403
to
f3f2b99
Compare
… and monitors Add is_spatially_uniform property to materials Add is_uniform property to data array and unstructured dataset
f3f2b99
to
e0af8d2
Compare
Resolves #1373