-
Notifications
You must be signed in to change notification settings - Fork 70
FXC-5441: speed up monitor postprocessing and improve capacitance accuracy #3259
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
base: develop
Are you sure you want to change the base?
Conversation
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.
Pull request overview
Updates TCAD postprocessing/plotting behavior to use monitor extents (rather than unstructured data extents) for display limits, and adjusts symmetry-expansion trimming for unstructured datasets to improve downstream accuracy (e.g., capacitance).
Changes:
- Compute plot axis limits from the monitor extent (clipped to simulation bounds) for unstructured
plot_mesh()/plot_field(). - Replace unstructured
box_clip()withsel_inside()during symmetry-expansion trimming.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tidy3d/components/tcad/data/sim_data.py |
Sets plot limits based on monitor bounds for unstructured plotting and changes plotting order/limits behavior. |
tidy3d/components/tcad/data/monitor_data/abstract.py |
Switches symmetry-expansion trimming for unstructured data from geometric clipping to coverage-based selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2640602 to
9e2b5fa
Compare
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
2db4645 to
c9ef4a0
Compare
c9ef4a0 to
9f807b0
Compare
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
switch box_clip to sel in symmetry expansion
9f807b0 to
2e3eb85
Compare
|
@dbochkov-flexcompute out of caution I wanted to run this by you one last time: I had to modify the symmetry expansion test, because I also switched to using |
Note
Medium Risk
Changes unstructured dataset postprocessing (symmetry expansion clipping and VTK-to-numpy conversion) and TCAD plotting bounds, which could subtly affect returned bounds/visualizations and memory usage.
Overview
Improves unstructured TCAD monitor postprocessing and plotting. Symmetry expansion now clips unstructured datasets using
sel_inside()(instead ofbox_clip()), preserving boundary cells and avoiding over-clipping; tests were updated to assert coverage rather than exact bounds.Adjusts unstructured mesh/field plotting to use monitor extents. Plot axis limits are derived from the monitor bounds (clipped to the simulation domain) and autoscaling is disabled before overlaying the unstructured mesh, ensuring plots focus on the requested monitor region.
Hardens VTK data ingestion. Converting VTK point arrays to numpy now forces a copy to prevent potential data corruption from views into VTK-managed buffers.
Written by Cursor Bugbot for commit 2e3eb85. This will update automatically on new commits. Configure here.