Skip to content

Commit afe91cb

Browse files
some fixes
1 parent 9c95fa5 commit afe91cb

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/diffeq.jl

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
function remove_node!(integrator::DiffEqBase.DEIntegrator, I...)
2-
idxs = getindices(integrator.u, I...)
3-
for c in user_cache(integrator)
2+
#idxs = getindices(integrator.u, I...)
3+
for c in full_cache(integrator)
44
remove_node!(c, I...)
55
end
6-
deleteat_non_user_cache!(integrator, idxs)
6+
#deleteat_non_user_cache!(integrator, idxs)
77
end
88

99
function add_node!(integrator::DiffEqBase.DEIntegrator, x, I...)
10-
cur_len = length(integrator.u)
11-
add_len = length(x)
12-
for c in user_cache(integrator)
10+
#cur_len = length(integrator.u)
11+
#add_len = length(x)
12+
#last_idx = length(integrator.u[I...].nodes)
13+
#idxs = getindices(integrator.u, I..., last_idx)
14+
for c in full_cache(integrator)
1315
add_node!(c, similar(x, eltype(c)), I...)
1416
end
15-
last_idx = length(integrator.u[I...].nodes)
16-
idxs = getindices(integrator.u, I..., last_idx)
17-
addat_non_user_cache!(integrator, idxs)
17+
#addat_non_user_cache!(integrator, idxs)
1818
end
1919

20+
function add_node!(integrator::DiffEqBase.DEIntegrator, x, I...)
21+
2022
reshape(m::AbstractMultiScaleArray, i::Int...) = m

test/dynamic_diffeq.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using MultiScaleArrays
2-
using OrdinaryDiffEq, DiffEqBase, Test, StochasticDiffEq
2+
using OrdinaryDiffEq, DiffEqBase, Test, StochasticDiffEq, Statistics
33

44
#=
55
struct Cell{B} <: AbstractMultiScaleArrayLeaf{B}

test/indexing_and_creation_tests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ p = construct(Population, deepcopy([cell1, cell2]))
4949
@test p[5] == 5
5050

5151
sim_p = similar(p)
52-
sim_p_arr = similar(p, indices(p))
52+
sim_p_arr = similar(p, axes(p))
5353

5454
@test typeof(sim_p) <: Population
5555
@test typeof(sim_p_arr) <: Vector{Float64}

0 commit comments

Comments
 (0)