From d764ba2880c2916f091bf44bd5947ca02d3aa34a Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 19 Dec 2024 23:05:55 +0000 Subject: [PATCH] build based on fb3549f --- previews/PR157/.documenter-siteinfo.json | 2 +- previews/PR157/api/index.html | 8 ++++---- previews/PR157/how_it_works/index.html | 2 +- previews/PR157/index.html | 2 +- previews/PR157/specializations/index.html | 2 +- previews/PR157/supportmatrix/index.html | 2 +- previews/PR157/usage/index.html | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/previews/PR157/.documenter-siteinfo.json b/previews/PR157/.documenter-siteinfo.json index 776a03d2..12de35bb 100644 --- a/previews/PR157/.documenter-siteinfo.json +++ b/previews/PR157/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-12-19T21:47:47","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-12-19T23:05:49","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/previews/PR157/api/index.html b/previews/PR157/api/index.html index 9ecd8e4c..531c4c96 100644 --- a/previews/PR157/api/index.html +++ b/previews/PR157/api/index.html @@ -1,5 +1,5 @@ -Public API · MeshIntegrals.jl

Public API

Integrals

MeshIntegrals.integralFunction
integral(f, geometry[, rule]; diff_method=_default_diff_method(geometry, FP), FP=Float64)

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

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • geometry: some Meshes.Geometry that defines the integration domain
  • rule: optionally, the IntegrationRule used for integration (by default

GaussKronrod() in 1D and HAdaptiveCubature() else)

Keyword Arguments

  • diff_method::DifferentiationMethod = _default_diff_method(geometry, FP): the method to

use for calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired.
source

Specializations

MeshIntegrals.integralMethod
integral(f, curve::BezierCurve, rule = GaussKronrod();
-         diff_method=Analytical(), FP=Float64, alg=Meshes.Horner())

