Skip to content

Commit

Permalink
Update interpolation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Aug 8, 2024
1 parent a711045 commit 072e352
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -608,3 +608,14 @@ Constant Interpolation
@. out = 0
end
end

"""
strip_interpolation(id::AbstractDiffEqInterpolation)
Returns a copy of the interpolation stripped of its function, to accommodate serialization.
If the interpolation object has no function, returns the interpolation object as is.
"""
strip_interpolation(id::AbstractDiffEqInterpolation) = id
strip_interpolation(id::HermiteInterpolation) = id
strip_interpolation(id::LinearInterpolation) = id
strip_interpolation(id::ConstantInterpolation) = id

0 comments on commit 072e352

Please sign in to comment.