Geodels / meshplex

Compute Voronoi tesselations and everything else you need.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meshplex

CircleCI codecov Code style: black PyPi Version GitHub stars

Compute Voronoi tesselations and everything else you need for finite-volume discretizations. Do it fast, too.

Usage

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.)

Installation

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

pip install -U meshplex

to install or upgrade.

Testing

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

pytest

Distribution

To create a new release

  1. bump the __version__ number,

  2. publish to PyPi and GitHub:

    make publish
    

License

meshplex is published under the MIT license.

About

Compute Voronoi tesselations and everything else you need.

License:MIT License


Languages

Language:Python 99.4%Language:Makefile 0.6%