Skip to content

Min size autodetect #2325

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
May 15, 2025
Merged

Conversation

dbochkov-flexcompute
Copy link
Contributor

I am not sure about naming SmallestFeatureSpec and also how deep it is tucked away:

td.Simulation(
    ...
    grid_spec=td.GridSpec.auto(
        layer_refinement_specs=[
            td.LayerRefinementSpec(
                corner_finder=td.CornerFinderSpec(
                    dl_min_spec=td.SmallestFeatureSpec(
                        concave_resolution=1,
                        convex_resolution=2,
                        mixed_resolution=3,
                    )
                )
            )
        ]
    )
)

would appreciate any suggestions

@weiliangjin2021
Copy link
Collaborator

Regarding deeply nested field, maybe concave_resolution etc. can be part of CornerFinderSpec fields directly? We have a field distance_threshold already, that might also have some impact on the minimal feature.

Another questions is what would be good default values for those resolutions?

Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 left a comment

Choose a reason for hiding this comment

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

Went through it again, and now makes more sense to me: your default value in the code is probably good enough.

A high-level question: this PR looks also partially resolve the short-issue. I guess they will work together?

@dbochkov-flexcompute
Copy link
Contributor Author

Went through it again, and now makes more sense to me: your default value in the code is probably good enough.

A high-level question: this PR looks also partially resolve the short-issue. I guess they will work together?

yeah, it does partially resolve it, but not as robustly as the other one. For example, if structure has rounded corners everywhere this autodetection feature would not see anything. But given that the other approach is more computationally intensive, might still be good to have a rough estimation like this one

@weiliangjin2021
Copy link
Collaborator

Just tested the microstrip: I removed lumped elements and substrate layer refinement so that they don't set the minimal grid size. Before this PR, I get
image

And with the default parameters in this PR, I get
image

Quite nice meshing!

@dbochkov-flexcompute dbochkov-flexcompute force-pushed the daniil/min_size_autodetect branch from b73cff8 to cd6bdb1 Compare April 17, 2025 08:26
@dbochkov-flexcompute dbochkov-flexcompute force-pushed the daniil/min_size_autodetect branch 2 times, most recently from 2fc76eb to b8cd3b1 Compare May 7, 2025 01:25
@dbochkov-flexcompute dbochkov-flexcompute force-pushed the daniil/min_size_autodetect branch from b8cd3b1 to e98ae2e Compare May 14, 2025 18:21
@dbochkov-flexcompute dbochkov-flexcompute force-pushed the daniil/min_size_autodetect branch from e98ae2e to 86b3f0d Compare May 15, 2025 21:50
@dbochkov-flexcompute dbochkov-flexcompute merged commit 1331f66 into develop May 15, 2025
34 checks passed
@dbochkov-flexcompute dbochkov-flexcompute deleted the daniil/min_size_autodetect branch May 15, 2025 22:29
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