-
Notifications
You must be signed in to change notification settings - Fork 47
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
QuasiUniformGrid and min_steps_per_sim_size` #2130
base: pre/2.8
Are you sure you want to change the base?
Conversation
6768118
to
146b310
Compare
Added `min_steps_per_sim_size` field to Autogrid for subwavelength simulation domain
a156a76
to
2827943
Compare
Uniform grid vs Quasi-uniform grid (from notebook) |
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.
Great thanks @weiliangjin2021, just a couple of small comments.
I also think we should make it clear that snapping_points
take priority over override_structure
boundaries when they are closer than dl_min
. Maybe add a small comment in the snapping_points
field of GridSpec
.
Thanks @weiliangjin2021 for this great feature! This is useful in CPW simulations when we want to avoid reflections at non-uniform mesh interfaces while still need to snap grid to edges. I have only one slight comment for now. |
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.
So in text you describe the QuasiUniformGrid as a type of UniformGrid that still snaps to special points, but in code it seems to be much closer to an AutoGrid (subclassing from the same AbstractAutoGrid now). It makes me wonder about a few things:
- Is the name QuasiUniformGrid appropriate: did you come up with this or is it used somewhere else?
- Should this just be an option in AutoGrid as opposed to its own class? Like, ignore the structure media and use this specific dl, but still apply the auto gridding?
- And anyway if not, maybe at least also explain the connection to AutoGrid, i.e. it uses the same meshing but ignores the media information in favor for a user-defined
dl
.
Looks great otherwise!
Myself
From user's perspective, it feels much closer to UniformGrid. So originally, I was thinking just adding a flag to UniformGrid to indicate whether to locally tune the grid. But yeah, implementation-wise, it's closer to AutoGrid. So I'm not sure what's the best approach. |
Two main features:
QuasiUniformGrid
: grid is roughly uniform, but locally snapped. This makes it more useful thanUniformGrid
in many simulations.AutoGrid
, adds a fieldmin_steps_per_sim_size
. Now the grid step size is constrained by bothmin_steps_per_sim_size
andmin_steps_per_wvl
. In many RF simulations, the entire simulation domain is deep subwavelength. Previously, one needs to set a dramatically large value ofmin_steps_per_wvl
so that the simulation domain has more than 1 grid point.min_steps_per_sim_size
will be more useful in those simulations.