Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 59b5c76

Browse files
vpuri3gaurav-arya
authored andcommitted
update_coeffs(L::ADVecProd,...) will recursively call update_coeffs(L.f,...)
1 parent 53755d8 commit 59b5c76

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/differentiation/jaches_products.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,12 @@ struct FwdModeAutoDiffVecProd{F,U,C,V,V!} <: AbstractAutoDiffVecProd
207207
end
208208

209209
function update_coefficients(L::FwdModeAutoDiffVecProd, u, p, t)
210-
FwdModeAutoDiffVecProd(L.f, u, L.vecprod, L.vecprod!, L.cache)
210+
f = update_coefficients(L.f, u, p, t)
211+
FwdModeAutoDiffVecProd(f, u, L.vecprod, L.vecprod!, L.cache)
211212
end
212213

213214
function update_coefficients!(L::FwdModeAutoDiffVecProd, u, p, t)
215+
update_coefficients!(L.f, u, p, t)
214216
copy!(L.u, u)
215217
L
216218
end

src/differentiation/vecjac_products.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ struct RevModeAutoDiffVecProd{ad,iip,oop,F,U,C,V,V!} <: AbstractAutoDiffVecProd
6565
end
6666

6767
function update_coefficients(L::RevModeAutoDiffVecProd, u, p, t)
68-
RevModeAutoDiffVecProd(L.f, u, L.vecprod, L.vecprod!, L.cache)
68+
f = update_coefficients(L.f, u, p, t)
69+
RevModeAutoDiffVecProd(f, u, L.vecprod, L.vecprod!, L.cache)
6970
end
7071

7172
function update_coefficients!(L::RevModeAutoDiffVecProd, u, p, t)
73+
update_coefficients!(L.f, u, p, t)
7274
copy!(L.u, u)
7375
L
7476
end

0 commit comments

Comments
 (0)