X3DOM plots jupyter

Hello everyone.

My question is if anyone has experienced the following error upgrading to 2018.1.0 from 2017.2.0:

Executing this:

`
from IPython.display import HTML
Nr=10
Nt=125
Nz=1

Ra=1.0
Rb=2.0
Lyo=0.5
mesh = BoxMesh(Point(Ra,Lyo,0.0),Point(Ra+Rb,-Lyo,1.0),Nr, Nz, Nt)
HTML(X3DOM().html(mesh))`

Gives me the error:

TypeError: dolfin.cpp.io.X3DOM: No constructor defined!

Which does not occurs when I execute it in 2017.2.0 using jupyter running on a container.

Does anyone knows if this plot backend is not longer supported?

Thanks!

Carlos

Holy smokes! I found the answer myself!

Instead of typing

HTML(X3DOM().html(mesh)

a cell with

mesh

Does the trick! The reason is still unknown to me but hey, just to let anybody else know that this works well at least for mesh objects.

Cheerio!

Hi Carlos,

I just encountered same issue and found your trick works well for me! Thanks!

After a little bit more searching, I found

    HTML(X3DOM.html(mesh))

works too. This can be refered to 3D plotting with X3DOM in docker container

I’m not a python expert, but I’m wandering if this is related to which data type that X3DOM refered to in the fenics 2018.1.0, looks similar to the renaming of mpi_comm_world() to MPI.comm_world.

Yang

1 Like

I was able to do it in FEniCS/Docker with the sample in