Closed schnellerhase closed 3 weeks ago
I think this is rather an issue with the Paraview filter Plot Data
, than a bug in DOLFINx, as the Plot over Line
filter works just fine.
I am not sure about that being a ParaView
related problem. The Plot over Line
is not really the filter of choice for this visualization as it produces its own evaluations and thus interpolation of the data, if I'm not mistaken. So it produces in a sense its own geometry and connectivity.
I've been trying to figure out whats going on in the output files, and the connectivity data looks more then weird in parallel, but I couldn't wrap my head around it yet what exactly is causing the problem. Related or unrelated the vtkGhostType
look not right to me (at least at a first glance) either.
I am not sure what vtkGhostType really does. At least the connectivities are right (You can inspect this with spreadsheet view): When you run in parallel, several nodes have to be duplicated for visualization, as shown in: because each block inside the bp file has a local chunk of the mesh represented (in local indices, including ghost vertices).
For $np=2$ and $n=4$ I get
Note line 7 which causes the 'back connecting edge' and thus breaks the connectivity.
Ah I am using the VTKFile
output, sorry that might be the difference.
I do not think this is a bug in DOLFINx, rather an issue with the how the different file-formats interact with Paraview's PlotData feature (as plot over line works just fine). I will close this issue, but please feel free to re-open it if you disagree.
I do not get the same vtkOriginalPointIDs
with np2 and n=4
with Paraview 5.13:
from mpi4py import MPI
import numpy as np
from dolfinx import fem, io, mesh
msh = mesh.create_unit_interval(MPI.COMM_WORLD, 4)
V = fem.functionspace(msh, ("Lagrange", 1))
u = fem.Function(V)
u.interpolate(lambda x: np.sin(x[0] * np.pi))
with io.VTXWriter(msh.comm, "u.bp", u) as f:
f.write(0.0)
with io.VTKFile(msh.comm, "u.pvd", "w") as f:
f.write_function(u, 0)
Here we observe that the 7th duplicate node has the same original point index as the first node, which makes sense as they are written on different processes.
Summarize the issue
One dimensional data written in parallel produces wrong visualizations in Paraview's
Plot Data
filter.How to reproduce the bug
Run the provided code in a sequential manner (
np=1
), load theVTXWriter
output in Paraview (with theADIOS2VTXReader
) and apply thePlot Data
filter. Deselect 'User Index for XAxis' and choosePoints_X
- this produces the first error:No column X is set.
So we stick to the visualization based on indices for now. This yields the following visualization
Rerunning in parallel yields for
np=2
and for
np=4
Note: the same behavior is also observed for the
VTKFile
based output. But in this setting the x-data is parsed correctly and the visualization breaks for the 'true' representation (np=1 and np=4):Minimal Example (Python)
Output (Python)
Version
main branch
DOLFINx git commit
No response
Installation
No response
Additional information
No response