diff --git a/previews/PR70/.documenter-siteinfo.json b/previews/PR70/.documenter-siteinfo.json index cf4f49aa..38f8365c 100644 --- a/previews/PR70/.documenter-siteinfo.json +++ b/previews/PR70/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-09T14:20:19","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-09-09T14:57:37","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/previews/PR70/api/index.html b/previews/PR70/api/index.html index 47e174a5..c8510155 100644 --- a/previews/PR70/api/index.html +++ b/previews/PR70/api/index.html @@ -1,10 +1,10 @@ Public API · MeshIntegrals.jl

Public API

Integrals

MeshIntegrals.integralFunction
integral(f, geometry)
 integral(f, geometry, algorithm)
-integral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) over the domain defined by a geometry using a particular integration algorithm with floating point precision of type FP.

source

Aliases

MeshIntegrals.lineintegralFunction
lineintegral(f, geometry)
+integral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) over the domain defined by a geometry using a particular integration algorithm with floating point precision of type FP.

source

Aliases

MeshIntegrals.lineintegralFunction
lineintegral(f, geometry)
 lineintegral(f, geometry, algorithm)
-lineintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) along a line-like geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

  • GaussKronrod (default)
  • GaussLegendre
  • HAdaptiveCubature
source
MeshIntegrals.surfaceintegralFunction
surfaceintegral(f, geometry)
+lineintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) along a line-like geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

  • GaussKronrod (default)
  • GaussLegendre
  • HAdaptiveCubature
source
MeshIntegrals.surfaceintegralFunction
surfaceintegral(f, geometry)
 surfaceintegral(f, geometry, algorithm)
-surfaceintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) along a surface geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

  • GaussKronrod
  • GaussLegendre
  • HAdaptiveCubature (default)
source
MeshIntegrals.volumeintegralFunction
volumeintegral(f, geometry)
+surfaceintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) along a surface geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

  • GaussKronrod
  • GaussLegendre
  • HAdaptiveCubature (default)
source
MeshIntegrals.volumeintegralFunction
volumeintegral(f, geometry)
 volumeintegral(f, geometry, algorithm)
-volumeintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) throughout a volumetric geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

  • GaussKronrod
  • GaussLegendre
  • HAdaptiveCubature (default)
source

Integration Algorithms

MeshIntegrals.GaussKronrodType
GaussKronrod(kwargs...)

Numerically integrate using the h-adaptive Gauss-Kronrod quadrature rule implemented by QuadGK.jl. All standard QuadGK.quadgk keyword arguments are supported.

source
MeshIntegrals.GaussLegendreType
GaussLegendre(n)

Numerically integrate using an n'th-order Gauss-Legendre quadrature rule. nodes and weights are efficiently calculated using FastGaussQuadrature.jl.

So long as the integrand function can be well-approximated by a polynomial of order 2n-1, this method should yield results with 16-digit accuracy in O(n) time. If the function is know to have some periodic content, then n should (at a minimum) be greater than the expected number of periods over the geometry, e.g. length(geometry)/lambda.

source
MeshIntegrals.HAdaptiveCubatureType
GaussKronrod(kwargs...)

Numerically integrate areas and surfaces using the h-adaptive cubature rule implemented by HCubature.jl. All standard HCubature.hcubature keyword arguments are supported.

source
+volumeintegral(f, geometry, algorithm, FP)

Numerically integrate a given function f(::Point) throughout a volumetric geometry using a particular integration algorithm with floating point precision of type FP.

Algorithm types available:

source

Integration Algorithms

MeshIntegrals.GaussKronrodType
GaussKronrod(kwargs...)

Numerically integrate using the h-adaptive Gauss-Kronrod quadrature rule implemented by QuadGK.jl. All standard QuadGK.quadgk keyword arguments are supported.

source
MeshIntegrals.GaussLegendreType
GaussLegendre(n)

Numerically integrate using an n'th-order Gauss-Legendre quadrature rule. nodes and weights are efficiently calculated using FastGaussQuadrature.jl.

So long as the integrand function can be well-approximated by a polynomial of order 2n-1, this method should yield results with 16-digit accuracy in O(n) time. If the function is know to have some periodic content, then n should (at a minimum) be greater than the expected number of periods over the geometry, e.g. length(geometry)/lambda.

