Unable to use FErari from FFC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
FErari |
New
|
Undecided
|
Unassigned |
Bug Description
Attempting to compile a form using tensor contraction with optimizations enabled leads to the following error. I was unable to do this with either the versions of FFC/FErari currently in precise, nor the versions in the FEniCS development PPAs:
$ ffc --optimize -r tensor --verbose mass_matrix_
This is FFC, the FEniCS Form Compiler, version 1.0.0+.
For further information, visit http://
Compiling form mass_matrix_
Compiler stage 1: Analyzing form(s)
-------
Name: 'a'
Rank: 2
Cell: <triangle cell in R2>
Topological dimension: 2
Geometric dimension: 2
Number of facets: 3
Number of coefficients: 1
Number of cell domains: 1
Number of exterior facet domains: 0
Number or interior facet domains: 0
Number or point domains: 0
Number of macro cell domains: 0
Number of surface domains: 0
Arguments: '[v_0, v_1]'
Coefficients: '[w_0]'
Argument names: '[v, u]'
Coefficient names: '[f]'
Unique elements: 'CG1(?)'
Unique sub elements: 'CG1(?)'
representation: tensor
Selecting quadrature degree based on total polynomial degree of integrand: 3
quadrature_
quadrature_rule: auto --> default
Compiler stage 1 finished in 0.00547409 seconds.
Compiler stage 2: Computing intermediate representation
-------
Computing representation of 1 elements
Computing representation of 1 dofmaps
Reusing element from cache
Computing representation of integrals
Computing tensor representation
Extracting monomial form representation from UFL form
Transforming monomial form to reference element
Reusing element from cache
Reusing element from cache
Reusing element from cache
Precomputing integrals on reference element
Reusing element from cache
27 entries computed in 0.00179 seconds
Shape of reference tensor: (3, 3, 3)
Primary multi index: rank = 2 dims = [3, 3] indices = [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]
Secondary multi index: rank = 1 dims = [3] indices = [[0], [1], [2]]
Internal multi index: rank = 0 dims = [] indices = [[]]
Secondary multi index: rank = 1 dims = [3] indices = [[0], [1], [2]]
External multi index: rank = 0 dims = [] indices = [[]]
Computing representation of forms
Compiler stage 2 finished in 0.268745 seconds.
Compiler stage 3: Optimizing intermediate representation
-------
Calling FErari to optimize tensor of size 3 x 3 x 3 (27 entries)
Compiler stage 3 finished in 0.0203249 seconds.
Compiler stage 4: Generating code
-------
Generating code for 1 element(s)
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Removing unused variable: K_11
Removing unused variable: K_10
Removing unused variable: K_01
Removing unused variable: K_00
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Removing unused variable: tmp2
Removing unused variable: tmp1
Removing unused variable: tmp7
Removing unused variable: tmp6
Removing unused variable: tmp5
Removing unused variable: tt
Removing unused variable: ss
Removing unused variable: rr
Generating code for 1 dofmap(s)
Generating code for integrals
Traceback (most recent call last):
File "/usr/bin/ffc", line 195, in <module>
sys.
File "/usr/bin/ffc", line 176, in main
compile_
File "/home/
code = generate_code(oir, prefix, parameters)
File "/home/
code_integrals = [_generate_
File "/home/
code = r.generate_
File "/home/
code[
File "/home/
t_code = _generate_
File "/home/
return _generate_
File "/home/
name = element_tensor(i, j)
File "/home/
element_tensor = lambda i, j: format["element tensor"](i)
TypeError: 'dict' object is not callable