← Back to team overview

dolfin team mailing list archive

Re: Another suggestion for the Function class

 

Yes. "C code printing" is listed here as one of the new features:

  http://sympy.blogspot.com/

But maybe we don't need to involve SymPy now that Martin has added 'x'
to UFL.

-- 
Anders


On Tue, Dec 02, 2008 at 12:09:14PM +0100, Kent Andre wrote:
> 
> 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
> 

Attachment: signature.asc
Description: Digital signature


Follow ups

References