ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Forward Mode Automatic Differentiation for Julia
Sometimes it's useful to take different partials with different precisions or take some partials symbolically. Unfortunately, the assumption that partials are all of the same type is baked pretty deep...
Let us say that we have a sparse matrix where the entries are Dual numbers. ```julia using ForwardDiff, SparseArrays d = ForwardDiff.Dual(1.0, 2.0) a = sparse([0 d]) ``` Let us...
``` julia> a = randn(3,3) b =3×3 Matrix{Float64}: ra 0.0237017 1.62282 -1.28889 -0.186575 -2.00309 0.502572 -0.413123 -1.99718 -0.174593 julia> b = randn(3,3) 3×3 Matrix{Float64}: -0.40664 1.80043 1.2399 1.22559 -0.828653 1.38103...
See my [gist](https://gist.github.com/jwscook/a8be5c11440981d6de2270a7bf633551) for what I'm trying to achieve. I'm using NLsolve to find the cartesian coordinates given curvilinear coordinates and a function that returns curvilinear coordinates given cartesian coordinates...
It looks like the source of the problem is that `recursive_unitless_bottom_eltype` from `RecursiveArrayTools` is inferring an `Int64` type rather than a `Float64` type from the `Dual` of a `LabelledArray`. This...
It seems that modulo periodicity that seems to break ForwardDiff: If I give it a very simple function that should be differentiable, but use a modulo for time, then this...
We do prototyping of a time integration using a handwritten residual function (50 lines) and Jacobian (100 lines): ``` Julia while norm_res > eps iteration = iteration + 1 for...
Hi, I am encountering type instabilities whan calling `jacobian!`. As I use this in the inner loop of a finite volume operator assembly, this is serious performatnce hit. A remedy...
Hi there, MWE ```julia newton_f(x, p) = x^p[1] - 1.0 newton_df(x, p)= p[1]*x^(p[1] - 1.0) function newton_map(dz, z, p, n) z1 = z[1] + im*z[2] dz1 = newton_f(z1, p)/newton_df(z1, p)...
I'm trying to figure out why a code of mine allocates twice the amount of memory and takes twice as long after updating to 1.6.1 (from 1.5.4). One of the...