Error estimation DOLFIN wrapper for FFC broken

Bug #1086580 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
High
Marie Rognes

Bug Description

The demos

    demo/undocumented/auto-adaptive-poisson/cpp
    demo/undocumented/auto-adaptive-navier-stokes/cpp

fail to build after re-generating the UFL input using FFC. I get errors like:

    demo/undocumented/auto-adaptive-poisson/cpp/AdaptivePoisson.h:14200:9: error: ‘Form_8’ does not name a type

At the end of AdaptivePoisson.h there is:

   typedef Form_8 BilinearForm;

but there is no class 'Form_8'. There is a

    class adaptivepoisson_form_8

This might come from some recent UFL changes.

The broken demos are presently commented out.

Changed in dolfin:
assignee: nobody → Marie Rognes (meg-simula)
Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

The name adaptivepoisson_form_8 is not made by UFL, neither is the counting of forms (form #8), this must be an FFC issue. Probably caused by the regression fix I did in late august to make ffc use the form names that have always been provided by ufl (ffc -r1754).

How is this supposed to be compiled? Compiling with ffc -l dolfin I get different errors on make:

martinal@martinal-mac:~/dev/fenics/dolfin/work/demo/undocumented/auto-adaptive-poisson/cpp$ make
...
/home/martinal/dev/fenics/dolfin/work/demo/undocumented/auto-adaptive-poisson/cpp/main.cpp:68:3: error: ‘LinearForm’ is not a member of ‘AdaptivePoisson’

This is because the forms L and M in the .ufl file are both linear forms, and therefore no single LinearForm typedef can be made.

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

It was documented in the navier stokes demo, ffc -e -l dolfin.

Changed in dolfin:
status: New → Confirmed
importance: Undecided → High
milestone: none → 1.1.0
Revision history for this message
Marie Rognes (meg-simula) wrote :

Yes, to generate error control forms and wrappers, compile with

  ffc -e -l dolfin

I'll add this comment to the auto-adaptive-poisson demo too, and fix the naming issue
by using Form_a/L instead of Form_8/9 (there are already some assumptions
on the forms for the error control stuff).

But Martin, the form 'M' does not appear as Form_M, do you know why?

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

It does if you do just ffc -l dolfin:

martinal@martinal-mac:~/dev/fenics/dolfin/work/demo/undocumented/auto-adaptive-poisson/cpp$ egrep 'class Form_' *.h
class Form_a_FunctionSpace_0: public dolfin::FunctionSpace
class Form_a_FunctionSpace_1: public dolfin::FunctionSpace
class Form_a: public dolfin::Form
class Form_L_FunctionSpace_0: public dolfin::FunctionSpace
class Form_L: public dolfin::Form
class Form_M_FunctionSpace_0: public dolfin::FunctionSpace
class Form_M: public dolfin::Form

so my guess is that maybe the error control code overwrites form_data.name 'M' with 10 in this case?

martinal@martinal-mac:~/dev/fenics/dolfin/work/demo/undocumented/auto-adaptive-poisson/cpp$ egrep 'class Form_' *.h | grep -v FunctionSpace
class Form_0: public dolfin::Form
class Form_1: public dolfin::Form
class Form_2: public dolfin::Form
class Form_3: public dolfin::Form
class Form_4: public dolfin::Form
class Form_5: public dolfin::Form
class Form_6: public dolfin::Form
class Form_7: public dolfin::Form
class Form_a: public dolfin::Form
class Form_L: public dolfin::Form
class Form_10: public dolfin::GoalFunctional

Revision history for this message
Marie Rognes (meg-simula) wrote :

Ok, thanks, will dig.

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

I think I see why. In the poisson demo the form M is a linear form M=u*dx where u is a TrialFunction, so I guess you create a new form and replace u with a Coefficient, and the name does not carry over.

Haven't looked at the code though. We have a workshop soon so I don't have more time for this now.

Revision history for this message
Marie Rognes (meg-simula) wrote :

This should be fixed now in the branch lp:~dolfin-core/dolfin/agec-fixes-051212. However, at the moment my dolfin doesn't seem to compile..., so I'll have to sort out some issues before testing and pushing.

Revision history for this message
Marie Rognes (meg-simula) wrote :

This should be fixed now, but I have not regenerated the form files because of dolfin::uint issues. I didn't see where these demos were commented out, so I haven't commented them back in.

Changed in dolfin:
status: Confirmed → Fix Committed
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.