Integral Problems

SciMLBase.IntegralProblemType

Defines an integral problem. Documentation Page: https://docs.sciml.ai/Integrals/stable/

Mathematical Specification of an Integral Problem

Integral problems are multi-dimensional integrals defined as:

\[\int_{lb}^{ub} f(u,p) du\]

where p are parameters. u is a Number or AbstractVector whose geometry matches the space being integrated. This space is bounded by the lowerbound lb and upperbound ub, which are Numbers or AbstractVectors with the same geometry as u.

Problem Type

Constructors

IntegralProblem(f::AbstractIntegralFunction,domain,p=NullParameters(); kwargs...)
IntegralProblem(f::AbstractIntegralFunction,lb,ub,p=NullParameters(); kwargs...)
IntegralProblem(f,domain,p=NullParameters(); nout=nothing, batch=nothing, kwargs...)
IntegralProblem(f,lb,ub,p=NullParameters(); nout=nothing, batch=nothing, kwargs...)
  • f: the integrand, callable function y = f(u,p) for out-of-place (default) or an IntegralFunction or BatchIntegralFunction for inplace and batching optimizations.
  • domain: an object representing an integration domain, i.e. the tuple (lb, ub).
  • lb: DEPRECATED: Either a number or vector of lower bounds.
  • ub: DEPRECATED: Either a number or vector of upper bounds.
  • p: The parameters associated with the problem.
  • nout: DEPRECATED (see IntegralFunction): length of the vector output of the integrand (by default the integrand is assumed to be scalar)
  • batch: DEPRECATED (see BatchIntegralFunction): number of points the integrand can evaluate simultaneously (by default there is no batching)
  • kwargs: Keyword arguments copied to the solvers.

Additionally, we can supply iip like IntegralProblem{iip}(...) as true or false to declare at compile time whether the integrator function is in-place.

Fields

The fields match the names of the constructor arguments.

source

The correct shape of the variables (inputs) u and the values (outputs) y of the integrand f depends on whether batching is used.

If batch == 0

single variable fmultiple variable f
scalar valued fu is a scalar, y is a scalaru is a vector, y is a scalar
vector valued fu is a scalar, y is a vectoru is a vector, y is a vector

If batch > 0

single variable fmultiple variable f
scalar valued fu is a vector, y is a vectoru is a matrix, y is a vector
vector valued fu is a vector, y is a matrixu is a matrix, y is a matrix

The last dimension is always used as the batching dimension, e.g., if u is a matrix, then u[:,i] is the ith point where the integrand will be evaluated.