<jupyter_start><jupyter_text>Read FEniCS/Dolfin MeshesPyVista leverages `meshio`_ to read many mesh formats not natively supportedby VTK including the `FEniCS/Dolfin`_ XML format.<jupyter_code>import pyvista as pv
from pyvista import examples<jupyter_output><empty_output><jupyter_text>Let's download an example FEniCS/Dolfin mesh from our example datarepository. This will download an XML Dolfin mesh and save it to PyVista'sdata directory.<jupyter_code>saved_file, _ = examples.downloads._download_file("dolfin_fine.xml")
print(saved_file)<jupyter_output><empty_output><jupyter_text>As shown, we now have an XML Dolfin mesh save locally. This filename can bepassed directly to PyVista's :func:`pyvista.read` method to be read intoa PyVista mesh.<jupyter_code>dolfin = pv.read(saved_file)
dolfin<jupyter_output><empty_output><jupyter_text>Now we can do stuff with that Dolfin mesh!<jupyter_code>qual = dolfin.compute_cell_quality()
qual.plot(show_edges=True, cpos="xy")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.083, 'fraction_numerical': 0.0, 'mean_word_length': 8.355140186915888, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '9694', 'license': 'MIT', 'n_tokens_mistral': 352, 'n_tokens_neox': 350, 'n_words': 88, 'path': 'locale/examples/00-load/read-dolfin.ipynb', 'repo_name': 'tkoyama010/pyvista-doc-translations', 'size': '1000'}