Package: sigmaepsilon.mesh
SigmaEpsilon.Mesh- Data Structures, Computation and Visualization for Complex Polygonal Meshes in PythonThesigmaepsilon.meshlibrary 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 includingVTKandPyVista. For plotting, there is also support forK3D,MatplotlibandPlotly.The data model is built aroundAwkward, 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 likePandasorPyArrow. Implementations are fast as they rely on the vector math capabilities ofNumPy, while other computationally sensitive calculations are JIT-compiled usingNumba.Here and there we also useNetworkX,SciPy,SymPyandscikit-learn.NoteImplementation 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.HighlightsClasses 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 ofPseudo Peripheral Nodes,Rooted Level StructuresandAdjancency Matricesfor arbitrary polygonal meshes.Symbolic shape function generation for arbitrarily structured Lagrangian cells in 1, 2 and 3 dimensions with an extendible interpolation and extrapolation mechanism.Connections to popular third party libraries likenetworkx,pandas,vtk,PyVistaand more.The ability to read from a wide range of formats thanks to the combined power ofvtk,PyVistaandmeshio.Projects using sigmaepsilon.meshSigmaEpsilon.Solid- A Python library for computational solid mechanics.PyAxisVM- The official Python package ofAxisVM, a popular structural analysis and design software.DocumentationThedocumentationis built withSphinxusing thePyData Sphinx Themeand hosted onReadTheDocs. Check it out for the user guide, an ever growing set of examples, and API Reference.Installationsigmaepsilon.mesh can be installed from PyPI usingpipon Python >= 3.7:>>> pip install sigmaepsilon.meshor chechkout with the following command using GitHub CLIgh repo clone sigma-epsilon/sigmaepsilon.meshand 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 modeIf 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]"Checking your installationYou should be able to import sigmaepsilon.mesh from the Python prompt:$pythonPython 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import sigmaepsilon.mesh>>> sigmaepsilon.mesh.__version__'2.2.0'Testing and coverageThe following command runs all tests and creates a html report in a folder namedhtmlcov(the settings are governed by the.coveragercfile):python -m pytest --cov-report html --cov-config=.coveragerc --cov sigmaepsilon.meshOpenhtmlcov/index.htmlto see the results.Changes and versioningSee thechangelog, for the most notable changes between releases.The project adheres tosemantic versioning.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.In all cases, read thecontributing guidelinesbefore you do anything.AcknowledgementsAlthoughsigmaepsilon.meshworks withoutVTKorPyVistabeing installed, it is highly influenced by these libraries and works best with them around. Also shout-out for the developers ofNumPy,Scipy,Numba,Awkward,meshioand 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.LicenseThis package is licensed under theMIT license.