← Back to team overview

ffc team mailing list archive

Re: broken Nedelec elements

 

Marie Rognes wrote:
Bartosz Sawicki wrote:
Hi,

I have few months break in working with Fenics. Today I've just downloaded the current version from hg repository, ad realized that my previously working code fails.

It seems that the problem is in FFC, which produce no-warning-free C++ code, especially evalute_dof() method.

The error is very easy to repeat. Just try to compile any form with Nedelec elements. For example:

# File first.form
eN = FiniteElement("Nedelec", "tetrahedron", 0)
eL = VectorElement("Lagrange","tetrahedron", 1)
v = TestFunction(eN)
u = TrialFunction(eN)
source = Function(eL)
a= dot(rot(v), rot(u))*dx
L = dot(v,source)*dx

$ ffc -l dolfin first.form

$ `pkg-config --variable=compiler dolfin` `pkg-config --cflags dolfin` -c main.cpp

first.h: In member function ‘virtual double UFC_firstBilinearForm_finite_element_1::evaluate_dof(unsigned int, const ufc::function&, const ufc::cell&) const’:
first.h:1394: warning: unused variable ‘Jinv_00’
first.h:1395: warning: unused variable ‘Jinv_01’
first.h:1396: warning: unused variable ‘Jinv_02’
first.h:1397: warning: unused variable ‘Jinv_10’
first.h:1398: warning: unused variable ‘Jinv_11’
first.h:1399: warning: unused variable ‘Jinv_12’
first.h:1400: warning: unused variable ‘Jinv_20’
first.h:1401: warning: unused variable ‘Jinv_21’
first.h:1402: warning: unused variable ‘Jinv_22’
(...)

If I comment out these lines, and everything seems to work properly, so it seems that this is just a tiny bug :)


See if it works better now.


Yes, know it works perfectly :) Thank you.

PS: ffc/compiler/format/codesnippets.py needs a clean-up (especially now ;) ).

I realized that there is no single demo in dolfin which use Nedelec. Don't you think, that it won't be such simple bugs when buildbot has a chance to find it?
I can prepare simple demo catalog, if you like.

regards,
BArtek



Follow ups

References