hidmic / ltitop

Linear Time Invariant Topology Optimization Toolkit
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Refactor ltitop.algorithms to use sympy.codegen #2

Closed hidmic closed 2 years ago

hidmic commented 3 years ago

In retrospect it was a bad call to build an ad hoc AST out of sympy symbolic expressions. Sympy's code generation infrastructure would be available if ltitop used sympy.codegen.ast data structures instead.

The ltitop.algorithms module is using sympy code generation functionality to some extent already (e.g. sympy.utilities.lambdify). Finish the job.

hidmic commented 2 years ago

Well, it turns out sympy.codegen.ast isn't ideal either. See https://github.com/hidmic/ltitop/issues/9.