On 03/11/2013 09:53 AM, Marie Rognes wrote:
> (1) Try specifying the degree for the Expression (help(Expression)):
>
> psiexpr = Expression("x[0]*x[0] + 2*x[1]*x[1]", degree=2)
>
> (2) Run instant-clean
>
> (3) See if the results are more as expected
>
> [(2) should not be necessary, but that might be a separate bug]
On might get the impression that the generated C++ Expression relies on
the degree. That is not the case. Only the form which uses the
expression, should be recompiled. Which seems to be the case, btw:
from dolfin import *
mesh = UnitSquareMesh(2,2)
# Triggers JIT compilation
e = Expression("x[0]+x[1]", degree=1)
On 03/11/2013 09:53 AM, Marie Rognes wrote: "x[0]*x[ 0] + 2*x[1]*x[1]", degree=2)
> (1) Try specifying the degree for the Expression (help(Expression)):
>
> psiexpr = Expression(
>
> (2) Run instant-clean
>
> (3) See if the results are more as expected
>
> [(2) should not be necessary, but that might be a separate bug]
On might get the impression that the generated C++ Expression relies on
the degree. That is not the case. Only the form which uses the
expression, should be recompiled. Which seems to be the case, btw:
from dolfin import * "x[0]+x[ 1]", degree=1)
mesh = UnitSquareMesh(2,2)
# Triggers JIT compilation
e = Expression(
# Triggers JIT compilation
assemble(e*dx, mesh=mesh)
# No not trigger JIT compilation "x[0]+x[ 1]", degree=4)
e = Expression(
# Triggers JIT compilation
assemble(e*dx, mesh=mesh)
Johan