@@ -672,6 +672,17 @@ function _jtprod_nln!(cons, x, v, Jtv)
672
672
sjacobian! (nothing , (Jtv, v), cons, x, one (eltype (Jtv)))
673
673
end
674
674
675
+ function hess_coord! (
676
+ m:: ExaModel ,
677
+ x:: AbstractVector ,
678
+ hess:: AbstractVector ;
679
+ obj_weight = one (eltype (x)),
680
+ )
681
+ fill! (hess, zero (eltype (hess)))
682
+ _obj_hess_coord! (m. objs, x, hess, obj_weight)
683
+ return hess
684
+ end
685
+
675
686
function hess_coord! (
676
687
m:: ExaModel ,
677
688
x:: AbstractVector ,
@@ -680,14 +691,14 @@ function hess_coord!(
680
691
obj_weight = one (eltype (x)),
681
692
)
682
693
fill! (hess, zero (eltype (hess)))
683
- _obj_hess_coord! (m. objs, x, y, hess, obj_weight)
694
+ _obj_hess_coord! (m. objs, x, hess, obj_weight)
684
695
_con_hess_coord! (m. cons, x, y, hess, obj_weight)
685
696
return hess
686
697
end
687
698
688
- _obj_hess_coord! (objs:: ObjectiveNull , x, y, hess, obj_weight) = nothing
689
- function _obj_hess_coord! (objs, x, y, hess, obj_weight)
690
- _obj_hess_coord! (objs. inner, x, y, hess, obj_weight)
699
+ _obj_hess_coord! (objs:: ObjectiveNull , x, hess, obj_weight) = nothing
700
+ function _obj_hess_coord! (objs, x, hess, obj_weight)
701
+ _obj_hess_coord! (objs. inner, x, hess, obj_weight)
691
702
shessian! (hess, nothing , objs, x, obj_weight, zero (eltype (hess)))
692
703
end
693
704
@@ -697,6 +708,18 @@ function _con_hess_coord!(cons, x, y, hess, obj_weight)
697
708
shessian! (hess, nothing , cons, x, y, zero (eltype (hess)))
698
709
end
699
710
711
+ function hprod! (
712
+ m:: ExaModel ,
713
+ x:: AbstractVector ,
714
+ v:: AbstractVector ,
715
+ Hv:: AbstractVector ;
716
+ obj_weight = one (eltype (x)),
717
+ )
718
+ fill! (Hv, zero (eltype (Hv)))
719
+ _obj_hprod! (m. objs, x, v, Hv, obj_weight)
720
+ return Hv
721
+ end
722
+
700
723
function hprod! (
701
724
m:: ExaModel ,
702
725
x:: AbstractVector ,
@@ -706,14 +729,14 @@ function hprod!(
706
729
obj_weight = one (eltype (x)),
707
730
)
708
731
fill! (Hv, zero (eltype (Hv)))
709
- _obj_hprod! (m. objs, x, y, v, Hv, obj_weight)
732
+ _obj_hprod! (m. objs, x, v, Hv, obj_weight)
710
733
_con_hprod! (m. cons, x, y, v, Hv, obj_weight)
711
734
return Hv
712
735
end
713
736
714
- _obj_hprod! (objs:: ObjectiveNull , x, y, v, Hv, obj_weight) = nothing
715
- function _obj_hprod! (objs, x, y, v, Hv, obj_weight)
716
- _obj_hprod! (objs. inner, x, y, v, Hv, obj_weight)
737
+ _obj_hprod! (objs:: ObjectiveNull , x, v, Hv, obj_weight) = nothing
738
+ function _obj_hprod! (objs, x, v, Hv, obj_weight)
739
+ _obj_hprod! (objs. inner, x, v, Hv, obj_weight)
717
740
shessian! ((Hv, v), nothing , objs, x, obj_weight, zero (eltype (Hv)))
718
741
end
719
742
0 commit comments