Skip to main content

A Python package to build, manipulate and analyze polygonal meshes.

Project description

SigmaEpsilon.Mesh - A Python Library for Polygonal Meshes

CircleCI Documentation Status License PyPI Python 3.7‒3.10 Code style: black

Warning sigmaepsilon.mesh is in the early stages of it's lifetime, and some concepts may change in the future. If you seek long-term stability, wait until version 1.0, which is planned to be released if the core concepts all seem to sit and the documentation covers all major concepts.

The sigmaepsilon.mesh library aims to provide the tools to build and analyse poligonal meshes with complex topologies. Meshes can be built like a dictionary, using arbitarily nested layouts and then be translated to other formats including VTK and PyVista. For plotting, there is also support for K3D, Matplotlib and Plotly.

The data model is built around Awkward, which makes it possible to attach nested, variable-sized data to the points or the cells in a mesh, also providing interfaces to other popular libraries like Pandas or PyArrow. Implementations are fast as implementations rely on the vector math capabilities of NumPy, while other computationally sensitive calculations are JIT-compiled using Numba.

Here and there we also use NetworkX, SciPy, SymPy and scikit-learn.

Note Implementation of the performance critical parts of the library rely on the JIT-compilation capabilities of Numba. This means that the library performs well even for large scale problems, on the expense of a longer first call.

Highlights

  • Classes to handle points, pointclouds, reference frames and jagged topologies.
  • Array-like mesh composition with a Numba-jittable database model. Join or split meshes, attach numerical data and save to and load from disk.
  • Simplified and preconfigured plotting facility using PyVista.
  • Grid generation in 1, 2 and 3 dimensions for arbitrarily structured Lagrangian cells.
  • A mechanism for all sorts of geometrical and topological transformations.
  • A customizable nodal distribution mechanism to effortlessly pass around data between points and cells.
  • Generation of Pseudo Peripheral Nodes, Rooted Level Structures and Adjancency Matrices for arbitrary polygonal meshes.
  • Symbolic shape function generation for arbitrarily structured Lagrangian cells in 1, 2 and 3 dimensions.
  • Connections to popular third party libraries.

Projects using sigmaepsilon.mesh

  • SigmaEpsilon - A Python library for computational solid mechanics.
  • PyAxisVM - The official Python package of AxisVM, a popular structural analysis and design software.

Documentation

The documentation is built with Sphinx using the PyData Sphinx Theme and hosted on ReadTheDocs. Check it out for the user guide, an ever growing set examples, and the API Reference.

Installation

sigmaepsilon.mesh can be installed from PyPI using pip on Python >= 3.7:

>>> pip install sigmaepsilon.mesh

or chechkout with the following command using GitHub CLI

gh repo clone sigma-epsilon/sigmaepsilon.mesh

and install from source by typing

>>> pip install .

If you want to run the tests, you can install the package along with the necessary optional dependencies like this

>>> pip install ".[test]"

Development mode

If you are a developer and want to install the library in development mode, the suggested way is by using this command:

>>> pip install "-e .[test, dev]"

How to contribute?

Contributions are currently expected in any the following ways:

  • finding bugs If you run into trouble when using the library and you think it is a bug, feel free to raise an issue.
  • feedback All kinds of ideas are welcome. For instance if you feel like something is still shady (after reading the user guide), we want to know. Be gentle though, the development of the library is financially not supported yet.
  • feature requests Tell us what you think is missing (with realistic expectations).
  • examples If you've done something with the library and you think that it would make for a good example, get in touch with the developers and we will happily inlude it in the documention.
  • sharing is caring If you like the library, share it with your friends or colleagues so they can like it too.

Acknowledgements

Although sigmaepsilon.mesh works without VTK or PyVista being installed, it is highly influenced by these libraries and works best with them around. Also shout-out for the developers of NumPy, Scipy, Numba, Awkward and all the third-party libraries involved in the project. Whithout these libraries the concept of writing performant, yet elegant Python code would be much more difficult.

A lot of the packages mentioned on this document here and the introduction have a citable research paper. If you use them in your work through sigmaepsilon.mesh, take a moment to check out their documentations and cite their papers.

Also, funding of these libraries is partly based on the size of the community they are able to support. If what you are doing strongly relies on these libraries, don't forget to press the :star: button to show your support.

License

This package is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigmaepsilon.mesh-0.0.3.tar.gz (8.3 MB view details)

Uploaded Source

Built Distribution

sigmaepsilon.mesh-0.0.3-py3-none-any.whl (139.4 kB view details)

Uploaded Python 3

File details

Details for the file sigmaepsilon.mesh-0.0.3.tar.gz.

File metadata

  • Download URL: sigmaepsilon.mesh-0.0.3.tar.gz
  • Upload date:
  • Size: 8.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for sigmaepsilon.mesh-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f75317b685355ef82cd30dee7d15e65a84e84584c15c525de31566ebba9a42e7
MD5 2692adf9a5d9f2612f352ff56193213e
BLAKE2b-256 afd2ecde7abf3ea66b489bf6c4bf6fae442e4c7887f65fcbdccb148ed743e8fc

See more details on using hashes here.

File details

Details for the file sigmaepsilon.mesh-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sigmaepsilon.mesh-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac405ef3d449f2163cc6dff8c90566d54edcb9d21912bf389524bccbbf7ba19
MD5 751271782acda4893cb28f6c19b2988e
BLAKE2b-256 8051f60a20e2bf192fe65c2695f61925f084ffeec6e2f70019328c6cd3f3c77e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page