dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16233
Re: Problem with Expressions in Python
On Friday 16 October 2009 14:36:25 Garth N. Wells wrote:
> Anders Logg wrote:
> > I'm getting this error with a code that used to work:
> >
> > f = Expression(code, V=V)
> >
> > File
> >
> > "/home/logg/scratch/src/dolfin-dev/local/lib/python2.6/site-packages/dolf
> >in/expression.py", line 575, in __new__
> > [element.cell().geometric_dimension()])[0]
> > File
> >
> > "/home/logg/scratch/src/dolfin-dev/local/lib/python2.6/site-packages/dolf
> >in/compile_expressions.py", line 216, in compile_expressions
> > classname, code = expression_to_dolfin_expression(cpparg,
> > defaults, dim)
> > File
> >
> > "/home/logg/scratch/src/dolfin-dev/local/lib/python2.6/site-packages/dolf
> >in/compile_expressions.py", line 65, in expression_to_dolfin_expression
> > fragments = expression_to_code_fragments(expr, defaults,
> > ["v","x"])
> > File
> >
> > "/home/logg/scratch/src/dolfin-dev/local/lib/python2.6/site-packages/dolf
> >in/compile_extension_module.py", line 66, in expression_to_code_fragments
> > raise TypeError, "The c++ keyword '%s' was detected in C++
> > expression."%sym
> > TypeError: The c++ keyword 'class' was detected in C++ expression.
>
> I just now hit this too. How can I pass multi-line C++ code to create
> and Expression?
What does your multi-line C++ code look like?
Johan
> Garth
>
> > --
> > Anders
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
References