diff --git a/previews/PR131/.documenter-siteinfo.json b/previews/PR131/.documenter-siteinfo.json index efca6ba6..a88bc365 100644 --- a/previews/PR131/.documenter-siteinfo.json +++ b/previews/PR131/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-16T01:45:00","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-16T01:46:02","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/previews/PR131/api/index.html b/previews/PR131/api/index.html index cfe94540..3a8b2f0d 100644 --- a/previews/PR131/api/index.html +++ b/previews/PR131/api/index.html @@ -1,5 +1,5 @@ -Public API · MeshIntegrals.jl

Public API

Integrals

MeshIntegrals.integralFunction
integral(f, geometry[, rule]; diff_method=_default_method(geometry), 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 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_method(geometry): 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 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 parameterizing 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 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 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::Function - 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 integrand 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::Function - parametric function mapping (ts...) -> Meshes.Point
  • dims::Int64 - number of parametric dimensions, i.e. length(ts)
source
MeshIntegrals._parametricFunction
_parametric(geometry::G, ts...) where {G <: Meshes.Geometry}

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.AnalyticalType
Analytical()

Use to specify use of analytically-derived solutions for calculating derivatives. These solutions are currently defined only for a subset of geometry types.

Supported Geometries:

  • BezierCurve
  • Line
  • Plane
  • Ray
  • Tetrahedron
  • Triangle
source
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_method(geometry), 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 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_method(geometry): 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 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 parameterizing 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 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 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::Function - 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 integrand 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::Function - parametric function mapping (ts...) -> Meshes.Point
  • dims::Int64 - number of parametric dimensions, i.e. length(ts)
source
MeshIntegrals._parametricFunction
_parametric(geometry::G, ts...) where {G <: Meshes.Geometry}

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.AnalyticalType
Analytical()

Use to specify use of analytically-derived solutions for calculating derivatives. These solutions are currently defined only for a subset of geometry types.

Supported Geometries:

  • BezierCurve
  • Line
  • Plane
  • Ray
  • Tetrahedron
  • Triangle
source
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/PR131/how_it_works/index.html b/previews/PR131/how_it_works/index.html index 3852a15d..e9827272 100644 --- a/previews/PR131/how_it_works/index.html +++ b/previews/PR131/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/PR131/index.html b/previews/PR131/index.html index 977a198a..f036624a 100644 --- a/previews/PR131/index.html +++ b/previews/PR131/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(p::Meshes.Point) over the domain specified by geometry. 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(p::Meshes.Point) over the domain specified by geometry using the specified integration rule, e.g. GaussKronrod().

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/PR131/specializations/index.html b/previews/PR131/specializations/index.html index 3f12bd4e..eb1ec7e8 100644 --- a/previews/PR131/specializations/index.html +++ b/previews/PR131/specializations/index.html @@ -4,4 +4,4 @@ = 2A \int_0^1 \int_0^{1-v} f\left( \bar{r}(u,v) \right) \, \text{d}u \, \text{d}v\]

Since the integral domain is a right-triangle in the Barycentric domain, a nested application of Gauss-Kronrod quadrature rules is capable of computing the result, albeit inefficiently. However, many numerical integration methods that require rectangular bounds can not be directly applied.

In order to enable integration methods that operate over rectangular bounds, two coordinate system transformations are applied: the first maps from Barycentric coordinates $(u, v)$ to polar coordinates $(r, \phi)$, and the second is a non-linear map from polar coordinates to a new curvilinear basis $(R, \phi)$.

For the first transformation, let $u = r~\cos\phi$ and $v = r~\sin\phi$ where $\text{d}u~\text{d}v = r~\text{d}r~\text{d}\phi$. The Barycentric triangle's hypotenuse boundary line is described by the function $v(u) = 1 - u$. Substituting in the previous definitions leads to a new boundary line function in polar coordinate space $r(\phi) = 1 / (\sin\phi + \cos\phi)$.

\[\int_0^1 \int_0^{1-v} f\left( \bar{r}(u,v) \right) \, \text{d}u \, \text{d}v = \int_0^{\pi/2} \int_0^{1/(\sin\phi+\cos\phi)} f\left( \bar{r}(r,\phi) \right) \, r \, \text{d}r \, \text{d}\phi\]

