Observed since 20 Oct, 19:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Adaptive mesh generation and refinement
Create triangular meshes by the adaptive process.
The user feeds in a polygon and a low quality mesh is created. Then the low quality mesh gets improved by adaptive finite elements and mesh smoothing. The approach is detailed in the following paper:
@article{adaptmesh,
title={A simple technique for unstructured mesh generation via adaptive finite elements},
author={Gustafsson, Tom},
volume={54},
doi={10.23998/rm.99648},
number={2},
journal={Rakenteiden Mekaniikka},
year={2021},
pages={69--79}
}
adaptmesh ships with customized versions of the following packages:
tri v0.3.1.dev0 (ported to Python 3; Copyright (c) 2015 Martijn Meijers; MIT; source)optimesh v0.6.3 (trimmed down version with minor changes to the edge
flipping; Copyright (c) 2018-2020 Nico Schlömer; the last version with MIT; source)meshplex v0.12.3 (trimmed down version with minor changes, i.e. removal of
unnecessary imports; Copyright (c) 2017-2020 Nico Schlömer; the last version with MIT; source)pip install adaptmesh
numpyscipymatplotlibscikit-femThe mesh generator is called through the function adaptmesh.triangulate.
from adaptmesh import triangulate
m = triangulate([(0., 0.),
(1., 0.),
(1., 1.),
(0., 1.),])
# m.p are the points
# m.t are the elements
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
m = triangulate([(0., 0.),
(1., 0.),
(1., 1.),
(0., 1.),],
holes=[[(.25, .25),
(.75, .25),
(.75, .75),
(.25, .75)]])
m1 = triangulate([(0., 0.),
(1., 0.),
(.7, 1.),
(0., 1.),],
split=[(1, 8),
(2, 6)],
quality=0.91)
m2 = triangulate([(0., 2.),
(2., 2.),
(2., 0.),
(1., 0.),
(.7, 1.),
(0., 1.)],
split=[(3, 8),
(4, 6)],
quality=0.91)
m = m1 + m2
Multiple meshes can be joined to emulate subdomains. However, the nodes
must match. Above, segments are splitted to facilitate the matching, e.g.,
[(1, 8), (2, 6)] means that the second and the third segments are split
using eight and six equispaced extra nodes, respectively.
The main source code of adaptmesh is distributed under the MIT License.
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.
scikit-fem>=4.scikit-fem>=3. Dependency update broke the mesh refinement.split of triangulate allows further splitting
the provided segments. This is useful because the segment endpoints are
always preserved in the final mesh.holes of triangulate allows specifying additional
polygonal areas inside the domain that will be free of triangles in the final
mesh.Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.3 | 4 Feb 2022 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:6797246ee030ce603590b3f60c5d531066904c552e31e86abed10c172adb002e