@@ -2056,9 +2056,10 @@ out-of-place handling.
2056
2056
IntegralFunction{iip,specialize}(f, [integrand_prototype])
2057
2057
```
2058
2058
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
2060
2060
`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.
2062
2063
2063
2064
## iip: In-Place vs Out-Of-Place
2064
2065
@@ -2114,14 +2115,14 @@ BatchIntegralFunction{iip,specialize}(bf, [integrand_prototype];
2114
2115
max_batch=typemax(Int))
2115
2116
```
2116
2117
Note 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
2118
2119
a last "batching" dimension.
2119
2120
2120
2121
The keyword `max_batch` is used to set a soft limit on the number of points to
2121
2122
batch at the same time so that memory usage is controlled.
2122
2123
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 .
2125
2126
2126
2127
## iip: In-Place vs Out-Of-Place
2127
2128
@@ -3158,7 +3159,8 @@ function DAEFunction{iip, specialize}(f;
3158
3159
colorvec = __has_colorvec (f) ? f. colorvec : nothing ,
3159
3160
sys = __has_sys (f) ? f. sys : nothing ,
3160
3161
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,
3162
3164
specialize
3163
3165
}
3164
3166
if jac === nothing && isa (jac_prototype, AbstractSciMLOperator)
@@ -3854,10 +3856,7 @@ function IntegralFunction(f)
3854
3856
end
3855
3857
function IntegralFunction (f, integrand_prototype)
3856
3858
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)
3861
3860
end
3862
3861
3863
3862
function BatchIntegralFunction {iip, specialize} (f, integrand_prototype;
@@ -3890,10 +3889,7 @@ function BatchIntegralFunction(f; kwargs...)
3890
3889
end
3891
3890
function BatchIntegralFunction (f, integrand_prototype; kwargs... )
3892
3891
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... )
3897
3893
end
3898
3894
3899
3895
# ######### Utility functions
0 commit comments