-
Notifications
You must be signed in to change notification settings - Fork 41
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
Default group_index_step to True in ModeSpec #1169
Comments
One thing that comes to mind is that it may make sense to have it True in ModeSolver and maybe in ModeSolverMonitor, but False in ModeMonitor to avoid extra simulation time (it's not really the purpose of this monitor to compute the group index). However, it is defined in @tylerflex @lucas-flexcompute any comments? |
TBH I'm more in favor of leaving the default |
I'm also in favor of not changing default behavior if possible, simply for backwards compatibility. Is there a way to improve the warning messaging to explain what's going on when group_index is returned as None? for example? |
Yeah, I think a warning message when that happens is more useful (we can probably make it a "single-issue" warning as well). |
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
@weiliangjin2021 and I are chatted sometime ago about the possibility to compute group index without using finite differences: see equation (14) in https://math.mit.edu/~stevenj/papers/LohOs09.pdf. Do you think it's something we can adopt to make calculations faster? I assume there could be difficulties with angled, fully anisotropic or lossy? |
Interesting! It could be worth a try since it should be quite quick. My main worry is if the two different ways to obtain the result don't match up exactly (due to e.g. some numerical differences). Actually when Lucas first started working on adding the group index computation, I got interested in whether it can be done by computing both But anyway, good to try your idea I think! |
I'm under the impression that eq. 14 is only valid for non-dispersive materials, and that's probably one of the main applications of group velocity calculations. Is there any easy and accurate correction factor that we can use to include dispersion? |
There is Eq.15 for dispersive medium. To generalize to lossy medium, the conjugated inner product needs to be replaced with unconjugated one. But I'm not sure if any other changes are needed. |
I see. If that's easy to implement, I don't see why not. It would end all of the issues with group index calculation! |
Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
Merged in #1178 |
A few users have been confused when using the mode solver and get none from extracting the group index. Shall we set group_index_step to True by default?
The text was updated successfully, but these errors were encountered: