Skip to content

[API / Testing / Mode Solver]: Add new simulation, modal solver, and plotting APIs#120

Merged
QuentinWach merged 26 commits into
mainfrom
clean
May 25, 2026
Merged

[API / Testing / Mode Solver]: Add new simulation, modal solver, and plotting APIs#120
QuentinWach merged 26 commits into
mainfrom
clean

Conversation

@QuentinWach
Copy link
Copy Markdown
Collaborator

  • Adds new public APIs: GridSpec, GaussianPulse, ModeSpec, BoundarySpec, Box, FieldMonitor, FluxMonitor, ModeSolver, and ModeData.
  • Extends Simulation construction with centered domain/size, auto grid/time resolution, boundary specs, coordinate shifting, and copy/update helpers.
  • Implements modal workflow helpers for solving finite mode planes, converting solved modes into ModeSources, and exposing mode monitor amplitudes as labeled xarray data.
  • Improves source-spectrum, DFT flux, Gaussian pulse, and mode-source power normalization.
  • Restores/enhances simulation and mode plotting, including cross sections, DFT fields, field-frame selection, and mode component displays.
  • Updates examples and broadens tests, especially with a new API test suite.
  • Modernizes dev tooling from Black/isort/flake8 to Ruff plus Vulture audit targets.

…to include new commands for dead code checks and audits. Replace flake8 and isort with ruff for linting and formatting. Update documentation to reflect changes in development commands and tool configurations. Introduce shared Yee-lattice constants and refactor device classes to utilize runtime state management. Improve error handling and assertions in simulation components.
…guide example parameters and enhance simulation results tests for field and frame aliases.
- Introduced a depth attribute in RegularGrid to support 3D designs.
- Refactored simulation domain calculations to utilize the new depth attribute.
- Updated the simulation initialization to correctly determine if the design is 3D based on depth.
- Added a test to verify that rasterized 2D grids are handled correctly in simulations.
- Removed the Medium class and updated references to use Material instead.
- Cleaned up deprecated attributes and methods related to frequency flux spectrum in Monitor and Simulation classes.
- Updated tests to reflect changes in the Monitor API and removed tests for deprecated features.
- Enhanced documentation to clarify the new material handling approach.
@QuentinWach QuentinWach merged commit 84c7766 into main May 25, 2026
1 check failed
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.

1 participant