These integral boundaries remain non-rectangular, so an additional transformation will be applied to a curvilinear $(R, \phi)$ space that normalizes all of the hypotenuse boundary line points to $R=1$. To achieve this, a function $R(r,\phi)$ is required such that $R(r_0, \phi) = 1$ where $r_0 = 1 / (\sin\phi + \cos\phi)$

To achieve this, let $R(r, \phi) = r~(\sin\phi + \cos\phi)$. Now, substituting some terms leads to

\[\int_0^{\pi/2} \int_0^{1/(\sin\phi+\cos\phi)} f\left( \bar{r}(r,\phi) \right) \, r \, \text{d}r \, \text{d}\phi = \int_0^{\pi/2} \int_0^{r_0} f\left( \bar{r}(r,\phi) \right) \, \left(\frac{R}{\sin\phi + \cos\phi}\right) \, \text{d}r \, \text{d}\phi\]

Since $\text{d}R/\text{d}r = \sin\phi + \cos\phi$, a change of integral domain leads to

\[\int_0^{\pi/2} \int_0^{r_0} f\left( \bar{r}(r,\phi) \right) \, \left(\frac{R}{\sin\phi + \cos\phi}\right) \, \text{d}r \, \text{d}\phi - = \int_0^{\pi/2} \int_0^1 f\left( \bar{r}(R,\phi) \right) \, \left(\frac{R}{\left(\sin\phi + \cos\phi\right)^2}\right) \, \text{d}R \, \text{d}\phi\]

The second term in this new integrand function serves as a correction factor that corrects for the impact of the non-linear domain transformation. Since all of the integration bounds are now constants, specialized integration methods can be defined for triangles that performs these domain transformations and then solve the new rectangular integration problem using a wider range of solver options.

+ = \int_0^{\pi/2} \int_0^1 f\left( \bar{r}(R,\phi) \right) \, \left(\frac{R}{\left(\sin\phi + \cos\phi\right)^2}\right) \, \text{d}R \, \text{d}\phi\]

The second term in this new integrand function serves as a correction factor that corrects for the impact of the non-linear domain transformation. Since all of the integration bounds are now constants, specialized integration methods can be defined for triangles that performs these domain transformations and then solve the new rectangular integration problem using a wider range of solver options.

diff --git a/previews/PR131/supportmatrix/index.html b/previews/PR131/supportmatrix/index.html index 48784e31..1d6985ae 100644 --- a/previews/PR131/supportmatrix/index.html +++ b/previews/PR131/supportmatrix/index.html @@ -1,2 +1,2 @@ -Support Matrix · MeshIntegrals.jl

Support Matrix

While this library aims to support all possible integration rules and Meshes.jl geometry types, some combinations are ill-suited and some others are simply not yet implemented. The following Support Matrix aims to capture the current development state of all geometry/rule 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
Ellipsoid
Frustum🎗️🎗️🎗️
FrustumSurface
Hexahedron
Line
ParaboloidSurface
ParametrizedCurve
Plane
Polyarea🎗️🎗️🎗️
Pyramid🎗️🎗️🎗️
Quadrangle
Ray
Ring
Rope
Segment
SimpleMesh🎗️🎗️🎗️
Sphere in 𝔼{2}
Sphere in 𝔼{3}
Tetrahedron in 𝔼{3}🛑
Triangle
Torus
Wedge🎗️🎗️🎗️
+Support Matrix · MeshIntegrals.jl

Support Matrix

While this library aims to support all possible integration rules and Meshes.jl geometry types, some combinations are ill-suited and some others are simply not yet implemented. The following Support Matrix aims to capture the current development state of all geometry/rule 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
Ellipsoid
Frustum🎗️🎗️🎗️
FrustumSurface
Hexahedron
Line
ParaboloidSurface
ParametrizedCurve
Plane
Polyarea🎗️🎗️🎗️
Pyramid🎗️🎗️🎗️
Quadrangle
Ray
Ring
Rope
Segment
SimpleMesh🎗️🎗️🎗️
Sphere in 𝔼{2}
Sphere in 𝔼{3}
Tetrahedron in 𝔼{3}🛑
Triangle
Torus
Wedge🎗️🎗️🎗️
diff --git a/previews/PR131/usage/index.html b/previews/PR131/usage/index.html index d47c7f99..013f47ce 100644 --- a/previews/PR131/usage/index.html +++ b/previews/PR131/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