Skip to content

Commit

Permalink
remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Pepijn de Vos committed Nov 14, 2023
1 parent 6590b87 commit 6e73c9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/dense/generic_dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ end
end

@inline function ode_interpolant(Θ, integrator::DiffEqBase.DEIntegrator, idxs, deriv)
@show integrator.f.mass_matrix
DiffEqBase.addsteps!(integrator)
if !(integrator.cache isa CompositeCache)
val = ode_interpolant(Θ, integrator.dt, integrator.uprev, integrator.u,
Expand Down Expand Up @@ -120,7 +119,6 @@ end
end

@inline function ode_interpolant!(val, Θ, integrator::DiffEqBase.DEIntegrator, idxs, deriv)
@show "!" integrator.f.mass_matrix
DiffEqBase.addsteps!(integrator)
if !(integrator.cache isa CompositeCache)
ode_interpolant!(val, Θ, integrator.dt, integrator.uprev, integrator.u,
Expand Down Expand Up @@ -328,7 +326,6 @@ function get_differential_vars(f, size)
# @show typeof(mm)
end
end
@show differential_vars
end

"""
Expand Down Expand Up @@ -584,7 +581,6 @@ end

function ode_interpolant(Θ, dt, y₀, y₁, k, cache::OrdinaryDiffEqMutableCache, idxs,
T::Type{Val{TI}}, differential_vars=trues(size(y₀))) where {TI}
@show differential_vars
if idxs isa Number || y₀ isa Union{Number, SArray}
# typeof(y₀) can be these if saveidxs gives a single value
_ode_interpolant(Θ, dt, y₀, y₁, k, cache, idxs, T, differential_vars)
Expand Down Expand Up @@ -665,7 +661,6 @@ end
function partial_hermite_interpolant(Θ, dt, y₀, y₁, k, cache, idxs, T::Type{Val{TI}}, differential_vars) where {TI}
throw("how did we get here")
@assert all(differential_vars)
@show differential_vars
hermite_interpolant(Θ, dt, y₀, y₁, k, Val{cache isa OrdinaryDiffEqMutableCache}, idxs, T)
end

Expand All @@ -682,9 +677,8 @@ function partial_hermite_interpolant!(out::AbstractArray, Θ, dt, y₀::AT, y₁
if ArrayInterface.fast_scalar_indexing(AT)
partial_hermite_interpolant!(out, Θ, dt, y₀, y₁, k, cache, eachindex(IndexLinear(), y₀), T, differential_vars)
else
@show differential_vars
@show h = hermite_interpolant(Θ, dt, y₀, y₁, k, Val{cache isa OrdinaryDiffEqMutableCache}, idxs, T)
@show l = linear_interpolant(Θ, dt, y₀, y₁, idxs, T)
h = hermite_interpolant(Θ, dt, y₀, y₁, k, Val{cache isa OrdinaryDiffEqMutableCache}, idxs, T)
l = linear_interpolant(Θ, dt, y₀, y₁, idxs, T)
@.. broadcast=false out=h*differential_vars + l*!differential_vars
end
end
Expand All @@ -708,7 +702,7 @@ end
function partial_hermite_interpolant!(out, Θ, dt, y₀, y₁, k, cache, idxs, T::Type{Val{TI}}, differential_vars) where {TI}
throw("how did we get here")
@assert all(differential_vars)
@show differential_vars
differential_vars
hermite_interpolant!(out, Θ, dt, y₀, y₁, k, idxs, T)
end

Expand Down
1 change: 1 addition & 0 deletions test/interface/noindex_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function Base.similar(bc::Base.Broadcast.Broadcasted{NoIndexStyle{N}},
end
Base.Broadcast._broadcast_getindex(x::NoIndexArray, i) = x.x[i]
Base.Broadcast.extrude(x::NoIndexArray) = x
using ArrayInterface
ArrayInterface.fast_scalar_indexing(::Type{<:NoIndexArray}) = false

@inline function Base.copyto!(dest::NoIndexArray,
Expand Down

0 comments on commit 6e73c9e

Please sign in to comment.