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, optional) – Scaling factor for the penalty, by default 1.0. 
- kappa (float, optional) – Exponential factor for the penalty, by default 10.0. 
- eps (float, optional) – A small value to avoid division by zero, by default 1e-6. 
 
- 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