fenics-tutorial icon indicating copy to clipboard operation
fenics-tutorial copied to clipboard

ft07 does not seem to work on Linux

Open scopatz opened this issue 5 years ago • 3 comments

I with conda install -c conda-forge fenics jupyterlab matplotlib, I am seeing the following:

$ python ft07_navier_stokes_channel.py                  
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
  File "ft07_navier_stokes_channel.py", line 118, in <module>
    error = np.abs(u_e.vector().array() - u_.vector().array()).max()
AttributeError: 'dolfin.cpp.la.PETScVector' object has no attribute 'array'

scopatz avatar Feb 06 '20 22:02 scopatz

    error = np.abs(u_e.compute_vertex_values() -
                   u_.compute_vertex_values()).max()

There's a minimally modifying version of the whole script that works in FEniCS 2019.1.0 at:

https://github.com/gdmcbain/fenics-tuto-in-skfem/blob/119258655559ab7ac6b563bf75be6923d494d2be/07_navier_stokes_channel/ft07_navier_stokes_channel1.py#L100-L101

gdmcbain avatar Feb 07 '20 02:02 gdmcbain

Thanks. That should probably be in master

scopatz avatar Feb 12 '20 21:02 scopatz

You're welcome.

I'm still waiting for the merger of #49 (it'll be a year on Friday fortnight), so I'm not sure of the protocol for getting it into master.

gdmcbain avatar Feb 12 '20 23:02 gdmcbain