anstmichaels / emopt

A suite of tools for optimizing the shape and topology of electromagnetic structures.
BSD 3-Clause "New" or "Revised" License
97 stars 41 forks source link

examples need some fixing #7

Closed joamatab closed 5 years ago

joamatab commented 5 years ago

python gc_opt_constrained.py
File "gc_optconstrained.py", line 523 ?!?jedi=0, ?!? (*param params_*, param indices=[], param plot=True, param verbose=True, param return_gradients=False) ?!?jedi?!? ^ SyntaxError: invalid syntax

python gc_opt.py self.eps = eps.get_values_in(self.domain, squeeze=True) UnboundLocalError: local variable 'eps' referenced before assignment

python waveguide_crossing_TM.py 387 mode = emopt.modes.ModeTM(wlen, eps, mu, src_line, n0=3.5, neigs=8) --> 388 mode.build() 389 mode.solve() 390

/home/awsgui/.local/lib/python2.7/site-packages/emopt-0.4-py2.7.egg/emopt/modes.pyc in build(self) 401 ds = self.ds/self.R # non-dimensionalize 402 --> 403 self.eps = eps.get_values_in(self.domain, squeeze=True) 404 self.mu = mu.get_values_in(self.domain, squeeze=True) 405

UnboundLocalError: local variable 'eps' referenced before assignment

same error for waveguide_modes_2D.py

anstmichaels commented 5 years ago

Ah, vim plugin gone awry. It looks like I also introduced new bugs in the 2D mode solvers in the last update, so I fixed those. Try pulling the updated version and let me know if the errors are fixed.

anstmichaels commented 5 years ago

I am going to mark this as closed for now. If you encounter any other bugs, please open a new issue.