Skip to content

Commit

Permalink
add modified set_state! for smap
Browse files Browse the repository at this point in the history
  • Loading branch information
rusandris committed Nov 4, 2024
1 parent e437d92 commit 96d41f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/derived_systems/parallel_systems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ function set_state!(pdsa::PDSAM, u::AbstractArray, i::Int = 1)
return pdsa
end


function set_state!(pdsa::PDSAM{<: StroboscopicMap}, u::AbstractArray, i::Int = 1) where D
current_state(pdsa, i) .= u
u_modified!(pdsa.ds.ds.integ, true)
return pdsa
end


# We make one more extension here: for continuous time, in place systems
# the state is a matrix (each column a parallel state) for performance.
# re-init will not work because there is no way to do the recursive copy. we do it ourselves
Expand Down

0 comments on commit 96d41f1

Please sign in to comment.