the.bay.news

Where do these NaNs in my KernelAbstraction derivative come from?

Julia Programming Language
Where do these NaNs in my KernelAbstraction derivative come from?
Hi, I (mostly chatgpt though) am working on an MHD code using KernelAbstractions.jl, Reactant.jl and Enzyme.jl. In one step, a kernel derivative produces NaNs whereas the reactant gradient using plain arrays gives correct gradients (zero). The function I’m calculating is q = ρ * (v \cdot n), with derivatives dρ = λ v \cdot n, dv = λ ρ n and dn = λ ρ v, and λ the incoming derivative. So when (\rho, v, n) = (1,0,0) the derivative is (d\rho, dv, dn) = (0,0,0) and for (\rho, v, n) = (1,0,1) th...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.