Skip to main content

CircleCI codecov PyPi Version GitHub stars

There are various mesh formats available for representing unstructured meshes, e.g.,

meshio can read and write all of these formats and smoothly converts between them. Simply call

meshio-convert input.msh output.vtu

with any of the supported formats.

In Python, simply call

points, cells, point_data, cell_data, field_data = \
    meshio.read(args.infile)

to read a mesh. To write, do

points = numpy.array([
    [0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 1.0],
    ])
cells = {
    'triangle': numpy.array([
        [0, 1, 2]
        ])
    }
meshio.write(
    'foo.vtk',
    points,
    cells,
    # Optionally provide extra data on points, cells, etc.
    # point_data=point_data,
    # cell_data=cell_data,
    # field_data=field_data
    )

For both input and output, you can optionally specify the exact file_format (in case you would like to enforce binary over ASCII VTK, for example).

Installation

meshio is available from the Python Package Index, so simply type

pip install -U meshio

to install or upgrade.

Usage

Just

import meshio

and make use of all the goodies the module provides.

Testing

To run the meshio unit tests, check out this repository and type

pytest

Distribution

To create a new release

  1. bump the __version__ number,

  2. tag and upload to PyPi:

    make publish

License

meshio is published under the MIT license.

Metadata

Release files for meshio 1.11.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for meshio 1.11.6
File Interpreter ABI Platform Actions
meshio-1.11.6-py2.py3-none-any.whl Python 3, Python 2 none any Details for meshio-1.11.6-py2.py3-none-any.whl

Release files / meshio-1.11.6-py2.py3-none-any.whl

Download URL meshio-1.11.6-py2.py3-none-any.whl
Size 48.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
29cba1f2a00fc6b28e7a8b30d95b05807a2585d3fc1a6ce08968a97c3ff8d98f
BLAKE2b-256 checksum
How to use checksums
bccb1d282897e1d951afc79696e477ebdfd8f2434f3dd168ef52544dc95fc105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for meshio 1.11.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.11.6 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page