Would it be difficult to add the possibility of sending in a SymPy or Swiginac expression to the Function constructor? As I understand, both can generate C++ code so it seems we could reuse what we already have for cppexpr.
Then, one could do things like f = Function(V, sin(x)) which would be close to optimal. The best of course would be if one did not need to first define f and then use it, but instead could write it directly in the form: L = v*sin(x)*dx -- Anders
signature.asc
Description: Digital signature
_______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
