ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01960
[Question #161420]: problem with python 2.7.1
New question #161420 on UFL:
https://answers.launchpad.net/ufl/+question/161420
Hi @all
i try to install fenics with ufl 0.9.0 on our hpc cluster using python 2.7.1.
As a small test, i used the poisson example
element = FiniteElement("Lagrange", triangle, 1)
u = TrialFunction(element)
v = TestFunction(element)
f = Coefficient(element)
g = Coefficient(element)
a = inner(grad(u), grad(v))*dx
L = f*v*dx + g*v*ds
This small example leads to the following problem with
ufl-analyse -w 1 Poisson.ufl
Loading form file 'Poisson.ufl'
Invalid object type <class 'ufl.algorithms.formdata.FormData'>
Traceback (most recent call last):
File "/home/anaum/deimos/local/bin/ufl-analyse", line 96, in <module>
write("\n\nForm tree formatting (preprocessed):\n", tree_format(preprocessed_form))
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ufl/algorithms/printing.py", line 130, in tree_format
error("Invalid object type %s" % type(expression))
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ufl/log.py", line 135, in error
raise self._exception_type(self._format_raw(*message))
ufl.log.UFLException: Invalid object type <class 'ufl.algorithms.formdata.FormData'>
The created logfile Poisson.ufl.log has the content
Form data:
None
Form pretty-print (original):
{ (grad(v_{-1})) : (grad(v_{-2})) } * dx0
Form pretty-print (preprocessed):
Name: 'a'
Rank: 2
Cell: <triangle cell in R2>
Topological dimension: 2
Geometric dimension: 2
Number of facets: 3
Number of coefficients: 0
Number of cell domains: 1
Number of exterior facet domains: 0
Number or interior facet domains: 0
Number of macro cell domains: 0
Number of surface domains: 0
Arguments: '[v_0, v_1]'
Coefficients: '[]'
Argument names: '[v, u]'
Coefficient names: '[]'
Unique elements: 'CG1(?)'
Unique sub elements: 'CG1(?)'
Form representation (original):
Form([Integral(Inner(Grad(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), -1)), Grad(Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), -2))), Measure('cell', 0, None))])
Form representation (preprocessed):
<ufl.algorithms.formdata.FormData object at 0x2b98a0542650>
Form tree formatting (original):
Form:
Integral:
domain type: cell
domain id: 0
integrand:
Inner
(
Grad
Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), -1)
Grad
Argument(FiniteElement('Lagrange', Cell('triangle', Space(2)), 1, None), -2)
)
If I use the same with the fenics form compiler (version 0.9.9), I get the error:
Traceback (most recent call last):
File "/home/anaum/deimos/local/bin/ffc", line 176, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/anaum/deimos/local/bin/ffc", line 157, in main
compile_form(ufd.forms, ufd.object_names, prefix, parameters)
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ffc/compiler.py", line 135, in compile_form
analysis = analyze_forms(forms, object_names, parameters)
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ffc/analysis.py", line 49, in analyze_forms
forms = tuple(_analyze_form(form, object_names, parameters, common_cell) for form in forms)
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ffc/analysis.py", line 49, in <genexpr>
forms = tuple(_analyze_form(form, object_names, parameters, common_cell) for form in forms)
File "/home/anaum/deimos/local/lib/python2.7/site-packages/ffc/analysis.py", line 117, in _analyze_form
info(str(form.form_data()))
AttributeError: 'FormData' object has no attribute 'form_data'
Currently, I don't know if the problem comes from the ffc or from ufl.
Do you have any hint, or idea to solve the problem?
If you need more information, I will see if I can provide them.
Regards
Andreas
--
You received this question notification because you are a member of UFL
Team, which is an answer contact for UFL.