Skip to main content

Adaptive mesh generation and refinement

Project description


PyPI PyPI - License

Create triangular meshes by the adaptive process.


pip install adaptmesh


  • numpy
  • scipy
  • matplotlib
  • scikit-fem


Square with default settings

from adaptmesh import triangulate

m = triangulate([(0., 0.),
                 (1., 0.),
                 (1., 1.),
                 (0., 1.),])


Non-convex shape

from adaptmesh import triangulate

m = triangulate([(0.0, 0.0),
                 (1.1, 0.0),
                 (1.2, 0.5),
                 (0.7, 0.6),
                 (2.0, 1.0),
                 (1.0, 2.0),
                 (0.5, 1.5),], quality=0.95)  # default: 0.9



The main source code of adaptmesh is distributed under the MIT License.

adaptmesh ships with customized versions of the following packages:

  • tri v0.3.1.dev0 (ported to Python 3; MIT)
  • optimesh v0.6.2 (trimmed down version with minor changes to the edge flipping; the last version with MIT)
  • meshplex v0.12.3 (trimmed down version with minor changes, i.e. removal of unnecessary imports; the last version with MIT)

The licenses of the included packages can be found also in and the respective subdirectories, i.e. ./adaptmesh/*/LICENSE. See for more information.

Project details

Download files

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

Files for adaptmesh, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size adaptmesh-0.1.1-py3-none-any.whl (44.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size adaptmesh-0.1.1.tar.gz (41.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page