Like integral but integrates along the domain defined by curve.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • curve: a Meshes.BezierCurve that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = Analytical(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
  • alg = Meshes.Horner(): the method to use for parametrizing curve. Alternatively,

alg=Meshes.DeCasteljau() can be specified for increased accuracy, but comes with a steep performance cost, especially for curves with a large number of control points.

source
MeshIntegrals.integralMethod
integral(f, ring::Ring, rule = GaussKronrod();
-         diff_method=FiniteDifference(), FP=Float64)

Like integral but integrates along the domain defined by ring. The specified integration rule is applied independently to each segment formed by consecutive points in the Ring.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • ring: a Ring that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = FiniteDifference(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
source
MeshIntegrals.integralMethod
integral(f, rope::Rope, rule = GaussKronrod();
-         diff_method=FiniteDifference(), FP=Float64)

Like integral but integrates along the domain defined by rope. The specified integration rule is applied independently to each segment formed by consecutive points in the Rope.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • rope: a Rope that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = FiniteDifference(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
source
MeshIntegrals._ParametricGeometryType
_ParametricGeometry <: Meshes.Primitive <: Meshes.Geometry

_ParametricGeometry is used internally in MeshIntegrals.jl to behave like a generic wrapper for geometries with custom parametric functions. This type is used for transforming other geometries to enable integration over the standard rectangular [0,1]^n domain.

Meshes.jl adopted a ParametrizedCurve type that performs a similar role as of v0.51.20, but only supports geometries with one parametric dimension. Support is additionally planned for more types that span surfaces and volumes, at which time this custom type will probably no longer be required.

Fields

  • fun - anything callable representing a parametric function: (ts...) -> Meshes.Point

Type Structure

  • M <: Meshes.Manifold - same usage as in Meshes.Geometry{M, C}
  • C <: CoordRefSystems.CRS - same usage as in Meshes.Geometry{M, C}
  • F - type of the callable parametric function
  • Dim - number of parametric dimensions
source
MeshIntegrals._ParametricGeometryMethod
_ParametricGeometry(fun, dims)

Construct a _ParametricGeometry using a provided parametric function fun for a geometry with dims parametric dimensions.

Arguments

  • fun - anything callable representing a parametric function mapping (ts...) -> Meshes.Point
  • dims::Int64 - number of parametric dimensions, i.e. length(ts)
source
MeshIntegrals._parametricFunction
_parametric(geometry::G) where {G <: Meshes.Geometry} -> Function

Used in MeshIntegrals.jl for defining parametric functions that transform non-standard geometries into a form that can be integrated over the standard rectangular [0,1]^n limits.

source

Aliases

Integration Rules

MeshIntegrals.GaussKronrodType
GaussKronrod(kwargs...)

The h-adaptive Gauss-Kronrod quadrature rule implemented by QuadGK.jl. All standard QuadGK.quadgk keyword arguments are supported. This rule works natively for one dimensional geometries; some two- and three-dimensional geometries are additionally supported using nested integral solvers with the specified kwarg settings.

source
MeshIntegrals.GaussLegendreType
GaussLegendre(n)

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

source

Derivatives

MeshIntegrals.FiniteDifferenceType
FiniteDifference(ε=1e-6)

Use to specify use of a finite-difference approximation method with a step size of ε for calculating derivatives.

source
MeshIntegrals.differentialMethod
differential(geometry, ts[, diff_method])

Calculate the differential element (length, area, volume, etc) of the parametric function for geometry at arguments ts. Optionally, direct the use of a particular differentiation method diff_method; by default use analytic solutions where possible and finite difference approximations otherwise.

Arguments

  • geometry: some Meshes.Geometry of N parametric dimensions
  • ts: a parametric point specified as a vector or tuple of length N
  • diff_method: the desired DifferentiationMethod to use
source
MeshIntegrals.jacobianMethod
jacobian(geometry, ts[, diff_method])

Calculate the Jacobian of a geometry's parametric function at some point ts. Optionally, direct the use of a particular differentiation method diff_method; by default use analytic solutions where possible and finite difference approximations otherwise.

Arguments

  • geometry: some Meshes.Geometry of N parametric dimensions
  • ts: a parametric point specified as a vector or tuple of length N
  • diff_method: the desired DifferentiationMethod to use
source
+Public API · MeshIntegrals.jl

Public API

Integrals

MeshIntegrals.integralFunction
integral(f, geometry[, rule]; diff_method=_default_diff_method(geometry, FP), FP=Float64)

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

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • geometry: some Meshes.Geometry that defines the integration domain
  • rule: optionally, the IntegrationRule used for integration (by default

GaussKronrod() in 1D and HAdaptiveCubature() else)

Keyword Arguments

  • diff_method::DifferentiationMethod = _default_diff_method(geometry, FP): the method to

use for calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired.
source

Specializations

MeshIntegrals.integralMethod
integral(f, curve::BezierCurve, rule = GaussKronrod();
+         diff_method=Analytical(), FP=Float64, alg=Meshes.Horner())

Like integral but integrates along the domain defined by curve.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • curve: a Meshes.BezierCurve that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = Analytical(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
  • alg = Meshes.Horner(): the method to use for parametrizing curve. Alternatively,

alg=Meshes.DeCasteljau() can be specified for increased accuracy, but comes with a steep performance cost, especially for curves with a large number of control points.

source
MeshIntegrals.integralMethod
integral(f, ring::Ring, rule = GaussKronrod();
+         diff_method=FiniteDifference(), FP=Float64)

Like integral but integrates along the domain defined by ring. The specified integration rule is applied independently to each segment formed by consecutive points in the Ring.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • ring: a Ring that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = FiniteDifference(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
source
MeshIntegrals.integralMethod
integral(f, rope::Rope, rule = GaussKronrod();
+         diff_method=FiniteDifference(), FP=Float64)

Like integral but integrates along the domain defined by rope. The specified integration rule is applied independently to each segment formed by consecutive points in the Rope.

Arguments

  • f: an integrand function, i.e. any callable with a method f(::Meshes.Point)
  • rope: a Rope that defines the integration domain
  • rule = GaussKronrod(): optionally, the IntegrationRule used for integration

Keyword Arguments

  • diff_method::DifferentiationMethod = FiniteDifference(): the method to use for

calculating Jacobians that are used to calculate differential elements

  • FP = Float64: the floating point precision desired
source
MeshIntegrals._ParametricGeometryType
_ParametricGeometry <: Meshes.Primitive <: Meshes.Geometry

_ParametricGeometry is used internally in MeshIntegrals.jl to behave like a generic wrapper for geometries with custom parametric functions. This type is used for transforming other geometries to enable integration over the standard rectangular [0,1]^n domain.

Meshes.jl adopted a ParametrizedCurve type that performs a similar role as of v0.51.20, but only supports geometries with one parametric dimension. Support is additionally planned for more types that span surfaces and volumes, at which time this custom type will probably no longer be required.

Fields

  • fun - anything callable representing a parametric function: (ts...) -> Meshes.Point

Type Structure

  • M <: Meshes.Manifold - same usage as in Meshes.Geometry{M, C}
  • C <: CoordRefSystems.CRS - same usage as in Meshes.Geometry{M, C}
  • F - type of the callable parametric function
  • Dim - number of parametric dimensions
source
MeshIntegrals._ParametricGeometryMethod
_ParametricGeometry(fun, dims)

Construct a _ParametricGeometry using a provided parametric function fun for a geometry with dims parametric dimensions.

Arguments

  • fun - anything callable representing a parametric function mapping (ts...) -> Meshes.Point
  • dims::Int64 - number of parametric dimensions, i.e. length(ts)
source
MeshIntegrals._parametricFunction
_parametric(geometry::G) where {G <: Meshes.Geometry} -> Function

Used in MeshIntegrals.jl for defining parametric functions that transform non-standard geometries into a form that can be integrated over the standard rectangular [0,1]^n limits.

source

Aliases

Integration Rules

MeshIntegrals.GaussKronrodType
GaussKronrod(kwargs...)

The h-adaptive Gauss-Kronrod quadrature rule implemented by QuadGK.jl. All standard QuadGK.quadgk keyword arguments are supported. This rule works natively for one dimensional geometries; some two- and three-dimensional geometries are additionally supported using nested integral solvers with the specified kwarg settings.

source
MeshIntegrals.GaussLegendreType
GaussLegendre(n)

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

source

Derivatives

MeshIntegrals.FiniteDifferenceType
FiniteDifference(ε=1e-6)

Use to specify use of a finite-difference approximation method with a step size of ε for calculating derivatives.

source
MeshIntegrals.differentialMethod
differential(geometry, ts[, diff_method])

Calculate the differential element (length, area, volume, etc) of the parametric function for geometry at arguments ts. Optionally, direct the use of a particular differentiation method diff_method; by default use analytic solutions where possible and finite difference approximations otherwise.

Arguments

  • geometry: some Meshes.Geometry of N parametric dimensions
  • ts: a parametric point specified as a vector or tuple of length N
  • diff_method: the desired DifferentiationMethod to use
source
MeshIntegrals.jacobianMethod
jacobian(geometry, ts[, diff_method])

Calculate the Jacobian of a geometry's parametric function at some point ts. Optionally, direct the use of a particular differentiation method diff_method; by default use analytic solutions where possible and finite difference approximations otherwise.

Arguments

  • geometry: some Meshes.Geometry of N parametric dimensions
  • ts: a parametric point specified as a vector or tuple of length N
  • diff_method: the desired DifferentiationMethod to use
source
diff --git a/previews/PR157/how_it_works/index.html b/previews/PR157/how_it_works/index.html index 7c6a27b7..970f2ddf 100644 --- a/previews/PR157/how_it_works/index.html +++ b/previews/PR157/how_it_works/index.html @@ -8,4 +8,4 @@ ball(tρ, tθ, tφ) # for args in range [0, 1], maps to a corresponding Meshes.Point -ball(0, tθ, tφ) == center

In effect, we can now use the geometry itself as a function that maps from three normalized ($0 \le t \le 1$) arguments to every point on the geometry. For the sake of generalization, let this parametric function be called $g$.

\[\text{g}: (t_1,~t_2,~t_3) ~\mapsto~ \text{Point}\big[ x, ~y, ~z \big] \]

Differential Forms

Using differential forms, the general solution for integrating a geometry with three parametric dimensions ($t_1$, $t_2$, and $t_3$) is

\[\iiint f(r̄) ~ \text{d}V = \iiint f(\bar{r}) ~ \bar{\text{d}t_1} \wedge \bar{\text{d}t_2} \wedge \bar{\text{d}t_3}\]

This resultant differential (volume) element is formed at each point in the integration domain by taking the Jacobian of the parametric function.

\[\mathbf{J}_f = \begin{bmatrix} \bar{\text{d}t_1} & \bar{\text{d}t_2} & \bar{\text{d}t_3} \end{bmatrix}\]

where

\[\bar{\text{d}t_n} = \frac{\partial}{\partial t_n} ~ \text{g}(t_1,~t_2,~t_3)\]

Each of these partial derivatives is a vector representing the direction that changing each parametric function argument will move the resultant point. The differential element ($E$) size is then calculated using geometric algebra as the magnitude of the exterior product ($\wedge$) of these three vectors.

\[E(t_1,~t_2,~t_3) = \left\| \bar{\text{d}t_1} \wedge \bar{\text{d}t_2} \wedge \bar{\text{d}t_3} \right\|\]

Finally, we use the parametric function itself, $g$, as a map to all points $\bar{r}$ in the integration domain. Since Meshes.Geometry parametric functions all operate on normalized domains, we can now solve any volume integral as simply

\[\int_0^1 \int_0^1 \int_0^1 f\Big(\text{g}\big(t_1,~t_2,~t_3\big)\Big) ~ E(t_1,~t_2,~t_3) ~ \text{d}t_1 ~ \text{d}t_2 ~ \text{d}t_3\]

This form of integral can be trivially generalized to support $n$-dimensional geometries in a form that enables the use of a wide range of numerical integration libraries.

+ball(0, tθ, tφ) == center

In effect, we can now use the geometry itself as a function that maps from three normalized ($0 \le t \le 1$) arguments to every point on the geometry. For the sake of generalization, let this parametric function be called $g$.

\[\text{g}: (t_1,~t_2,~t_3) ~\mapsto~ \text{Point}\big[ x, ~y, ~z \big] \]

Differential Forms

Using differential forms, the general solution for integrating a geometry with three parametric dimensions ($t_1$, $t_2$, and $t_3$) is

\[\iiint f(r̄) ~ \text{d}V = \iiint f(\bar{r}) ~ \bar{\text{d}t_1} \wedge \bar{\text{d}t_2} \wedge \bar{\text{d}t_3}\]

This resultant differential (volume) element is formed at each point in the integration domain by taking the Jacobian of the parametric function.

\[\mathbf{J}_f = \begin{bmatrix} \bar{\text{d}t_1} & \bar{\text{d}t_2} & \bar{\text{d}t_3} \end{bmatrix}\]

where

\[\bar{\text{d}t_n} = \frac{\partial}{\partial t_n} ~ \text{g}(t_1,~t_2,~t_3)\]

Each of these partial derivatives is a vector representing the direction that changing each parametric function argument will move the resultant point. The differential element ($E$) size is then calculated using geometric algebra as the magnitude of the exterior product ($\wedge$) of these three vectors.

\[E(t_1,~t_2,~t_3) = \left\| \bar{\text{d}t_1} \wedge \bar{\text{d}t_2} \wedge \bar{\text{d}t_3} \right\|\]

Finally, we use the parametric function itself, $g$, as a map to all points $\bar{r}$ in the integration domain. Since Meshes.Geometry parametric functions all operate on normalized domains, we can now solve any volume integral as simply

\[\int_0^1 \int_0^1 \int_0^1 f\Big(\text{g}\big(t_1,~t_2,~t_3\big)\Big) ~ E(t_1,~t_2,~t_3) ~ \text{d}t_1 ~ \text{d}t_2 ~ \text{d}t_3\]

This form of integral can be trivially generalized to support $n$-dimensional geometries in a form that enables the use of a wide range of numerical integration libraries.

diff --git a/previews/PR157/index.html b/previews/PR157/index.html index 54da9b0a..ad4c56d0 100644 --- a/previews/PR157/index.html +++ b/previews/PR157/index.html @@ -1,4 +1,4 @@ About · MeshIntegrals.jl

MeshIntegrals.jl

Docs-stable Docs-dev License: MIT ColPrac

Build Status codecov Coveralls Aqua QA

MeshIntegrals.jl uses differential forms to enable fast and easy numerical integration of arbitrary integrand functions over domains defined via Meshes.jl geometries. This is achieved using:

  • Gauss-Legendre quadrature rules from FastGaussQuadrature.jl: GaussLegendre(n)
  • H-adaptive Gauss-Kronrod quadrature rules from QuadGK.jl: GaussKronrod(kwargs...)
  • H-adaptive cubature rules from HCubature.jl: HAdaptiveCubature(kwargs...)

These solvers have support for integrand functions that produce scalars, vectors, and Unitful.jl Quantity types. While HCubature.jl does not natively support Quantity type integrands, this package provides a compatibility layer to enable this feature.

Usage

Basic

integral(f, geometry)

Performs a numerical integration of some integrand function f over the domain specified by geometry. The integrand function can be anything callable with a method f(::Meshes.Point). A default integration method will be automatically selected according to the geometry: GaussKronrod() for 1D, and HAdaptiveCubature() for all others.

integral(f, geometry, rule)

Performs a numerical integration of some integrand function f over the domain specified by geometry using the specified integration rule, e.g. GaussKronrod(). The integrand function can be anything callable with a method f(::Meshes.Point).

Additionally, several optional keyword arguments are defined in the API to provide additional control over the integration mechanics.

Aliases

lineintegral(f, geometry)
 surfaceintegral(f, geometry)
-volumeintegral(f, geometry)

Alias functions are provided for convenience. These are simply wrappers for integral that also validate that the provided geometry has the expected number of parametric dimensions. Like with integral, a rule can also optionally be specified as a third argument.

  • lineintegral is used for curve-like geometries or polytopes (e.g. Segment, Ray, BezierCurve, Rope, etc)
  • surfaceintegral is used for surfaces (e.g. Disk, Sphere, CylinderSurface, etc)
  • volumeintegral is used for (3D) volumes (e.g. Ball, Cone, Torus, etc)
+volumeintegral(f, geometry)

Alias functions are provided for convenience. These are simply wrappers for integral that also validate that the provided geometry has the expected number of parametric dimensions. Like with integral, a rule can also optionally be specified as a third argument.

diff --git a/previews/PR157/specializations/index.html b/previews/PR157/specializations/index.html index 2dad85a7..925ab620 100644 --- a/previews/PR157/specializations/index.html +++ b/previews/PR157/specializations/index.html @@ -1,2 +1,2 @@ -Specializations · MeshIntegrals.jl

Specializations

There are several notable exceptions to how Meshes.jl defines parametric functions.

  • Meshes.ConeSurface is essentially a composite type and has a parametric function that only maps the conical portion of the geometry, so the Meshes.Disk base element has to be integrated separately.
  • Meshes.CylinderSurface is essentially a composite type and has a parametric function that only maps the cylindrical portion of the geometry, so the Meshes.Disk element has to be integrated separately.
  • Meshes.FrustumSurface is essentially a composite type and has a parametric function that only maps the cylindrical portion of the geometry, so the top and bottom Meshes.Disk elements have to be integrated separately.
  • Meshes.Line represents a line of infinite length that passes through two points, and it has a parametric function that is valid on the domain $(-\infty, \infty)$.
  • Meshes.Plane represents a plane of infinite extent, and it has a parametric function that is valid on the domain $(-\infty, \infty)^2$.
  • Meshes.Ray represents a line that begins at a point and extends in a particular direction with infinite length, and it has a parametric function that is valid on the domain $[0, \infty)$.
  • Meshes.Ring is a composite type that lacks a parametric function, but can be decomposed into Meshes.Segments and then integrated by adding together the individual integrals.
  • Meshes.Rope is a composite type that lacks a parametric function, but can be decomposed into Meshes.Segments and then integrated by adding together the individual integrals.
  • Meshes.Triangle has a parametric function that takes coordinates on a 2D barycentric coordinate system. So, for (::Meshes.Triangle)(t1, t2), the coordinates must obey: $t_1, t_2 \in [0,1]$ where $t_1 + t_2 \le 1$.
  • Meshes.Tetrahedron has a parametric function that takes coordinates on a 3D barycentric coordinate system. So, for (::Meshes.Tetrahedron)(t1, t2), the coordinates must obey: $t_1, t_2, t_3 \in [0,1]$ where $t_1 + t_2 + t_3 \le 1$.
+Specializations · MeshIntegrals.jl

Specializations

There are several notable exceptions to how Meshes.jl defines parametric functions.

  • Meshes.ConeSurface is essentially a composite type and has a parametric function that only maps the conical portion of the geometry, so the Meshes.Disk base element has to be integrated separately.
  • Meshes.CylinderSurface is essentially a composite type and has a parametric function that only maps the cylindrical portion of the geometry, so the Meshes.Disk element has to be integrated separately.
  • Meshes.FrustumSurface is essentially a composite type and has a parametric function that only maps the cylindrical portion of the geometry, so the top and bottom Meshes.Disk elements have to be integrated separately.
  • Meshes.Line represents a line of infinite length that passes through two points, and it has a parametric function that is valid on the domain $(-\infty, \infty)$.
  • Meshes.Plane represents a plane of infinite extent, and it has a parametric function that is valid on the domain $(-\infty, \infty)^2$.
  • Meshes.Ray represents a line that begins at a point and extends in a particular direction with infinite length, and it has a parametric function that is valid on the domain $[0, \infty)$.
  • Meshes.Ring is a composite type that lacks a parametric function, but can be decomposed into Meshes.Segments and then integrated by adding together the individual integrals.
  • Meshes.Rope is a composite type that lacks a parametric function, but can be decomposed into Meshes.Segments and then integrated by adding together the individual integrals.
  • Meshes.Triangle has a parametric function that takes coordinates on a 2D barycentric coordinate system. So, for (::Meshes.Triangle)(t1, t2), the coordinates must obey: $t_1, t_2 \in [0,1]$ where $t_1 + t_2 \le 1$.
  • Meshes.Tetrahedron has a parametric function that takes coordinates on a 3D barycentric coordinate system. So, for (::Meshes.Tetrahedron)(t1, t2), the coordinates must obey: $t_1, t_2, t_3 \in [0,1]$ where $t_1 + t_2 + t_3 \le 1$.
diff --git a/previews/PR157/supportmatrix/index.html b/previews/PR157/supportmatrix/index.html index cce5080e..61be78e5 100644 --- a/previews/PR157/supportmatrix/index.html +++ b/previews/PR157/supportmatrix/index.html @@ -1,2 +1,2 @@ -Support Matrix · MeshIntegrals.jl

Support Matrix

This library aims to enable users to calculate the value of integrals over all Meshes.jl geometry types using an array of numerical integration rules and techniques. However, some combinations of geometry types and integration rules are ill-suited, and some others are simply not yet implemented. The following Support Matrix captures the current state of support for all geometry/rule combinations. Entries with a green check mark are fully supported and pass unit tests designed to check for accuracy.

In general, Gauss-Kronrod integration rules are recommended (and the default) for geometries with one parametric dimension, e.g.: Segment, BezierCurve, and Rope. For geometries with more than one parametric dimension, e.g. surfaces and volumes, H-Adaptive Cubature rules are recommended (and the default).

While it is possible to apply nested Gauss-Kronrod rules to numerically integrate geometries with more than one parametric dimension, this produces results that are strictly inferior to using an equivalent H-Adaptive Cubature rule, so support for this usage is not recommended.

SymbolSupport Level
Supported
🎗️Planned to support in the future
⚠️Deprecated
🛑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⚠️
Ellipsoid
Frustum🎗️🎗️🎗️
FrustumSurface⚠️
Hexahedron
Line
ParaboloidSurface⚠️
ParametrizedCurve
Plane
Polyarea🎗️🎗️🎗️
Pyramid🎗️🎗️🎗️
Quadrangle⚠️
Ray
Ring
Rope
Segment
SimpleMesh🎗️🎗️🎗️
Sphere in 𝔼{2}
Sphere in 𝔼{3}⚠️
Tetrahedron⚠️
Triangle
Torus⚠️
Wedge🎗️🎗️🎗️
+Support Matrix · MeshIntegrals.jl

Support Matrix

This library aims to enable users to calculate the value of integrals over all Meshes.jl geometry types using an array of numerical integration rules and techniques. However, some combinations of geometry types and integration rules are ill-suited, and some others are simply not yet implemented. The following Support Matrix captures the current state of support for all geometry/rule combinations. Entries with a green check mark are fully supported and pass unit tests designed to check for accuracy.

In general, Gauss-Kronrod integration rules are recommended (and the default) for geometries with one parametric dimension, e.g.: Segment, BezierCurve, and Rope. For geometries with more than one parametric dimension, e.g. surfaces and volumes, H-Adaptive Cubature rules are recommended (and the default).

While it is possible to apply nested Gauss-Kronrod rules to numerically integrate geometries with more than one parametric dimension, this produces results that are strictly inferior to using an equivalent H-Adaptive Cubature rule, so support for this usage is not recommended.

SymbolSupport Level
Supported
🎗️Planned to support in the future
⚠️Deprecated
🛑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⚠️
Ellipsoid
Frustum🎗️🎗️🎗️
FrustumSurface⚠️
Hexahedron
Line
ParaboloidSurface⚠️
ParametrizedCurve
Plane
Polyarea🎗️🎗️🎗️
Pyramid🎗️🎗️🎗️
Quadrangle⚠️
Ray
Ring
Rope
Segment
SimpleMesh🎗️🎗️🎗️
Sphere in 𝔼{2}
Sphere in 𝔼{3}⚠️
Tetrahedron⚠️
Triangle
Torus⚠️
Wedge🎗️🎗️🎗️
diff --git a/previews/PR157/usage/index.html b/previews/PR157/usage/index.html index 5bc79523..3af504e2 100644 --- a/previews/PR157/usage/index.html +++ b/previews/PR157/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