Problem with VTXWriter. How to read the results in Paraview

Hello everyone,

I am quite new to fenicsx. I am trying to make VTKWriter work. I am using ubuntu 22.04 and dolfinx version 0.7.2 . I installed fenicsx using

conda create -n fenicsx-env
conda activate fenicsx-env
conda install -c conda-forge fenics-dolfinx mpich pyvista

I am using the Poisson equation tutorial as it is from Poisson equation tutorial.

Because of the last lines in the tutorial:

#external post processing
from dolfinx import io
from pathlib import Path
results_folder = Path("results")
results_folder.mkdir(exist_ok=True, parents=True)
filename = results_folder / "fundamentals"
with io.VTXWriter(domain.comm, filename.with_suffix(".bp"), [uh]) as vtx:
    vtx.write(0.0)
with io.XDMFFile(domain.comm, filename.with_suffix(".xdmf"), "w") as xdmf:
    xdmf.write_mesh(domain)
    xdmf.write_function(uh)

I get the following files. xdmf files are fine.
Screenshot from 2023-12-12 16-26-08

But the following files are generated in the .bp folder.
Screenshot from 2023-12-12 16-27-22

How to open this data in Paraview? There are multiple options and I was unable to open it until now.

You need to have a somewhat recent version of Paraview to open the bp folder. Just go to the website of paraview and download the most recent one, and then try again.

You should not go into the directory “fundamentals.bp”.

You should select only the directory called “fundamentals.bp” then select ADIOSVTXWRITER one. (probably the second in options.)

Thank you very much :slight_smile: . That was the issue.

Thanks for the suggestion :slight_smile: . I was using 5.10 but updated it to 5.12 now. Works in both of them following the solution by @Ekrem_Ekici .

Hi dear all,

I have updated my dolfinx version (0.7.2) and wanted to do so with paraview(5.9.0).
Because I found that I cannot visualize the plot of https://fenicsproject.discourse.group/t/solving-stokes-equation-with-newtonsolver/12892/4?u=mamadou.

I go to the website and download (https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.12&type=binary&os=Linux&downloadFile=ParaView-5.12.0-RC1-MPI-Linux-Python3.10-x86_64.tar.gz.

Please let me know how to download it?

Thank you for your time and patience.

It is a zip file, download it, unzip it, and use the binary in name_of_folder/bin/paraview

1 Like

Thank you very much.