From: Philipp E. Weidmann on
Is there an existing FORTRAN library for automatically generating
Jacobian matrices of a function?

I'm thinking about a subroutine like

generate_jacobian(f, n, m, point, jac)

where f: R^n -> R^m is the (external) function, point is the vector of
length n at which the Jacobian is to be evaluated and jac is the
resulting matrix.

Differentiation method I don't care about, any method with reasonable
accuracy will suffice. Requiring third-party differentiators is OK.


This is such a common problem, with all the FORTRAN diff stuff my gut
tells me there has got to be something, but I just couldn't find it by
myself.


Any help is appreciated.

--
-- Philipp Emanuel Weidmann
From: Richard Maine on
Philipp E. Weidmann <philipp.weidmann(a)gmx.de> wrote:

> Is there an existing FORTRAN library for automatically generating
> Jacobian matrices of a function?
....
> Differentiation method I don't care about, any method with reasonable
> accuracy will suffice. Requiring third-party differentiators is OK.

Maybe I'm missing the point, but if you don't care about differentiation
method and can accept using a third party differentiator, then there is
nothing really left to do. The Jacobian is nothing but derivatives.

Numerical differentiation of a completely arbitrary function with
"reasonable" accuracy is a non-trivial problem. That's where all the
"fun" would be.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Paul van Delst on
You can use an adjoint compiler to generate the Jacobian function from the original
function routine. Then you just call the adjoint (or tangent-linear) routine so as to
build up the matrix you require.

The one I used to use for development purposes was "TAMC" (Tangent linear and Adjoint
Model Compiler). See
http://autodiff.com/tamc/


cheers,

paulv


Philipp E. Weidmann wrote:
> Is there an existing FORTRAN library for automatically generating
> Jacobian matrices of a function?
>
> I'm thinking about a subroutine like
>
> generate_jacobian(f, n, m, point, jac)
>
> where f: R^n -> R^m is the (external) function, point is the vector of
> length n at which the Jacobian is to be evaluated and jac is the
> resulting matrix.
>
> Differentiation method I don't care about, any method with reasonable
> accuracy will suffice. Requiring third-party differentiators is OK.
>
>
> This is such a common problem, with all the FORTRAN diff stuff my gut
> tells me there has got to be something, but I just couldn't find it by
> myself.
>
>
> Any help is appreciated.
>
From: Philipp E. Weidmann on
Richard Maine wrote:
> Maybe I'm missing the point, but if you don't care about differentiation
> method and can accept using a third party differentiator, then there is
> nothing really left to do. The Jacobian is nothing but derivatives.


Of course it is, but what I'm looking for is a routine that assembles
all the neccessary derivatives into a matrix, and evaluates them at the
point given.

--
-- Philipp Emanuel Weidmann
From: Philipp E. Weidmann on
Paul van Delst wrote:
> You can use an adjoint compiler to generate the Jacobian function from the original
> function routine. Then you just call the adjoint (or tangent-linear) routine so as to
> build up the matrix you require.
>
> The one I used to use for development purposes was "TAMC" (Tangent linear and Adjoint
> Model Compiler). See
> http://autodiff.com/tamc/
>

That looks interesting, I'll look into it.

Thank you kindly.

--
-- Philipp Emanuel Weidmann