Hi,
I used to be able to project a ufl expression into Quadrature functionspace in Fenics 2016.2.0 but that doesn't seems to be able to work in the 2017.1.0.
For example, the following code:
import dolfin as df
deg = 2
df.parameters["form_compiler"]["quadrature_degree"]=deg
df.parameters["form_compiler"]["representation"] = "uflacs"
mesh = df.UnitCubeMesh(1, 1, 1)
V = df.VectorFunctionSpace(mesh, "Lagrange", 2)
u = df.Function(V)
F = df.Identity(3) + df.grad(u)
C = F.T*F
Quadelem = df.FiniteElement("Quadrature", mesh.ufl_cell(), degree=deg, quad_scheme="default")
Quad = df.FunctionSpace(mesh, Quadelem)
e1 = df.Function(V)
ls = df.inner(e1, C*e1)
lsprj = df.project(ls, Quad)
will produce the following error:
Moving new file over differing existing file:
src: /home/likchuan/Research/fenicsheartmodel2/strippeddown/jitfailure-ffc_form_c94e290f78247dd89872cf8388ce7a628cfa6fa6 /error.log.cf6b7283b08746b1be2d9e46180c9668
dst: /home/likchuan/Research/fenicsheartmodel2/strippeddown/jitfailure- ffc_form_c94e290f78247dd89872cf8388ce7a628cfa6fa6/error.log
backup: /home/likchuan/Research/fenicsheartmodel2/strippeddown/jitfailure-ffc_form_c94e290f78247dd89872cf8388ce7a628cfa6fa6/error.log.old
Backup file exists, overwriting.
Compilation failed! Sources, command, and errors have been written to: /home/likchuan/Research/fenicsheartmodel2/strippeddown/jitfailure- ffc_form_c94e290f78247dd89872cf8388ce7a628cfa6fa6
Traceback (most recent call last):
File "test.py", line 38, in <module>
lsprj = df.project(ls, Quad)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/fem/projection.py", line 142, in project
form_compiler_parameters=form_compiler_parameters)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/fem/assembling.py", line 350, in assemble_system
A_dolfin_form = _create_dolfin_form(A_form, form_compiler_parameters)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/fem/assembling.py", line 67, in _create_dolfin_form
function_spaces=function_spaces)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/fem/form.py", line 89, in __init__
mpi_comm=mesh.mpi_comm())
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
return local_jit(*args, **kwargs)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 147, in jit
"ffc.jit failed with message:\n%s" % (tb_text,))
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/cpp/common.py", line 2214, in dolfin_error
return _common.dolfin_error(location, task, reason)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error: Unable to perform just-in-time compilation of form.
*** Reason: ffc.jit failed with message:
Traceback (most recent call last):
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 142, in jit
result = ffc.jit(ufl_object, parameters=p)
File "/home/likchuan/.hashdist/bld/profile/rwlceu6wj3pg/lib/python2.7/site-packages/ffc/jitcompiler.py", line 210, in jit
raise FFCJitError("A directory with files to reproduce the jit build failure has been created.")
FFCJitError: A directory with files to reproduce the jit build failure has been created.
.
*** Where: This error was encountered inside jit.py.
*** Process: 0
***
*** DOLFIN version: 2017.1.0
*** Git changeset:
*** -------------------------------------------------------------------------
Any help is greatly appreciated!
Thanks!