source
MeshIntegrals.HAdaptiveCubatureType
GaussKronrod(kwargs...)

Numerically integrate areas and surfaces using the h-adaptive cubature rule implemented by HCubature.jl. All standard HCubature.hcubature keyword arguments are supported.

source
diff --git a/previews/PR70/index.html b/previews/PR70/index.html index 423d1998..cd44d73a 100644 --- a/previews/PR70/index.html +++ b/previews/PR70/index.html @@ -1,2 +1,2 @@ -About · MeshIntegrals.jl

MeshIntegrals.jl

Docs-stable Docs-dev License: MIT ColPrac

Build Status codecov Coveralls Aqua QA

MeshIntegrals.jl is a Julia library that leverages differential forms to implement fast and easy numerical integration of field equations over geometric domains.

+About · MeshIntegrals.jl

MeshIntegrals.jl

Docs-stable Docs-dev License: MIT ColPrac

Build Status codecov Coveralls Aqua QA

MeshIntegrals.jl is a Julia library that leverages differential forms to implement fast and easy numerical integration of field equations over geometric domains.

diff --git a/previews/PR70/supportmatrix/index.html b/previews/PR70/supportmatrix/index.html index b3c7b518..37bf9b4f 100644 --- a/previews/PR70/supportmatrix/index.html +++ b/previews/PR70/supportmatrix/index.html @@ -1,2 +1,2 @@ -Support Matrix · MeshIntegrals.jl

Support Matrix

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).

SymbolSupport Level
Supported, passes unit tests
🎗️Planned to support in the future
🛑Not supported
Meshes.GeometryGauss-LegendreGauss-KronrodH-Adaptive Cubature
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
+Support Matrix · MeshIntegrals.jl

Support Matrix

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).

SymbolSupport Level
Supported, passes unit tests
🎗️Planned to support in the future
🛑Not supported
Meshes.GeometryGauss-LegendreGauss-KronrodH-Adaptive Cubature
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
diff --git a/previews/PR70/triangle/index.html b/previews/PR70/triangle/index.html index 35c22f42..4961c937 100644 --- a/previews/PR70/triangle/index.html +++ b/previews/PR70/triangle/index.html @@ -1,4 +1,4 @@ Integrating a Triangle · MeshIntegrals.jl

Integrating a Triangle

For a specified Meshes.Triangle surface with area $A$, let $u$ and $v$ be Barycentric coordinates that span the surface.

\[\int_\triangle f(\bar{r}) \, \text{d}A = \iint_\triangle f\left( \bar{r}(u,v) \right) \, \left( \text{d}u \wedge \text{d}v \right)\]

Since the geometric transformation from the originally-arbitrary domain to a Barycentric domain is linear, the magnitude of the surface element $\text{d}u \wedge \text{d}v$ is constant throughout the integration domain. This constant will be equal to twice the magnitude of $A$.

\[\int_\triangle f(\bar{r}) \, \text{d}A - = 2A \int_0^1 \int_0^{1-v} f\left( \bar{r}(u,v) \right) \, \text{d}u \, \text{d}v\]

This non-rectangular Barycentric domain prevents a direct application of most numerical integration methods. It can be directly integrated, albeit inefficiently, using nested Gauss-Kronrod quadrature rules. Alternatively, additional transformation could be applied to map this domain onto a rectangular domain.

WORK IN PROGRESS: continued derivation to detail this barycentric-rectangular domain transformation

+ = 2A \int_0^1 \int_0^{1-v} f\left( \bar{r}(u,v) \right) \, \text{d}u \, \text{d}v\]

This non-rectangular Barycentric domain prevents a direct application of most numerical integration methods. It can be directly integrated, albeit inefficiently, using nested Gauss-Kronrod quadrature rules. Alternatively, additional transformation could be applied to map this domain onto a rectangular domain.

WORK IN PROGRESS: continued derivation to detail this barycentric-rectangular domain transformation

diff --git a/previews/PR70/usage/index.html b/previews/PR70/usage/index.html index 85f80eee..ade56902 100644 --- a/previews/PR70/usage/index.html +++ b/previews/PR70/usage/index.html @@ -23,4 +23,4 @@ integral(f, unit_circle_bz, GaussKronrod()) # 0.017122 seconds (18.93 k allocations: 78.402 MiB) - # ans = 5.551055333711397 m^2 + # ans = 5.551055333711397 m^2