-
Notifications
You must be signed in to change notification settings - Fork 54
Unstructured mesh refinement regions #2306
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Ref: https://github.com/numpy/numpy/blob/d741eb282dd15acc1f49fa660519c99680435e75/numpy/_core/numeric.py#L1664 For some reason, the warning is not shown in normal tidy3d runs, but if we enable it around the function call with: ```python import warnings warnings.simplefilter("error") ``` it will show as an error. This affects PhotonForge because we don't differentiate warnings from errors through the python C API, so having this warning is preventing us from supporting numpy >= 2. Signed-off-by: Lucas Heitzmann Gabrielli <lucas@flexcompute.com>
CHANGELOG.md
Outdated
@@ -22,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- Validation step that raises a `ValueError` when no frequency-domain monitors are present, preventing invalid adjoint runs. | |||
- Metal surface roughness models: modified Hammerstad, Huray Snowball, and Cannonball-Huray. | |||
- Support for Fermi-Dirac statistics in Charge solver. This option can be activated when defining the analysis type `IsothermalSteadyChargeDCAnalysis` with `fermi_dirac=True`. This option will provide more accurate results in simulations where very high doping may lead the pseudo-Fermi energy levels to approach either the conduction or the valence energy levels. | |||
- Add refinement regions and refinement lines for the mesh generation for teh CHARGE solver. |
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.
This can also be used to Heat simulations so I would change the sentence to this:
Unstructured grids now support refinement regions (including 1D refinement lines in arbitrary directions)
tidy3d/components/tcad/grid.py
Outdated
) | ||
|
||
r2: Coordinate = pd.Field( | ||
(0.0, 0.0, 0.0), |
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.
I think we should make this a required input and not provide a default.
tidy3d/components/tcad/grid.py
Outdated
refinement_regions: Tuple[GridRefinementRegion, ...] = pd.Field( | ||
(), | ||
title="Refinement regions", | ||
description="List of regions for which the mesh refinement will be applied", | ||
) | ||
|
||
refinement_lines: Tuple[GridRefinementLine, ...] = pd.Field( | ||
(), | ||
title="Refinement lines", | ||
description="List of lines for which the mesh refinement will be applied", | ||
) | ||
|
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.
Now that I see this I'm thinking that maybe refinement_regions
could accept both GridRefinementRegion
and GridRefinementLine
. Conceptually they're both refinement regions in a way.
Of course this implies updating the back-end.
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.
Makes sense, could be a single argument refinements
even.
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.
there is also the option to reuse name override_structures
from fdtd grid spec
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.
that makes a lot of sense
There is a new branch for this PR: vasily/refinement_region_update It should be merged into this PR |
… Nedeljkovic Soref Mashanovich
…nt postprocessing
I have created a new clean PR with the mesh refinement structures: |
closing in favor of #2398 |
No description provided.