Metadata-Version: 2.1
Name: sigmaepsilon.mesh
Version: 0.0.1
Summary: A Python package to build, manipulate and analyze polygonal meshes.
Author-email: SigmaEpsilon <bencebalogh@sigmaepsilon.com>
Maintainer-email: SigmaEpsilon <bencebalogh@sigmaepsilon.com>
License: MIT License
        
        Copyright (c) 2021 SigmaEpsilon
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/sigma-epsilon/sigmaepsilon.mesh
Keywords: engineering,mathematics,optimization,vector,tensor,vector algebra,tensor algebra,symbolic mathematics,nonlinear optimization
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: <3.11,>=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: packaging
Requires-Dist: toml
Requires-Dist: setuptools (>=65.5.1)
Requires-Dist: wheel (>=0.38.0)
Requires-Dist: linkeddeepdict (>=1.1.0)
Requires-Dist: sigmaepsilon.core (>=0.0.1)
Requires-Dist: sigmaepsilon.math (>=0.0.1)
Requires-Dist: fsspec (>=2023.1.0)
Requires-Dist: sectionproperties (>=2.1.3)
Requires-Dist: meshio
Provides-Extra: dev
Requires-Dist: networkx (>=3.0) ; extra == 'dev'
Requires-Dist: matplotlib ; extra == 'dev'
Requires-Dist: vtk ; extra == 'dev'
Requires-Dist: pyvista ; extra == 'dev'
Requires-Dist: sectionproperties ; extra == 'dev'
Requires-Dist: pythreejs ; extra == 'dev'
Requires-Dist: ipyvtklink ; extra == 'dev'
Requires-Dist: pandas ; extra == 'dev'
Requires-Dist: plotly ; extra == 'dev'
Requires-Dist: tetgen ; extra == 'dev'
Requires-Dist: autopep8 ; extra == 'dev'
Requires-Dist: awkward ; extra == 'dev'
Requires-Dist: pyarrow ; extra == 'dev'
Provides-Extra: devops
Requires-Dist: autopep8 ; extra == 'devops'
Requires-Dist: flake8 ; extra == 'devops'
Requires-Dist: pytest ; extra == 'devops'
Requires-Dist: pytest-cov ; extra == 'devops'
Provides-Extra: docs
Requires-Dist: ipython ; extra == 'docs'
Requires-Dist: myst-parser ; extra == 'docs'
Requires-Dist: nbsphinx ; extra == 'docs'
Requires-Dist: sphinx-gallery ; extra == 'docs'
Requires-Dist: sphinx-copybutton ; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex ; extra == 'docs'
Requires-Dist: nbsphinx-link ; extra == 'docs'
Requires-Dist: sphinxcontrib-svg2pdfconverter ; extra == 'docs'
Requires-Dist: sphinx-design ; extra == 'docs'
Requires-Dist: sphinx-inline-tabs ; extra == 'docs'
Requires-Dist: pydata-sphinx-theme ; extra == 'docs'
Requires-Dist: pyvista ; extra == 'docs'
Requires-Dist: pandas ; extra == 'docs'
Requires-Dist: tetgen ; extra == 'docs'
Requires-Dist: matplotlib ; extra == 'docs'
Requires-Dist: plotly ; extra == 'docs'
Requires-Dist: k3d ; extra == 'docs'
Requires-Dist: dewloosh.mpl ; extra == 'docs'
Requires-Dist: setuptools (>=65.5.1) ; extra == 'docs'
Provides-Extra: test
Requires-Dist: pyvista ; extra == 'test'
Requires-Dist: tetgen ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: coverage ; extra == 'test'
Requires-Dist: pandas ; extra == 'test'
Requires-Dist: pyarrow ; extra == 'test'
Requires-Dist: networkx (>=3.0) ; extra == 'test'
Requires-Dist: k3d ; extra == 'test'
Requires-Dist: setuptools (>=65.5.1) ; extra == 'test'
Requires-Dist: wheel (>=0.38.0) ; extra == 'test'

# **SigmaEpsilon.Mesh** - A Python Library for Polygonal Meshes

![ ](logo.png)

[![CircleCI](https://circleci.com/gh/dewloosh/sigmaepsilon.mesh.svg?style=shield)](https://circleci.com/gh/dewloosh/sigmaepsilon.mesh)
[![Documentation Status](https://readthedocs.org/projects/sigmaepsilon.mesh/badge/?version=latest)](https://sigmaepsilon.mesh.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI](https://badge.fury.io/py/sigmaepsilon.mesh.svg)](https://pypi.org/project/sigmaepsilon.mesh)
[![Python 3.7‒3.10](https://img.shields.io/badge/python-3.7%E2%80%923.10-blue)](https://www.python.org)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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](https://sigmaepsilon.mesh.readthedocs.io/en/latest/) 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](https://vtk.org/) and [PyVista](https://docs.pyvista.org/). For plotting, there is also support for [K3D](http://k3d-jupyter.org/), [Matplotlib](https://matplotlib.org/) and [Plotly](https://plotly.com/python/).

The data model is built around [Awkward](https://awkward-array.org/doc/main/), 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](https://vtk.org/) or [PyArrow](https://arrow.apache.org/docs/python/index.html). Implementations are fast as implementations rely on the vector math capabilities of [NumPy](https://numpy.org/doc/stable/index.html), while other computationally sensitive calculations are JIT-compiled using [Numba](https://numba.pydata.org/).

Here and there we also use [NetworkX](https://networkx.org/documentation/stable/index.html#), [SciPy](https://scipy.org/), [SymPy](https://www.sympy.org/en/index.html) and [scikit-learn](https://scikit-learn.org/stable/).

> **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](https://github.com/dewloosh/SigmaEpsilon) - A Python library for computational solid mechanics.
- [PyAxisVM](https://github.com/AxisVM/pyaxisvm) - The official Python package of [AxisVM](https://axisvm.eu/), a popular structural analysis and design software.

## Documentation

The [documentation](https://sigmaepsilon.mesh.readthedocs.io/en/latest/) is built with [Sphinx](https://www.sphinx-doc.org/en/master/) using the [PyData Sphinx Theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html) and hosted on [ReadTheDocs](https://readthedocs.org/). 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:

```console
>>> pip install sigmaepsilon.mesh
```

## Testing

```console
>>> python -m unittest
```

## 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](https://opensource.org/license/mit/).
