Skip to content

Commit

Permalink
Merge pull request #185 from agerlach/common_interface
Browse files Browse the repository at this point in the history
Cubature.jl Interface
  • Loading branch information
ChrisRackauckas authored Sep 28, 2023
2 parents 51108f1 + d1d7c9c commit d7427e7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/IntegralsCubature/src/IntegralsCubature.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ module IntegralsCubature
using Integrals, Cubature

import Integrals: transformation_if_inf, scale_x, scale_x!
import Cubature: INDIVIDUAL, PAIRED, L1, L2, LINF

abstract type AbstractCubatureJLAlgorithm <: SciMLBase.AbstractIntegralAlgorithm end
"""
CubatureJLh()
Multidimensional h-adaptive integration from Cubature.jl.
`error_norm` specifies the convergence criterion for vector valued integrands.
Defaults to `Cubature.INDIVIDUAL`, other options are
`Cubature.PAIRED`, `Cubature.L1`, `Cubature.L2`, or `Cubature.LINF`.
Defaults to `IntegralsCubature.INDIVIDUAL`, other options are
`IntegralsCubature.PAIRED`, `IntegralsCubature.L1`, `IntegralsCubature.L2`, or `IntegralsCubature.LINF`.
## References
Expand All @@ -29,7 +30,7 @@ publisher={Elsevier}
struct CubatureJLh <: AbstractCubatureJLAlgorithm
error_norm::Int32
end
CubatureJLh() = CubatureJLh(Cubature.INDIVIDUAL)
CubatureJLh(; error_norm = Cubature.INDIVIDUAL) = CubatureJLh(error_norm)

"""
CubatureJLp()
Expand All @@ -39,13 +40,13 @@ This method is based on repeatedly doubling the degree of the cubature rules,
until convergence is achieved.
The used cubature rule is a tensor product of Clenshaw–Curtis quadrature rules.
`error_norm` specifies the convergence criterion for vector valued integrands.
Defaults to `Cubature.INDIVIDUAL`, other options are
`Cubature.PAIRED`, `Cubature.L1`, `Cubature.L2`, or `Cubature.LINF`.
Defaults to `IntegralsCubature.INDIVIDUAL`, other options are
`IntegralsCubature.PAIRED`, `IntegralsCubature.L1`, `IntegralsCubature.L2`, or `IntegralsCubature.LINF`.
"""
struct CubatureJLp <: AbstractCubatureJLAlgorithm
error_norm::Int32
end
CubatureJLp() = CubatureJLp(Cubature.INDIVIDUAL)
CubatureJLp(; error_norm = Cubature.INDIVIDUAL) = CubatureJLp(error_norm)

function Integrals.__solvebp_call(prob::IntegralProblem,
alg::AbstractCubatureJLAlgorithm,
Expand Down

0 comments on commit d7427e7

Please sign in to comment.