tidy3d.plugins.autograd.invdes.make_curvature_penalty#
- class make_curvature_penalty[source]#
Bases:
Create a penalty function based on the curvature of a set of points.
- Parameters:
min_radius (float) – The minimum radius of curvature.
alpha (float = 1.0) – Scaling factor for the penalty.
kappa (float = 10.0) – Exponential factor for the penalty.
eps (float = 1e-6) – A small value to avoid division by zero.
- Returns:
A function that computes the curvature penalty for a given set of points.
- Return type:
Callable
Notes
The penalty function is defined as:
\[p(r) = \frac{\mathrm{exp}(-\kappa(r - r_{min}))}{1 + \mathrm{exp}(-\kappa(r - r_{min}))}\]This formula was described by A. Micheals et al. “Leveraging continuous material averaging for inverse electromagnetic design”, Optics Express (2018).
Inherited Common Usage