Compute Voronoi tesselations and everything else you need for finite-volume discretizations. Do it fast, too.
Given a triangular or tetrahedral mesh, meshplex computes
- covolumes,
- control volumes,
- cell circumcenters,
- the surface areas,
- control volume circumcenters,
and much more.
To use meshplex, simple read a mesh (e.g., this pacman):
mesh = meshplex.read('pacman.msh')
print(mesh.node_coords)
print(mesh.control_volumes)
mesh.show()
(For mesh creation, check out pygmsh, mshr, pygalmesh, meshzoo, optimesh or any other tool.)
meshplex is available from the Python Package Index, so simply type
pip install -U meshplex
to install or upgrade.
To run the meshplex unit tests, check out this repository and type
pytest
To create a new release
-
bump the
__version__
number, -
publish to PyPi and GitHub:
make publish
meshplex is published under the MIT license.