Demos don't run on Ubuntu

Asked by Andy Aschwanden on 2012-07-26

Hi,

on a recent (12.04) Ubuntu machine, with the latest Fenics dev (installed from dorsal) and the latest CBC.PDESys dev version, I'm not able to run any of the demos. All fail with a similar error message:

andy@andy-VirtualBox:~/Work/cbcpdesys/cbc/pdesys/demo$ python drivencavity_demo.py
Traceback (most recent call last):
  File "drivencavity_demo.py", line 101, in <module>
    solver = drivencavity_Solver(mesh, parameters)
  File "drivencavity_demo.py", line 16, in __init__
    PDESystem.__init__(self, [['u', 'p'], ['c']], mesh, parameters)
  File "/home/andy/Work/cbcpdesys/cbc/pdesys/PDESystem.py", line 84, in __init__
    if isinstance(problem, dolfin.cpp.mesh.Mesh):
AttributeError: 'module' object has no attribute 'mesh'

(Same is true in ipython). All required python packages (numpy, scipy, matplotlib) are installed, and the correct path has been added to PYTHONPATH.

What am I missing?

Thanks,

Andy

Question information

Language:
English Edit question
Status:
Solved
For:
CBC.PDESys Edit question
Assignee:
No assignee Edit question
Solved by:
Andy Aschwanden
Solved:
Last query:
Last reply:

Hi Andy,

Sorry about that, and thanks for letting me know. Seems like there's been a
development in dolfin that I've missed. I used to have a check
isinstance(problem, Mesh), see if that does the trick(instead of
dolfin.cpp.mesh.Mesh).

Best regards

Mikael

On Thursday, 26 July 2012, Andy Aschwanden wrote:

> New question #204286 on CBC.PDESys:
> https://answers.launchpad.net/cbcpdesys/+question/204286
>
> Hi,
>
> on a recent (12.04) Ubuntu machine, with the latest Fenics dev (installed
> from dorsal) and the latest CBC.PDESys dev version, I'm not able to run any
> of the demos. All fail with a similar error message:
>
> andy@andy-VirtualBox:~/Work/cbcpdesys/cbc/pdesys/demo$ python
> drivencavity_demo.py
> Traceback (most recent call last):
> File "drivencavity_demo.py", line 101, in <module>
> solver = drivencavity_Solver(mesh, parameters)
> File "drivencavity_demo.py", line 16, in __init__
> PDESystem.__init__(self, [['u', 'p'], ['c']], mesh, parameters)
> File "/home/andy/Work/cbcpdesys/cbc/pdesys/PDESystem.py", line 84, in
> __init__
> if isinstance(problem, dolfin.cpp.mesh.Mesh):
> AttributeError: 'module' object has no attribute 'mesh'
>
> (Same is true in ipython). All required python packages (numpy, scipy,
> matplotlib) are installed, and the correct path has been added to
> PYTHONPATH.
>
> What am I missing?
>
> Thanks,
>
> Andy
>
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
>

Andy Aschwanden (aaschwanden) said : #2

Thanks,

indeed changing line 84 in cbc/pdesys/PDESystem.py

from

if isinstance(problem, dolfin.cpp.mesh.Mesh)

to

if isinstance(problem, Mesh)

solved the problem.

Cheers,

Andy