Skip to content

Add configurable verbosity to mesh generator, fix tests, refactor palace simulation classes and local non-Apptainer Palace support#49

Open
benvial wants to merge 10 commits intogdsfactory:mainfrom
benvial:main
Open

Add configurable verbosity to mesh generator, fix tests, refactor palace simulation classes and local non-Apptainer Palace support#49
benvial wants to merge 10 commits intogdsfactory:mainfrom
benvial:main

Conversation

@benvial
Copy link
Copy Markdown
Member

@benvial benvial commented Mar 5, 2026

Pull Request Summary

This PR consolidates common simulation logic into a shared mixin and adds support for running Palace without Apptainer.

Key Features

  1. Code Reuse: Common simulation logic now lives in PalaceSimMixin for DrivenSim, EigenmodeSim, ElectrostaticSim
  2. Direct Palace Execution: run_local(use_apptainer=False) runs Palace directly without Apptainer
  3. Verbosity Control: Mesh generator now accepts configurable verbosity
  4. Fix tests frozen due to geometry issues in test_mesh_integration.py

@benvial benvial changed the title Add configurable verbosity to mesh generator and fix tests Add configurable verbosity to mesh generator, fix tests, refactor palace simulation classes Mar 5, 2026
@benvial benvial changed the title Add configurable verbosity to mesh generator, fix tests, refactor palace simulation classes Add configurable verbosity to mesh generator, fix tests, refactor palace simulation classes and local non-Apptainer Palace support Mar 6, 2026
@benvial
Copy link
Copy Markdown
Member Author

benvial commented Mar 6, 2026

closes #41

@benvial
Copy link
Copy Markdown
Member Author

benvial commented Mar 6, 2026

TODO:

  • update write_config method to deal with different simulation types
  • add tests
  • add example

…line

- Introduce EigenmodeConfig and eigenmode simulation type
- Add absorbing_boundary flag for boundary condition control
- Refactor mesh generation pipeline to support multiple simulation types
- Update Palace config generation for driven/eigenmode/electrostatic simulations
- Fix port excitation logic based on simulation type
- Add coverage reporting to test command
model_name: str = "palace",
simulation_type: str = "driven",
driven_config: DrivenConfig | None = None,
eigenmode_config: EigenmodeConfig | None = None,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets add the new arguments to the doc string

air_margin: Air box margin (um)
fmax: Max frequency for config (Hz)
show_gui: Show gmsh GUI during meshing
simulation_type: str = "driven",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add also the other new arguments to the doc string

@dot-cross
Copy link
Copy Markdown
Contributor

Looks good. I think we should include the number of computed field modes to save to disk to the eigenmode config on next commits.

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.

2 participants