Skip to content

Commit 569a457

Browse files
fix: re-add invalidate_cache! for use with new metadata
1 parent b70714d commit 569a457

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/structural_transformation/StructuralTransformations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ using ModelingToolkit: System, AbstractSystem, var_from_nested_derivative, Diffe
2121
has_tearing_state, defaults, InvalidSystemException,
2222
ExtraEquationsSystemException,
2323
ExtraVariablesSystemException,
24-
vars!,
24+
vars!, invalidate_cache!,
2525
IncrementalCycleTracker, add_edge_checked!, topological_sort,
2626
filter_kwargs, lower_varname_with_unit,
2727
lower_shift_varname_with_unit, setio, SparseMatrixCLIL,

src/systems/abstractsystem.jl

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

900900
has_equations(::AbstractSystem) = true
901901

902+
"""
903+
$(TYPEDSIGNATURES)
904+
905+
Invalidate cached jacobians, etc.
906+
"""
907+
invalidate_cache!(sys::AbstractSystem) = sys
908+
902909
function Setfield.get(obj::AbstractSystem, ::Setfield.PropertyLens{field}) where {field}
903910
getfield(obj, field)
904911
end

0 commit comments

Comments
 (0)