Skip to content

Commit 1de9d10

Browse files
Merge remote-tracking branch 'origin/master'
2 parents af9b7fd + e4a6b51 commit 1de9d10

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

src/DiffEqBase.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,6 @@ export ConvergenceSetup
160160

161161
export ContinuousCallback, DiscreteCallback, CallbackSet
162162

163+
export copy_non_array_fields
164+
163165
end # module

src/data_array.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ size(A::DEDataArray) = size(A.x)
1515
:($(assignments...); dest)
1616
end
1717

18+
@generated function copy_non_array_fields{T<:DEDataArray}(previous::T, arr::AbstractArray)
19+
assignments = [:(getfield(previous,$i)) for i=2:nfields(T)]
20+
:(T(arr,$(assignments...)))
21+
end
22+
1823
getindex( A::DEDataArray, i::Int) = (A.x[i])
1924
setindex!(A::DEDataArray, x, i::Int) = (A.x[i] = x)
2025
getindex( A::DEDataArray, i::Int...) = (A.x[i...])

src/integrator_interface.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
resize!(i::DEIntegrator,ii::Int) = error("This method has not been implemented for the integrator")
2-
deleteat!(i::DEIntegrator,ii) = error("This method has not been implemented for the integrator")
3-
addat!(i::DEIntegrator,ii,val=zeros(length(idxs))) = error("This method has not been implemented for the integrator")
4-
user_cache(i::DEIntegrator) = error("This method has not been implemented for the integrator")
5-
u_cache(i::DEIntegrator) = error("This method has not been implemented for the integrator")
6-
du_cache(i::DEIntegrator) = error("This method has not been implemented for the integrator")
7-
full_cache(i::DEIntegrator) = error("This method has not been implemented for the integrator")
8-
resize_non_user_cache!(i::DEIntegrator,ii::Int) = error("This method has not been implemented for the integrator")
9-
deleteat_non_user_cache!(i::DEIntegrator,idxs) = error("This method has not been implemented for the integrator")
10-
addat_non_user_cache!(i::DEIntegrator,idxs) = error("This method has not been implemented for the integrator")
11-
terminate!(i::DEIntegrator) = error("This method has not been implemented for the integrator")
12-
get_du(i::DEIntegrator) = error("This method has not been implemented for the integrator")
13-
get_dt(i::DEIntegrator) = error("This method has not been implemented for the integrator")
14-
get_proposed_dt(i::DEIntegrator) = error("This method has not been implemented for the integrator")
15-
modify_proposed_dt!(i::DEIntegrator) = error("This method has not been implemented for the integrator")
16-
u_modified!(i::DEIntegrator,bool) = error("This method has not been implemented for the integrator")
17-
savevalues!(i::DEIntegrator) = error("This method has not been implemented for the integrator")
18-
add_tstop!(i::DEIntegrator,t) = error("This method has not been implemented for the integrator")
19-
add_saveat!(i::DEIntegrator,t) = error("This method has not been implemented for the integrator")
20-
set_abstol!(i::DEIntegrator,t) = error("This method has not been implemented for the integrator")
21-
set_reltol!(i::DEIntegrator,t) = error("This method has not been implemented for the integrator")
1+
resize!(i::DEIntegrator,ii::Int) = error("resize!: method has not been implemented for the integrator")
2+
deleteat!(i::DEIntegrator,ii) = error("deleteat!: method has not been implemented for the integrator")
3+
addat!(i::DEIntegrator,ii,val=zeros(length(idxs))) = error("addat!: method has not been implemented for the integrator")
4+
user_cache(i::DEIntegrator) = error("user_cache: method has not been implemented for the integrator")
5+
u_cache(i::DEIntegrator) = error("u_cache: method has not been implemented for the integrator")
6+
du_cache(i::DEIntegrator) = error("du_cache: method has not been implemented for the integrator")
7+
full_cache(i::DEIntegrator) = error("full_cache: method has not been implemented for the integrator")
8+
resize_non_user_cache!(i::DEIntegrator,ii::Int) = error("resize_non_user_cache!: method has not been implemented for the integrator")
9+
deleteat_non_user_cache!(i::DEIntegrator,idxs) = error("deleteat_non_user_cache!: method has not been implemented for the integrator")
10+
addat_non_user_cache!(i::DEIntegrator,idxs) = error("addat_non_user_cache!: method has not been implemented for the integrator")
11+
terminate!(i::DEIntegrator) = error("terminate!: method has not been implemented for the integrator")
12+
get_du(i::DEIntegrator) = error("get_du: method has not been implemented for the integrator")
13+
get_dt(i::DEIntegrator) = error("get_dt: method has not been implemented for the integrator")
14+
get_proposed_dt(i::DEIntegrator) = error("get_proposed_dt: method has not been implemented for the integrator")
15+
modify_proposed_dt!(i::DEIntegrator) = error("modify_proposed_dt!: method has not been implemented for the integrator")
16+
u_modified!(i::DEIntegrator,bool) = error("u_modified!: method has not been implemented for the integrator")
17+
savevalues!(i::DEIntegrator) = error("savevalues!: method has not been implemented for the integrator")
18+
add_tstop!(i::DEIntegrator,t) = error("add_tstop!: method has not been implemented for the integrator")
19+
add_saveat!(i::DEIntegrator,t) = error("add_saveat!: method has not been implemented for the integrator")
20+
set_abstol!(i::DEIntegrator,t) = error("set_abstol!: method has not been implemented for the integrator")
21+
set_reltol!(i::DEIntegrator,t) = error("set_reltol!: method has not been implemented for the integrator")
2222

2323
### Addat isn't a real thing. Let's make it a real thing Gretchen
2424

0 commit comments

Comments
 (0)