Open jiweiqi opened 3 years ago
'sens_BVP'
mthread=10
thread = 18 on Linux
![eigs](https://user-images.githubusercontent.com/8445647/112236163-45042200-8c16-11eb-8a85-93531cf0a9a9.png)
Debuging code
for i = 2:ng
u = @view(pred[:, i])
du = similar(u)
i_F = 1 + (i - 1) * nu:i * nu - 1
@view(Fp[i_F, :]) .= jacobian((du, x) -> dudt!(du, u, x, 0.0),
du, p)::Array{Float64,2} .* (-idt)
@view(Fy[i_F, i_F]) .= jacobian((du, x) -> dudt!(du, x, p, 0.0),
du, u)::Array{Float64,2} .* (-idt)
end
@show sum(Fp) sum(Fy)
@show sum(Fy[end-nu:end, end-nu:end])
@show sum(Fy[end-20*nu:end, end-20*nu:end])
@threads for i = 2:ng
u = @view(pred[:, i])
du = similar(u)
i_F = 1 + (i - 1) * nu:i * nu - 1
Fp[i_F, :] .= jacobian((du, x) -> dudt!(du, u, x, 0.0),
du, p)::Array{Float64,2} .* (-idt)
end
@threads for i = 2:ng
u = @view(pred[:, i])
du = similar(u)
i_F = 1 + (i - 1) * nu:i * nu - 1
Fy[i_F, i_F] .= jacobian((du, x) -> dudt!(du, x, p, 0.0),
du, u)::Array{Float64,2} .* (-idt)
end
@show sum(Fp) sum(Fy)
@show sum(Fy[end-nu:end, end-nu:end])
@show sum(Fy[end-20*nu:end, end-20*nu:end])
'h2o2 brute force' p_diff = 5e-4
p_diff = 5e-3
p_diff = 5e-2
p_diff = 5e-1