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