File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
lib/SciMLJacobianOperators/src Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,35 @@ function get_dense_ad(ad::AutoSparse)
404404 return dense_ad
405405end
406406
407+ function Base. copy (J:: JacobianOperator )
408+ return JacobianOperator (
409+ J. mode,
410+ J. jvp_op,
411+ J. vjp_op,
412+ copy (J. size),
413+ copy (J. input_cache),
414+ copy (J. output_cache)
415+ )
416+ end
417+
418+ function Base. copy (J:: StatefulJacobianOperator )
419+ return StatefulJacobianOperator (
420+ copy (J. jac_op),
421+ copy (u),
422+ copy (p)
423+ )
424+ end
425+
426+ function Base. copy (J:: StatefulJacobianNormalFormOperator )
427+ return StatefulJacobianNormalFormOperator (
428+ copy (J. vjp_operator),
429+ copy (J. jvp_operator),
430+ copy (J. cache)
431+ )
432+
433+ end
434+
435+
407436export JacobianOperator, VecJacOperator, JacVecOperator
408437export StatefulJacobianOperator
409438export StatefulJacobianNormalFormOperator
You can’t perform that action at this time.
0 commit comments