You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to use StructArrays with DifferentialEquations.jl.
But I can't make it works together 😦
From the stacktrace I understand that when the differential equation package tries to set all the lattice sites to abstol like @.. u = abstol + ... then there is an error.
Is there any solution for that?
Here is my MWE:
using StructArrays, DifferentialEquations
const s = StructArray{ComplexF64, 2, NamedTuple{(:re, :im), Tuple{Matrix{Float64}, Matrix{Float64}}}, Int64}
function ghost_holomorphic_flow_NN!(dpsi::s, psi::s, param, time::Float64)
(L, M) = param
for t in 1:M, x=1:L
dpsi.re[x,t] = 1.0
dpsi.im[x,t] = 1.0
end
end
L = 10
M = 12
param = (L,M)
tspan = (0.0, 1.0)
ghost_psi = zeros(ComplexF64,L,M)
pad_psi0 = StructArray(ghost_psi)
prob = ODEProblem(ghost_holomorphic_flow_NN!, pad_psi0, tspan, param)
integrator = init(prob, Tsit5())
# sol = solve!(integrator)
Hi,
I'm trying to use StructArrays with DifferentialEquations.jl.
But I can't make it works together 😦
From the stacktrace I understand that when the differential equation package tries to set all the lattice sites to
abstol
like@.. u = abstol + ...
then there is an error.Is there any solution for that?
Here is my MWE:
Thanks in advance!
Here is the discourse discussion.
The text was updated successfully, but these errors were encountered: