-
Notifications
You must be signed in to change notification settings - Fork 50
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
Allow MeshOverrideStructure to unshadow structures in overlapping region #2181
Conversation
There is a high-index box in the simulation domain. When we add a mesh override structure of larger grid size and of the same geometry, previous behavior is that this larger grid size is applied because it completely covers the physical structure, as illustrated in the middle figure. Now with |
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 in general, but just for me to understand: Does the shadow==False
setting only take effect when the previous structure is completely inside the override, or does it work for partial intersections too? The documentation in the field description seems to imply intersections are supported, but the docs in the test function says otherwise.
For partial intersection, it's already smaller grid size takes effect. |
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, but just wondering what is the use case exactly? In your example, it is basically going to be a case where I don't really know or want to think about whether the physical structure has high or low index? So I use the override structure to set a minimum step, but if it needs to be even lower than that I allow it?
I think the original use case is in RF simulations. We will use layer refinement to set the grid and those are implemented through override structures. Because they are created automatically, I asked Weiliang what would happen in partial and integral intersections. (I ended up sorting my layer refinements by size, so it wouldn't be a problem anyway, but applying the smallest grid step regardless of sorting makes sense for users from other tools, doesn't it?) |
Yeah, it's just that in the example above, one could just remove the OverrideStructure, but I see the value of not having to manually think about it in some general cases. |
That's right. Let's say you have a layered structure, and you want to make sure that there are at least 5 grid points to resolve the layer thickness. The layer consist of many physical structures, so you don't really know grid size from |
8a4340b
to
40e5178
Compare
Related to @lucas-flexcompute 's comment on #2113
When we automatically add mesh override structure that has the same geometry as regular structure, we don't want it to shadow physical structures if the physical structure sets a smaller grid size.
With
shadow=False
, we drop the logic for checking if the override structure is covered or covering other structures.