← Back to team overview

dolfin team mailing list archive

Re: New Expression syntax

 

On Fri, Nov 27, 2009 at 09:41:03AM +0000, Garth N. Wells wrote:
>
>
> Anders Logg wrote:
> > On Fri, Nov 27, 2009 at 08:37:08AM +0000, Garth N. Wells wrote:
> >> Is it still possible with the new Expression syntax to do something like:
> >>
> >>  f2, f3 = Expressions("sin(3.0*x[0])*sin(3.0*x[1])*sin(3.0*x[2])",
> >>                       "1.0 + 3.0*x[0] + 4.0*x[1] + 0.5*x[2]", V=V)
> >>
> >> The above is used in the unit tests. Or to keep things simple should we
> >> remove this kind of fancy feature?
> >
> > I guess it's a nice feature to have but it's nothing I care that much
> > for.
> >
>
> All tests except the unit test for function are working. Expression
> needs to be updated for some of the fancier syntax.
>
> Garth

I made a very simple fix in expression.py to get Expressions()
working.

It currently createas a separate Expression class for each argument so
it will call compile_expressions() for each one, which is less
efficient than compiling a bunch of expressions at once.

Johan, could you have a look at this function?

I also commented out the unit test testSameBases since I couldn't
figure out what it's supposed to do or if it is still valid after the
interface changes.

Please have a look.

--
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References