Fix crazy compiled Expression syntax
Issue #902
new
Code like
f1 = Expression("a*sin(3.0*x[0])*sin(3.0*x[1])*sin(3.0*x[2])", degree=2, a=1., name="f1")
(from a unit test) mixes arguments that a parameters in the code string, e.g. a
, and arguments that affect the Expression type, e.g. name
and degree
.
There should be clear separation between arguments that appear in the code string and other arguments, e.g.
f1 = Expression("a*sin(3.0*x[0])*sin(3.0*x[1])*sin(3.0*x[2])", arg=[(a, 1.0)] degree=2, name="f1")
Or
arg={'a': 1.0}
.