Skip to content

Setting default mode precision to 'double', except in EME solver #2547

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

momchil-flex
Copy link
Collaborator

@momchil-flex momchil-flex commented Jun 6, 2025

Fixes #2518 (well, and it goes beyond it to set 'double' by default)

@caseyflex note that I changed the EMEModeSpec_to_mode_spec method to be more stable if we e.g. add a new field in the ModeSpec that we just want to directly propagate.

Copy link
Contributor

github-actions bot commented Jun 6, 2025

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/eme/grid.py (100%)

Summary

  • Total: 4 lines
  • Missing: 0 lines
  • Coverage: 100%

Copy link
Contributor

@caseyflex caseyflex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Yeah we have some other functions like _to_mode_spec that could be made more robust like this in the future. Like in mode/simulation.py; we have MODE_SIM_YEE_SIM_SHARED_ATTRS which should probably be handled like this, just popping the properties that are specific to ModeSimulation. MODE_SIM_MODE_SOLVER_SHARED_ATTRS probably can't be handled like this, since those classes aren't related by simple inheritance

@momchil-flex momchil-flex force-pushed the momchil/default_double branch from 46f48e0 to a5c811b Compare June 6, 2025 16:15
@momchil-flex momchil-flex force-pushed the momchil/default_double branch 2 times, most recently from a32a007 to b0bc5d3 Compare June 10, 2025 08:58
@momchil-flex momchil-flex force-pushed the momchil/default_double branch from b0bc5d3 to a7ce126 Compare June 10, 2025 09:00
@momchil-flex momchil-flex merged commit c7f1967 into develop Jun 10, 2025
7 of 22 checks passed
@momchil-flex momchil-flex deleted the momchil/default_double branch June 10, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically sets ModeSpec precision to double when group_index_step is not False
5 participants