Unable to use vertex quadrature.
Issue #184
new
I am experimenting using different quadrature orders thinking about mass lumping:
from fenics import *
mesh = UnitIntervalMesh(5)
P1 = FiniteElement("Lagrange", mesh.ufl_cell(), 1)
V = FunctionSpace(mesh, P1)
u = TestFunction(V)
v = TrialFunction(V)
mass_form = v*u*dx()
parameters["form_compiler"]["quadrature_degree"] = 1
parameters["form_compiler"]["quadrature_rule"] = "vertex"
A = assemble(mass_form)
This code doesn’t run with installation of fenics from conda-forge (see attached environment.yml file for versions. Please ask if you need more). The output is:
$ python test_short.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
------------------- Start compiler output ------------------------
/tmp/tmpvfci_326/ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365.cpp: In member function 'virtual void ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365_cell_integral_main_otherwise::tabulate_tensor(double*, const double* const*, const double*, int) const':
/tmp/tmpvfci_326/ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365.cpp:102:29: error: 'FE0_C0_Q2' was not declared in this scope
TF0[iq] = fw0 * FE0_C0_Q2[0][iq][iq];
^~~~~~~~~
/tmp/tmpvfci_326/ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365.cpp:102:29: note: suggested alternative: 'FE0_C0_D1_Q2'
TF0[iq] = fw0 * FE0_C0_Q2[0][iq][iq];
^~~~~~~~~
FE0_C0_D1_Q2
/tmp/tmpvfci_326/ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365.cpp:103:34: error: 'FE0_C0_Q2' was not declared in this scope
BF0[iq][iq] += TF0[iq] * FE0_C0_Q2[0][iq][iq];
^~~~~~~~~
/tmp/tmpvfci_326/ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365.cpp:103:34: note: suggested alternative: 'FE0_C0_D1_Q2'
BF0[iq][iq] += TF0[iq] * FE0_C0_Q2[0][iq][iq];
^~~~~~~~~
FE0_C0_D1_Q2
------------------- End compiler output ------------------------
Compilation failed! Sources, command, and errors have been written to: /localhome/scstr/Software/python-fem/cosserat-rods/jitfailure-ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365
Traceback (most recent call last):
File "test_short.py", line 14, in <module>
A = assemble(mass_form)
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/fem/assembling.py", line 198, in assemble
dolfin_form = _create_dolfin_form(form, form_compiler_parameters)
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/fem/assembling.py", line 56, in _create_dolfin_form
return Form(form,
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/fem/form.py", line 43, in __init__
ufc_form = ffc_jit(form, form_compiler_parameters=form_compiler_parameters,
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/jit/jit.py", line 47, in mpi_jit
return local_jit(*args, **kwargs)
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/jit/jit.py", line 97, in ffc_jit
return ffc.jit(ufl_form, parameters=p)
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/ffc/jitcompiler.py", line 217, in jit
module = jit_build(ufl_object, module_name, parameters)
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/ffc/jitcompiler.py", line 130, in jit_build
module, signature = dijitso.jit(jitable=ufl_object,
File "/localhome/scstr/opt/share/miniconda3/envs/fenicsproject/lib/python3.8/site-packages/dijitso/jit.py", line 216, in jit
raise DijitsoError("Dijitso JIT compilation failed, see '%s' for details"
dijitso.jit.DijitsoError: Dijitso JIT compilation failed, see '/localhome/scstr/Software/python-fem/cosserat-rods/jitfailure-ffc_form_5072eb7485423edaa06dbf68c5e1b454ee234365' for details
The jitfailure directory is attached as a zip file.
Thanks in advance for any help you can provide.
Comments (1)
-
reporter - Log in to comment
There seems to be a partial solution in Issue #145. Adding the line
seems to give working code (and the right answer) but there is a deprecation warning:
I’ll accept that for now but it would be good to know if there is a fix for this.