-
Notifications
You must be signed in to change notification settings - Fork 7
v0.2.0: Major Revamp & Modernization #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 39 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8994899
Refactor package structure and modernize dependencies
popersson 9e4858f
show function for DMesh
popersson 7ba3fa3
Default Int32
popersson 0ba197b
Major documentation update: New file structure, automated scripts for…
popersson 07770b5
Plots extension, updated examples and docs.
popersson 6645d26
examples moved to the examples/ directory
popersson 22ad022
Rename obscure vector short-hands to more common Point2, Index2, Index3
popersson 86a9e07
Fixed live-plotting with internal do-nothing function and warning.
popersson 7f11857
CairoMakie and GLMakie support.
popersson 040ce74
Rename Point2 -> Point2d to be consistent with GeometryBasics
popersson dde65ad
Minor plotting tweaks.
popersson 9344bb3
Major Gemini pass on the doc strings
popersson c35ba9e
Various improvements of meshutils.
popersson ed82a6a
Rewriting of README and first section of docs.
popersson 418025e
Minor docs update.
popersson 7d72ef1
Fix inconsistent figure sizes in docs.
popersson a27569c
New subsection outlines.
popersson 70ffd4e
Added implicit function example.
popersson a6ed80b
Remove CairoMakie from doc build.
popersson d8be8e4
Run all scripts in examples/ as part of the unit tests.
popersson 9a8bcfd
Relicense project from GPL to MIT
popersson eb38535
Added more unit tests for distmesh2d
popersson a18446a
More docs and docstring examples.
popersson 80d9f97
Many minor changes to docs and examples.
popersson e14ef73
Another try on CairoMakie for all docs.
popersson 6e9b036
CI build docs on new dev branch.
popersson f5b09ce
Add Literate.jl dependency.
popersson 156c907
Added StaticArrays dependency.
popersson c563daa
Resolve case-insensitive name conflict (for Windows/MacOS).
popersson 2db7d0b
Mesh utilities: Improvements, name changes, docstrings.
popersson ea0c1c5
Figure size updates in docs.
popersson c81a833
Remove legacy N-D code and finalize v0.2.0 transition
popersson 1c0feb2
Adding back weak dependency on GeometryBasics (for the GLMakie extens…
popersson 8ba401f
Merge branch 'master' into v0.2-revamp
ViralBShah dad2ad0
Adding missing GeometryBasics dependency in main Project.toml.
popersson f87eb49
Add examples environment with frozen dependencies
popersson 3c037f6
Merge branch 'master' into v0.2-revamp
ViralBShah 6188528
Use v1 of Documenter always.
ViralBShah 9626a63
Merge branch 'v0.2-revamp' of github.com:JuliaGeometry/DistMesh.jl in…
ViralBShah 7d81f5a
Update examples/002-naca_airfoil.jl
ViralBShah 24a1c47
Update examples/002-naca_airfoil.jl
ViralBShah 95a7f00
Update .github/workflows/ci.yml
ViralBShah eb5a894
Revert "Update .github/workflows/ci.yml"
ViralBShah 43382c4
Address Copilot feedback: fix unreachable code and edge cases
popersson bbc6cef
Remove examples manifest and move readme image to docs assets
popersson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,37 @@ | ||
| name = "DistMesh" | ||
| uuid = "f7ee28b6-bfbf-11e9-3e31-8961b86f052c" | ||
| authors = ["Steve Kelly <kd2cca@gmail.com>"] | ||
| version = "0.1.0" | ||
| license = "MIT" | ||
| version = "0.2.0" | ||
| authors = ["Per-Olof Persson <persson@berkeley.edu>"] | ||
|
|
||
| [deps] | ||
| GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" | ||
| Delaunator = "466f8f70-d5e3-4806-ac0b-a54b75a91218" | ||
| LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
| TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea" | ||
| StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
|
|
||
| [weakdeps] | ||
| GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" | ||
| CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" | ||
| GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" | ||
| Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
|
|
||
| [extensions] | ||
| DistMeshCairoMakieExt = "CairoMakie" | ||
| DistMeshGLMakieExt = ["GLMakie", "GeometryBasics"] | ||
| DistMeshPlotsExt = "Plots" | ||
|
|
||
| [compat] | ||
| julia = "1.6" | ||
| GeometryBasics = "0.4" | ||
| TetGen = "1" | ||
| CairoMakie = "0.15" | ||
| Delaunator = "0.1" | ||
| GLMakie = "0.11, 0.12, 0.13" | ||
| LinearAlgebra = "1" | ||
| Plots = "1" | ||
| StaticArrays = "1.9" | ||
| julia = "1.10" | ||
|
|
||
| [extras] | ||
| GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" | ||
| CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" | ||
| Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
| TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea" | ||
|
|
||
| [targets] | ||
| test = ["Test", "GeometryBasics", "TetGen"] | ||
| test = ["Test", "CairoMakie"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,66 @@ | ||
| # DistMesh | ||
| # DistMesh.jl | ||
|
|
||
| [](https://distmesh.juliageometry.org/dev) | ||
| [](https://codecov.io/gh/juliageometry/DistMesh.jl) | ||
|
|
||
| The package provides a Julia port of the [DistMesh](http://persson.berkeley.edu/distmesh/) algorithm developed by [Per-Olof Persson](http://persson.berkeley.edu/). | ||
| **DistMesh.jl** is a Julia generator for unstructured triangular and tetrahedral meshes. It uses [Signed Distance Functions](https://en.wikipedia.org/wiki/Signed_distance_function) (SDFs) to define geometries, enabling the generation of high-quality, isotropic meshes for complex shapes defined by simple mathematical functions. | ||
|
|
||
| There have been several improvements made to improve performance and output quality from the original Matlab version. | ||
| Primary use cases include Finite Element Analysis (FEA), computational fluid dynamics, and geometric modeling. | ||
|
|
||
| [Technical Report](https://sjkellyorg.files.wordpress.com/2020/11/distmesh_sjkelly.pdf) | ||
| --- | ||
|
|
||
| ## Note on Version 0.2.0 | ||
|
|
||
| Version 0.2.0 represents a major rewrite of `DistMesh.jl`, focusing on replicating the original 2D code but with better performance, native Julia implementations, and integration with the Makie/Plots ecosystems. **This version is now fully MIT licensed.** | ||
|
|
||
| **Legacy Support:** The original N-dimensional meshing code port has been retired in this version to allow for a cleaner architecture. If you require the legacy `distmeshnd` functionality, please pin your package version to v0.1: | ||
|
|
||
| ```julia | ||
| ] add DistMesh@0.1 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Quick Start | ||
|
|
||
| The core function `distmesh2d` generates a mesh based on a distance function, a relative size function, an initial edge length, and a bounding box. | ||
|
|
||
| The code below generates a mesh of the unit circle: | ||
|
|
||
| ```julia | ||
| using DistMesh | ||
|
|
||
| # Generate mesh: Distance function, size function, resolution, bounding box | ||
| msh = distmesh2d(dcircle, huniform, 0.2, ((-1,-1), (1,1))) | ||
| ``` | ||
|
|
||
| ```text | ||
| DMesh: 2D, 88 nodes, 143 triangle elements | ||
| ``` | ||
|
|
||
| Optionally, the mesh can be visualized using various plotting packages: | ||
|
|
||
| ```julia | ||
| using GLMakie # or Plots, or CairoMakie | ||
|
|
||
| plot(msh) | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| For more details and extensive examples, please see the [DistMesh documentation](https://distmesh.juliageometry.org). | ||
|
|
||
| --- | ||
|
|
||
| ## Background | ||
|
|
||
| This package is a Julia port of the [DistMesh](http://persson.berkeley.edu/distmesh/) algorithm developed by [Per-Olof Persson](http://persson.berkeley.edu/). Significant improvements have been made to performance and type stability compared to the original MATLAB implementation. The algorithm is described in the following publications: | ||
|
|
||
| * P.-O. Persson, G. Strang, *[A Simple Mesh Generator in MATLAB](https://persson.berkeley.edu/distmesh/persson04mesh.pdf)*. SIAM Review, Volume 46 (2), pp. 329-345, June 2004. | ||
| * P.-O. Persson, *[Mesh Generation for Implicit Geometries](https://persson.berkeley.edu/thesis/persson-thesis-color.pdf)*. Ph.D. thesis, Department of Mathematics, MIT, Dec 2004. | ||
|
|
||
| --- | ||
|
|
||
| ## Related Packages | ||
|
|
||
| Several other implementations of the DistMesh algorithm exist in the Julia ecosystem, including [DistMesh-Julia](https://github.com/precise-simulation/distmesh-julia) and [DistMesh2D.jl](https://juliapackages.com/p/distmesh2d). Please consider checking these packages if DistMesh.jl does not meet your specific requirements. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| [deps] | ||
| CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" | ||
| DistMesh = "f7ee28b6-bfbf-11e9-3e31-8961b86f052c" | ||
| Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
| GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" | ||
| Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" | ||
| StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
|
|
||
| [compat] | ||
| CairoMakie = "0.15" | ||
| Documenter = "1" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.