@@ -2310,11 +2310,12 @@ For more details on this argument, see the ODEFunction documentation.
2310
2310
2311
2311
The fields of the BVPFunction type directly match the names of the inputs.
2312
2312
"""
2313
- struct BVPFunction{iip, specialize, twopoint, F, BF, TMM, Ta, Tt, TJ, BCTJ, JVP, VJP,
2313
+ struct BVPFunction{iip, specialize, twopoint, F, BF, C, TMM, Ta, Tt, TJ, BCTJ, JVP, VJP,
2314
2314
JP, BCJP, BCRP, SP, TW, TWt, TPJ, O, TCV, BCTCV,
2315
2315
SYS, ID} <: AbstractBVPFunction{iip, twopoint}
2316
2316
f:: F
2317
2317
bc:: BF
2318
+ cost:: C
2318
2319
mass_matrix:: TMM
2319
2320
analytic:: Ta
2320
2321
tgrad:: Tt
@@ -4326,6 +4327,7 @@ function MultiObjectiveOptimizationFunction{iip}(f, adtype::AbstractADType = NoA
4326
4327
end
4327
4328
4328
4329
function BVPFunction {iip, specialize, twopoint} (f, bc;
4330
+ cost = (x, p) -> zero (x),
4329
4331
mass_matrix = __has_mass_matrix (f) ? f. mass_matrix : I,
4330
4332
analytic = __has_analytic (f) ? f. analytic : nothing ,
4331
4333
tgrad = __has_tgrad (f) ? f. tgrad : nothing ,
@@ -4464,7 +4466,7 @@ function BVPFunction{iip, specialize, twopoint}(f, bc;
4464
4466
sys = something (sys, SymbolCache (syms, paramsyms, indepsym))
4465
4467
4466
4468
if specialize === NoSpecialize
4467
- BVPFunction{iip, specialize, twopoint, Any, Any, Any, Any, Any,
4469
+ BVPFunction{iip, specialize, twopoint, Any, Any, Any, Any, Any, Any,
4468
4470
Any, Any, Any, Any, Any, Any, Any, Any, Any, Any,
4469
4471
Any,
4470
4472
Any, typeof (_colorvec), typeof (_bccolorvec), Any, Any}(
@@ -4474,14 +4476,14 @@ function BVPFunction{iip, specialize, twopoint}(f, bc;
4474
4476
sparsity, Wfact, Wfact_t, paramjac, observed,
4475
4477
_colorvec, _bccolorvec, sys, initialization_data)
4476
4478
else
4477
- BVPFunction{iip, specialize, twopoint, typeof (_f), typeof (bc),
4479
+ BVPFunction{iip, specialize, twopoint, typeof (_f), typeof (bc), typeof (cost),
4478
4480
typeof (mass_matrix), typeof (analytic), typeof (tgrad), typeof (jac),
4479
4481
typeof (bcjac), typeof (jvp), typeof (vjp), typeof (jac_prototype),
4480
4482
typeof (bcjac_prototype), typeof (bcresid_prototype), typeof (sparsity),
4481
4483
typeof (Wfact), typeof (Wfact_t), typeof (paramjac), typeof (observed),
4482
4484
typeof (_colorvec), typeof (_bccolorvec), typeof (sys),
4483
4485
typeof (initialization_data)}(
4484
- _f, bc, mass_matrix, analytic,
4486
+ _f, bc, cost, mass_matrix, analytic,
4485
4487
tgrad, jac, bcjac, jvp, vjp,
4486
4488
jac_prototype, bcjac_prototype, bcresid_prototype, sparsity,
4487
4489
Wfact, Wfact_t, paramjac,
0 commit comments