Skip to content

Commit 101097e

Browse files
fix: remove jac/tgrad cache-related code
1 parent 9d5529e commit 101097e

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/systems/abstractsystem.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -899,27 +899,6 @@ end
899899

900900
has_equations(::AbstractSystem) = true
901901

902-
const EMPTY_TGRAD = Vector{Num}(undef, 0)
903-
const EMPTY_JAC = Matrix{Num}(undef, 0, 0)
904-
function invalidate_cache!(sys::AbstractSystem)
905-
if has_tgrad(sys)
906-
get_tgrad(sys)[] = EMPTY_TGRAD
907-
end
908-
if has_jac(sys)
909-
get_jac(sys)[] = EMPTY_JAC
910-
end
911-
if has_ctrl_jac(sys)
912-
get_ctrl_jac(sys)[] = EMPTY_JAC
913-
end
914-
if has_Wfact(sys)
915-
get_Wfact(sys)[] = EMPTY_JAC
916-
end
917-
if has_Wfact_t(sys)
918-
get_Wfact_t(sys)[] = EMPTY_JAC
919-
end
920-
return sys
921-
end
922-
923902
function Setfield.get(obj::AbstractSystem, ::Setfield.PropertyLens{field}) where {field}
924903
getfield(obj, field)
925904
end

0 commit comments

Comments
 (0)