We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently the geometry is defined by specifying an epf(x,y) function and a muf(x,y) function,
epf(x,y)
muf(x,y)
geometry = Geometry(epf, muf, ...)
This is straightforward for simple geometries but it becomes cumbersome if the geometry is made of multiple shapes.
We should introduce an additional interface for creating geometries,
geometry = Geometry(shapes, ...)
where shapes is a (nested) list of AbstractShape subtypes, eg
shapes
AbstractShape
# accept nested list so we can use list comprehensions inside shapes = [ Circle(r,ep=4), [Rectangle(Lx,Ly,ep=3,origin=[n,0]) for n in -1:1] ]
and epf(x,y) and muf(x,y) are automatically generated from the flattened shapes, working in reverse order such that the last shape is on top.
We should include some simple shapes and transforms for defining geometry, such as Ellipse or Rectangle. For example these shapes are available in meep: https://meep.readthedocs.io/en/latest/Python_User_Interface/#geometricobject
Ellipse
Rectangle
We should also include a Background shape if the user wants to override the default values of ep=1 and mu=1, eg
Background
ep=1
mu=1
shapes = [Circle(ep=4)] # assumes background is ep=1, mu=1 shapes = [Background(ep=2), Circle(ep=4)] # overrides default background
Shapes should default to ep=1, mu=1, origin=[0,0], angle=0, with dimensions (eg radius) as the positional arguments.
origin=[0,0]
angle=0
We can make use of Julia's function composition/piping for a nice interface: https://docs.julialang.org/en/v1/manual/functions/#Function-composition-and-piping
Desired interface:
ellipses = [Ellipse(r1,r2,ep=11.7) |> translate(R,0) |> rotate(60n) for n in 1:6] geometry = Geometry(ellipses, 1, a1, a2, d1, d2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem
Currently the geometry is defined by specifying an
epf(x,y)
function and amuf(x,y)
function,This is straightforward for simple geometries but it becomes cumbersome if the geometry is made of multiple shapes.
We should introduce an additional interface for creating geometries,
where
shapes
is a (nested) list ofAbstractShape
subtypes, egand
epf(x,y)
andmuf(x,y)
are automatically generated from the flattenedshapes
, working in reverse order such that the last shape is on top.Shapes
We should include some simple shapes and transforms for defining geometry, such as
Ellipse
orRectangle
. For example these shapes are available in meep:https://meep.readthedocs.io/en/latest/Python_User_Interface/#geometricobject
We should also include a
Background
shape if the user wants to override the default values ofep=1
andmu=1
, egShapes should default to
ep=1
,mu=1
,origin=[0,0]
,angle=0
, with dimensions (eg radius) as the positional arguments.Transforms and piping
We can make use of Julia's function composition/piping for a nice interface:
https://docs.julialang.org/en/v1/manual/functions/#Function-composition-and-piping
Desired interface:
The text was updated successfully, but these errors were encountered: