← Back to team overview

dolfin team mailing list archive

Re: Another suggestion for the Function class

 

Can sympy generate C++? 

Kent

On ti., 2008-12-02 at 11:38 +0100, Anders Logg wrote:
> 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
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References