-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Support Matrix page * Add page for algorithms * Add page for example usage * Remove support matrix from README
- Loading branch information
1 parent
d0248d3
commit 450cc1d
Showing
5 changed files
with
99 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Integration Algorithms | ||
|
||
## Gauss-Kronrod | ||
|
||
```@docs | ||
MeshIntegrals.GaussKronrod | ||
``` | ||
|
||
## Gauss-Legendre | ||
|
||
```@docs | ||
MeshIntegrals.GaussLegendre | ||
``` | ||
|
||
## H-Adaptive Cubature | ||
|
||
```@docs | ||
MeshIntegrals.HAdaptiveCubature | ||
``` |
This file contains 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,38 +1,51 @@ | ||
# Support Matrix | ||
|
||
| Symbol | Meaning | | ||
While this library aims to support all possible integration algorithms and **Meshes.jl** | ||
geometry types, some combinations are ill-suited and some others are simplu not yet | ||
implemented. The following Support Matrix aims to capture the current development state of | ||
all geometry/algorithm combinations. Entries with a green check mark are fully supported | ||
and have passing unit tests that provide some confidence they produce accurate results. | ||
|
||
In general, Gauss-Kronrod integration rules are recommended (and the default) for geometries | ||
with one parametric dimension, e.g.: `Segment`, `BezierCurve`, and `Rope`. Gauss-Kronrod | ||
rules can also be applied to some geometries with more dimensions by nesting multiple | ||
integration solves, but this is inefficient. These Gauss-Kronrod rules are supported (but | ||
not recommended) for surface-like geometries, but not for volume-like geometries. For | ||
geometries with more than one parametric dimension, e.g. surfaces and volumes, H-Adaptive | ||
Cubature integration rules are recommended (and the default). | ||
|
||
| Symbol | Support Level | | ||
|--------|---------| | ||
| :white_check_mark: | Implemented, passes tests | | ||
| :x: | Not yet supported | | ||
| :stop_sign: | Not supported | | ||
| ✅ | Supported, passes unit tests | | ||
| 🎗️ | Planned to support in the future | | ||
| 🛑 | Not supported | | ||
|
||
### Integral | ||
| Geometry | Gauss-Legendre | Gauss-Kronrod | H-Adaptive Cubature | | ||
| `Meshes.Geometry` | Gauss-Legendre | Gauss-Kronrod | H-Adaptive Cubature | | ||
|----------|----------------|---------------|---------------------| | ||
| `Ball` in `𝔼{2}` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Ball` in `𝔼{3}` | :white_check_mark: | :stop_sign: | :white_check_mark: | | ||
| `BezierCurve` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Box` in `𝔼{1}` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Box` in `𝔼{2}` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Box` in `𝔼{3}` | :white_check_mark: | :stop_sign: | :white_check_mark: | | ||
| `Circle` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Cone` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `ConeSurface` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Cylinder` | :white_check_mark: | :stop_sign: | :white_check_mark: | | ||
| `CylinderSurface` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Disk` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Frustum` | :stop_sign: | :stop_sign: | :stop_sign: | | ||
| `FrustumSurface` | :stop_sign: | :stop_sign: | :stop_sign: | | ||
| `Line` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `ParaboloidSurface` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Plane` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Ray` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Ring` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Rope` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Segment` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `SimpleMesh` | :x: | :x: | :x: | | ||
| `Sphere` in `𝔼{2}` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Sphere` in `𝔼{3}` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Tetrahedron` in `𝔼{3}` | :x: | :white_check_mark: | :x: | | ||
| `Triangle` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Torus` | :white_check_mark: | :white_check_mark: | :white_check_mark: | | ||
| `Ball` in `𝔼{2}` | ✅ | ✅ | ✅ | | ||
| `Ball` in `𝔼{3}` | ✅ | 🛑 | ✅ | | ||
| `BezierCurve` | ✅ | ✅ | ✅ | | ||
| `Box` in `𝔼{1}` | ✅ | ✅ | ✅ | | ||
| `Box` in `𝔼{2}` | ✅ | ✅ | ✅ | | ||
| `Box` in `𝔼{3}` | ✅ | 🛑 | ✅ | | ||
| `Circle` | ✅ | ✅ | ✅ | | ||
| `Cone` | ✅ | ✅ | ✅ | | ||
| `ConeSurface` | ✅ | ✅ | ✅ | | ||
| `Cylinder` | ✅ | 🛑 | ✅ | | ||
| `CylinderSurface` | ✅ | ✅ | ✅ | | ||
| `Disk` | ✅ | ✅ | ✅ | | ||
| `Frustum` | 🛑 | 🛑 | 🛑 | | ||
| `FrustumSurface` | 🛑 | 🛑 | 🛑 | | ||
| `Line` | ✅ | ✅ | ✅ | | ||
| `ParaboloidSurface` | ✅ | ✅ | ✅ | | ||
| `Plane` | ✅ | ✅ | ✅ | | ||
| `Ray` | ✅ | ✅ | ✅ | | ||
| `Ring` | ✅ | ✅ | ✅ | | ||
| `Rope` | ✅ | ✅ | ✅ | | ||
| `Segment` | ✅ | ✅ | ✅ | | ||
| `SimpleMesh` | 🎗️ | 🎗️ | 🎗️ | | ||
| `Sphere` in `𝔼{2}` | ✅ | ✅ | ✅ | | ||
| `Sphere` in `𝔼{3}` | ✅ | ✅ | ✅ | | ||
| `Tetrahedron` in `𝔼{3}` | 🎗️ | ✅ | 🎗️ | | ||
| `Triangle` | ✅ | ✅ | ✅ | | ||
| `Torus` | ✅ | ✅ | ✅ | |
This file contains 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Example Usage | ||
|
||
## Integrating along a Bezier curve | ||
|
||
```julia | ||
using Meshes | ||
using MeshIntegrals | ||
|
||
# Define a unit circle on the xy-plane | ||
origin = Point(0,0,0) | ||
ẑ = Vec(0,0,1) | ||
xy_plane = Plane(origin,ẑ) | ||
unit_circle_xy = Circle(xy_plane, 1.0) | ||
|
||
# Approximate unit_circle_xy with a high-order Bezier curve | ||
unit_circle_bz = BezierCurve( | ||
[Point(cos(t), sin(t), 0.0) for t in range(0,2pi,length=361)] | ||
) | ||
|
||
# A Real-valued function | ||
f(x, y, z) = abs(x + y) | ||
f(p) = f(to(p)...) | ||
|
||
integral(f, unit_circle_xy, GaussKronrod()) | ||
# 0.000170 seconds (5.00 k allocations: 213.531 KiB) | ||
# ans == 5.656854249525293 m^2 | ||
|
||
integral(f, unit_circle_bz, GaussKronrod()) | ||
# 0.017122 seconds (18.93 k allocations: 78.402 MiB) | ||
# ans = 5.551055333711397 m^2 | ||
``` |