File sizes I/O speed Maximum memory usage Installation The red lines mark the size of the mesh in memory. The comparisons here are for a triangular mesh with about 900k points and 1.8M You can now open all meshio-supported files in ParaView. ~/.local/share/paraview-5.9/plugins/) and load it under Tools / Manage Plugins / Load New
Find the file paraview-meshio-plugin.py of your meshio installation (on Linux:.Install meshio for the Python major version that ParaView uses (check pvpython -version).If you have downloaded a binary version of ParaView, you may proceed as follows. num_steps ): t, point_data, cell_data = reader. read_points_cells () for k in range ( reader. TimeSeriesReader ( filename ) as reader : points, cells = reader. point_data = )Īnd read it with with meshio. Mesh ( points, cells, # Optionally provide extra data on points, cells, etc. To write, do import meshio # two triangles and one quad points =, ,, ,, , ] cells =, ]), ( "quad", ]), ] mesh = meshio. read ( filename, # string, os.PathLike, or a buffer/open file # file_format="stl", # optional if filename is a path inferred from extension # see meshio-convert -h for all possible formats ) # mesh.points, mesh.cells, mesh.cells_dict. In Python, simply do import meshio mesh = meshio. Meshio ascii input.msh # convert to ASCII format Meshio binary input.msh # convert to binary format Meshio decompress input.vtu # decompress the mesh file Meshio compress input.vtu # compress the mesh file Meshio info input.xdmf # show some info about the mesh You can then use the command-line tool meshio convert input.msh output.vtk # convert between two formats ( Here's a little survey on which formats are actually Meshio can read and write all of the following and smoothly converts between them: There are various mesh formats available for representing unstructured meshes.