Adaptive mesh generation and refinement
Project description
adaptmesh
Create triangular meshes by the adaptive process.
This is work-in-progress. I'm currently writing a short whitepaper which explains the logic behind this simple mesh generator. The basic idea is the use standard techniques from adaptive finite element methods, an arbitrary initial mesh, and a robust mesh smoothing algorithm. The next step is to make this more usable, i.e., add support for holes and tagging of boundaries. In future I hope to extend the generator to tetrahedral meshes. Stay tuned.
Installation
pip install adaptmesh
Dependencies
numpy
scipy
matplotlib
scikit-fem
Examples
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
Licensing
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 LICENSE.md
and the
respective subdirectories, i.e. ./adaptmesh/*/LICENSE
. See LICENSE.md
for
more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for adaptmesh-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5128480ee2668605a2640a0fdaa5313aea80ba9d7538da4b651e5db83e4dfc62 |
|
MD5 | 59fec0c772eee3c9fcda5661735d6443 |
|
BLAKE2b-256 | cba7d51567a63e4d9da772887e3c2d5b0d1320e7d8ced0c61ab545b1430bcc2e |