Xml file to xdmf

Hello, i have a geometry in xml format, i load deometry in fenics using df.file() command now i want to view my geometry in Para view, in xdmf / h5 format, how i get it?

from dolfin import*

import dolfin as df

import numpy as np
u = df.File(‘LA_00.xml’)

#df.Read(‘LA_ID.xml’)f_load

xdmffile_u = XDMFFile(‘LA0.xdmf’)

xdmffile_u.write(u)

Please make sure that you add a minimal working example when creating a post.

Also, make sure that you make it clear what error you are experiencing, if your code is not producing the result you expect.

1 Like