Any help would be much appreciated as I cannot get this to work no matter what. I am running FEniCS 2019.1.0 (legacy latest version) in ubuntu 22.04.01 with anaconda. I installed using conda-forge in the ubuntu terminal.
Whenever I try to open a .xdmf file in any version of Paraview (tried numerous versions), Paraview crashes using the XDMFReaderS or T options, and doesn’t crash with just XDMFReader - but produces this error when I hit apply:
ERROR: In vtkXdmfReader.cxx, line 487
vtkXdmfReader (00000282C61832C0): Failed to read data.ERROR: In vtkExecutive.cxx, line 741
vtkPVCompositeDataPipeline (00000282C580C470): Algorithm vtkFileSeriesReader (00000282D4036890) returned failure for request: vtkInformation (00000282FC6AE360)
Debug: Off
Modified Time: 420096
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0ERROR: In vtkXdmfReader.cxx, line 487
vtkXdmfReader (00000282FE17C690): Failed to read data.ERROR: In vtkExecutive.cxx, line 741
vtkPVCompositeDataPipeline (00000282FD1E4E50): Algorithm vtkFileSeriesReader (00000282FC902380) returned failure for request: vtkInformation (00000282FDDD6AC0)
Debug: Off
Modified Time: 1145751
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
Here is my MWE:
from fenics import *
mesh = UnitSquareMesh(32, 32)
V = FunctionSpace(mesh, “Lagrange”, 1)def boundary(x):
return x[0] < DOLFIN_EPS or x[0] > 1.0 - DOLFIN_EPSu0 = Constant(0.0)
bc = DirichletBC(V, u0, boundary)u = TrialFunction(V)
v = TestFunction(V)
f = Expression(“10exp(-(pow(x[0] - 0.5, 2) + pow(x[1] - 0.5, 2)) / 0.02)", degree=2)
g = Expression("sin(5x[0])”, degree=2)
a = inner(grad(u), grad(v))dx
L = fvdx + gv*dsu = Function(V)
solve(a == L, u, bc)file = File(“poisson.pvd”)
file << upoissonfile = XDMFFile(“poissonFile.xdmf”)
poissonfile.write(u)
I have tried many different programs with xdmf files and all do the same issue. PVDs work fine. Please can anyone help?