← Back to team overview

ffc team mailing list archive

Re: FFC/jit options

 

Quoting Johan Hake <hake@xxxxxxxxx>:

> On Wednesday 16 July 2008 22:52:21 Anders Logg wrote:
> > On Wed, Jul 16, 2008 at 06:01:24PM +0200, Kristian Oelgaard wrote:
> > > Hi,
> > >
> > > Why does the jit compiler use pop() when extracting options? e.g.,
> > >
> > >   representation = options.pop("representation", FFC_REPRESENTATION)
> > >
> > > this means that if I do:
> > >
> > > def compile_form(form, options):
> > >     (compiled_form, module, form_data) = jit(form, options)
> > >
> > > options = {"representation":"quadrature"}
> > >
> > > for form in forms:
> > >   compile_form(form, options)
> > >
> > > the second time I call jit options = {} which is clearly not what I
> want.
> > >
> > > Kristian
> >
> > Ooops. Not my fault, I just merged it. :-)
> 
> Yupp, my fault! Sorry for that one. I must have thought I was dealing with a
> 
> copied dictionary!

That's what happens, it appears to be working now. If working is defined as
doing what I want it to. :)

Kristian
 
> Johan
> 
> > See if it looks better now.
> 
> 
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
> 




References