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