valentinsulzer / PyBaMM.jl

Julia bindings for PyBaMM
MIT License
13 stars 1 forks source link

'using' inside runtime_eval expressions #6

Closed titianiota closed 2 years ago

titianiota commented 2 years ago

Having a 'using' statement inside the expressions returned by sim.built_model.generate_julia_diffeq and pybamm.get_julia_function cause an exception. These can be removed but then of course the using statements have to be included in the module. At the moment there's a hack around it by removing the 'using' bits e.g.

var_func! = runtime_eval(Meta.parse(replace(var_str,r"using .+"=>"")))