Geometries¶
-
class
lumopt.geometries.polygon.
Polygon
(points, z, depth, eps_out, eps_in, edge_precision)¶ Defines a polygon with vertices on the (x,y)-plane that are extruded along the z direction to create a 3-D shape. The vertices are defined as a numpy array of coordinate pairs np.array([(x0,y0),…,(xn,yn)]). THE VERTICES MUST BE ORDERED IN A COUNTER CLOCKWISE DIRECTION.
Parameters: - points – array of shape (N,2) defining N polygon vertices.
- z – center of polygon along the z-axis.
- depth – span of polygon along the z-axis.
- eps_out – permittivity of the material around the polygon.
- eps_in – permittivity of the polygon material.
- edge_precision – number of quadrature points along each edge for computing the FOM gradient using the shape derivative approximation method.
-
class
lumopt.geometries.polygon.
FunctionDefinedPolygon
(func, initial_params, bounds, z, depth, eps_out, eps_in, edge_precision=5, dx=1e-10)¶ Constructs a polygon from a user defined function that takes the optimization parameters and returns a set of vertices defining a polygon. The polygon vertices returned by the function must be defined as a numpy array of coordinate pairs np.array([(x0,y0),…,(xn,yn)]). THE VERTICES MUST BE ORDERED IN A COUNTER CLOCKWISE DIRECTION.
Parameters: - fun – function that takes the optimization parameter values and returns a polygon.
- initial_params – initial optimization parameter values.
- bounds – bounding ranges (min/max pairs) for each optimization parameter.
- z – center of polygon along the z-axis.
- depth – span of polygon along the z-axis.
- eps_out – permittivity of the material around the polygon.
- eps_in – permittivity of the polygon material.
- edge_precision – number of quadrature points along each edge for computing the FOM gradient using the shape derivative approximation method.
- dx – step size for computing the FOM gradient using permittivity perturbations.