not able to repeat solution for stokes-topology.py
Issue #72
new
Hi dolfin-adjoint developers,
I am currently learning this software. When I tried the stokes-topology.py example from dolfin-adjoint/examples/stokes-topology/, I got some TypeError. Since I did not installed mumps, I executed directly with python:
python stokes-topology.py
However, I got the error:
Traceback (most recent call last):
File "stokes-topology.py", line 174, in <module>
w = forward(rho)
File "stokes-topology.py", line 161, in forward
bc = DirichletBC(W.sub(0), InflowOutflow(), "on_boundary")
File "/home/bingxiao/anaconda2/envs/fenicsproject/lib/python2.7/site-packages/dolfin/functions/expression.py", line 268, in __init__
degree, cell)
File "/home/bingxiao/anaconda2/envs/fenicsproject/lib/python2.7/site-packages/dolfin/functions/expression.py", line 863, in _auto_select_element_from_shape
raise TypeError("Expression needs an integer argument 'degree' if no 'element' is provided.")
TypeError: Expression needs an integer argument 'degree' if no 'element' is provided.
As a new learner, I do not know how to fix this problem.
I use 2016.2.0 both fenics and dolfin-adjoint. Many thanks in advance!
I think you need to pass some integer to InflowOutflow(). Have you tried it?