← Back to team overview

dolfin team mailing list archive

Parameters for JIT-compiled functions

 

I'm running into some problems setting parameters for JIT-compiled
functions. Here are a couple of brief examples to demonstrate what I mean:

1. Works fine:

from dolfin import *

mesh = UnitSquare(2, 2)
S = FunctionSpace(mesh, "CG", 1)
s1 = Function(S, 'A*x[0]', {'A': 2.0})
plot(s1)
s1.A # 2.0 -- Correct


2. Doesn't set values for parameter 'A' and hence gives me zeroes
everywhere:

from dolfin import *

mesh = UnitSquare(2, 2)
S = FunctionSpace(mesh, "CG", 1)
s2 = Function(S, 'A*x[0]')
s2.A = 2.0
plot(s2)
s2.A # 0.0 -- Incorrect


I think (2) used to work. Does anyone see an obvious problem?

Harish


Follow ups