@@ -2056,9 +2056,10 @@ out-of-place handling.
20562056IntegralFunction{iip,specialize}(f, [integrand_prototype])
20572057```
20582058
2059- Note that only `f` is required, and in the case of inplace integrands a mutable container
2059+ Note that only `f` is required, and in the case of inplace integrands a mutable array
20602060`integrand_prototype` to store the result of the integrand. If `integrand_prototype` is
2061- present, `f` is interpreted as in-place, and otherwise `f` is assumed to be out-of-place.
2061+ present for either in-place or out-of-place integrands it is used to infer the return type
2062+ of the integrand.
20622063
20632064## iip: In-Place vs Out-Of-Place
20642065
@@ -2114,14 +2115,14 @@ BatchIntegralFunction{iip,specialize}(bf, [integrand_prototype];
21142115 max_batch=typemax(Int))
21152116```
21162117Note that only `bf` is required, and in the case of inplace integrands a mutable
2117- container `integrand_prototype` to store a batch of integrand evaluations, with
2118+ array `integrand_prototype` to store a batch of integrand evaluations, with
21182119a last "batching" dimension.
21192120
21202121The keyword `max_batch` is used to set a soft limit on the number of points to
21212122batch at the same time so that memory usage is controlled.
21222123
2123- If `integrand_prototype` is present, `bf` is interpreted as in- place, and
2124- otherwise `bf` is assumed to be out-of-place .
2124+ If `integrand_prototype` is present for either in-place or out-of- place integrands it is
2125+ used to infer the return type of the integrand .
21252126
21262127## iip: In-Place vs Out-Of-Place
21272128
@@ -3158,7 +3159,8 @@ function DAEFunction{iip, specialize}(f;
31583159 colorvec = __has_colorvec (f) ? f. colorvec : nothing ,
31593160 sys = __has_sys (f) ? f. sys : nothing ,
31603161 initializeprob = __has_initializeprob (f) ? f. initializeprob : nothing ,
3161- initializeprobmap = __has_initializeprobmap (f) ? f. initializeprobmap : nothing ) where {iip,
3162+ initializeprobmap = __has_initializeprobmap (f) ? f. initializeprobmap : nothing ) where {
3163+ iip,
31623164 specialize
31633165}
31643166 if jac === nothing && isa (jac_prototype, AbstractSciMLOperator)
@@ -3854,10 +3856,7 @@ function IntegralFunction(f)
38543856end
38553857function IntegralFunction (f, integrand_prototype)
38563858 calculated_iip = isinplace (f, 3 , " integral" , true )
3857- if ! calculated_iip
3858- throw (IntegrandMismatchFunctionError (calculated_iip, true ))
3859- end
3860- IntegralFunction {true} (f, integrand_prototype)
3859+ IntegralFunction {calculated_iip} (f, integrand_prototype)
38613860end
38623861
38633862function BatchIntegralFunction {iip, specialize} (f, integrand_prototype;
@@ -3890,10 +3889,7 @@ function BatchIntegralFunction(f; kwargs...)
38903889end
38913890function BatchIntegralFunction (f, integrand_prototype; kwargs... )
38923891 calculated_iip = isinplace (f, 3 , " batchintegral" , true )
3893- if ! calculated_iip
3894- throw (IntegrandMismatchFunctionError (calculated_iip, true ))
3895- end
3896- BatchIntegralFunction {true} (f, integrand_prototype; kwargs... )
3892+ BatchIntegralFunction {calculated_iip} (f, integrand_prototype; kwargs... )
38973893end
38983894
38993895# ######### Utility functions
0 commit comments