Commit b6d18050 authored by Olivier Cots's avatar Olivier Cots
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request !247
parents c685ad41 fe48ed1e
Pipeline #301057 passed with stage
in 4 minutes and 30 seconds
# gfun
TAPENADE_HOME=/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8 \
/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8/bin/tapenade -tangent -fixinterface \
-inputlanguage fortran90 -outputlanguage fortran90 -O ./ -tgtfuncname _d -head "gfun(x)>(g)" \
-o gfun \
gfun.f90
# gfun_d
TAPENADE_HOME=/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8 \
/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8/bin/tapenade -tangent -fixinterface \
-inputlanguage fortran90 -outputlanguage fortran90 -O ./ -tgtfuncname _d -head "gfun_d(x)>(g, gd)" \
-o gfun_d \
gfun_d.f90
# hfun
TAPENADE_HOME=/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8 \
/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8/bin/tapenade -tangent -fixinterface \
......@@ -27,3 +12,10 @@ TAPENADE_HOME=/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/ins
-o hfun_d \
hfun_d.f90
# hfun
TAPENADE_HOME=/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8 \
/Users/ocots/Boulot/recherche/Logiciels/dev/hampath/hampath308/install/tapenade3.8/bin/tapenade -tangent -fixinterface \
-inputlanguage fortran90 -outputlanguage fortran90 -O ./ -tgtfuncname _d -head "hfun_d_d(x, p)>(hdd)" \
-o hfun_d_d \
hfun_d_d.f90
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
subroutine gfun(x, a, b, c, g)
double precision, intent(in) :: x(2), a, b, c
double precision, intent(out) :: g(2)
double precision :: l1, l2, th1, th2
th1 = x(1)
th2 = x(2)
l1 = a * sin(th1)**2 + b * cos(th1)**2
l2 = b * cos(th2)**2 + c * sin(th2)**2
g(1) = (l1-l2)*l1/(l1-c)
g(2) = (l1-l2)*l2/(a-l2)
end subroutine gfun
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of gfun in forward (tangent) mode (with options fixinterface):
! variations of useful results: g
! with respect to varying inputs: x
! RW status of diff variables: g:out x:in
SUBROUTINE GFUN_D(x, xd, a, b, c, g, gd)
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: x(2), a, b, c
DOUBLE PRECISION, INTENT(IN) :: xd(2)
DOUBLE PRECISION, INTENT(OUT) :: g(2)
DOUBLE PRECISION, INTENT(OUT) :: gd(2)
DOUBLE PRECISION :: l1, l2, th1, th2
DOUBLE PRECISION :: l1d, l2d, th1d, th2d
INTRINSIC SIN
INTRINSIC COS
th1d = xd(1)
th1 = x(1)
th2d = xd(2)
th2 = x(2)
l1d = a*2*SIN(th1)*th1d*COS(th1) - b*2*COS(th1)*th1d*SIN(th1)
l1 = a*SIN(th1)**2 + b*COS(th1)**2
l2d = c*2*SIN(th2)*th2d*COS(th2) - b*2*COS(th2)*th2d*SIN(th2)
l2 = b*COS(th2)**2 + c*SIN(th2)**2
gd = 0.D0
gd(1) = (((l1d-l2d)*l1+(l1-l2)*l1d)*(l1-c)-(l1-l2)*l1*l1d)/(l1-c)**2
g(1) = (l1-l2)*l1/(l1-c)
gd(2) = (((l1d-l2d)*l2+(l1-l2)*l2d)*(a-l2)+(l1-l2)*l2*l2d)/(a-l2)**2
g(2) = (l1-l2)*l2/(a-l2)
END SUBROUTINE GFUN_D
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of gfun_d in forward (tangent) mode (with options fixinterface):
! variations of useful results: g gd
! with respect to varying inputs: x
! RW status of diff variables: g:out x:in gd:out
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of gfun in forward (tangent) mode (with options fixinterface):
! variations of useful results: g
! with respect to varying inputs: x
! RW status of diff variables: g:out x:in
SUBROUTINE GFUN_D_D(x, xd, xd0, a, b, c, g, gd, gd0, gdd)
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: x(2), a, b, c
DOUBLE PRECISION, INTENT(IN) :: xd0(2)
DOUBLE PRECISION, INTENT(IN) :: xd(2)
DOUBLE PRECISION, INTENT(OUT) :: g(2)
DOUBLE PRECISION, INTENT(OUT) :: gd0(2)
DOUBLE PRECISION, INTENT(OUT) :: gd(2)
DOUBLE PRECISION, INTENT(OUT) :: gdd(2)
DOUBLE PRECISION :: l1, l2, th1, th2
DOUBLE PRECISION :: l1d0, l2d0, th1d0, th2d0
DOUBLE PRECISION :: l1d, l2d, th1d, th2d
DOUBLE PRECISION :: l1dd, l2dd
INTRINSIC SIN
INTRINSIC COS
th1d = xd(1)
th1d0 = xd0(1)
th1 = x(1)
th2d = xd(2)
th2d0 = xd0(2)
th2 = x(2)
l1dd = a*2*th1d*(th1d0*COS(th1)**2-SIN(th1)**2*th1d0) - b*2*th1d*(COS(&
& th1)**2*th1d0-th1d0*SIN(th1)**2)
l1d = a*2*SIN(th1)*th1d*COS(th1) - b*2*COS(th1)*th1d*SIN(th1)
l1d0 = a*2*SIN(th1)*th1d0*COS(th1) - b*2*COS(th1)*th1d0*SIN(th1)
l1 = a*SIN(th1)**2 + b*COS(th1)**2
l2dd = c*2*th2d*(th2d0*COS(th2)**2-SIN(th2)**2*th2d0) - b*2*th2d*(COS(&
& th2)**2*th2d0-th2d0*SIN(th2)**2)
l2d = c*2*SIN(th2)*th2d*COS(th2) - b*2*COS(th2)*th2d*SIN(th2)
l2d0 = c*2*SIN(th2)*th2d0*COS(th2) - b*2*COS(th2)*th2d0*SIN(th2)
l2 = b*COS(th2)**2 + c*SIN(th2)**2
gd = 0.d0
gdd = 0.D0
gdd(1) = ((((l1dd-l2dd)*l1+(l1d-l2d)*l1d0+(l1d0-l2d0)*l1d+(l1-l2)*l1dd&
& )*(l1-c)+((l1d-l2d)*l1+(l1-l2)*l1d)*l1d0-(l1d0-l2d0)*l1*l1d-(l1-l2)*&
& (l1d0*l1d+l1*l1dd))*(l1-c)**2-(((l1d-l2d)*l1+(l1-l2)*l1d)*(l1-c)-(l1&
& -l2)*l1*l1d)*2*(l1-c)*l1d0)/((l1-c)**2)**2
gd(1) = (((l1d-l2d)*l1+(l1-l2)*l1d)*(l1-c)-(l1-l2)*l1*l1d)/(l1-c)**2
gd0 = 0.D0
gd0(1) = (((l1d0-l2d0)*l1+(l1-l2)*l1d0)*(l1-c)-(l1-l2)*l1*l1d0)/(l1-c)&
& **2
g(1) = (l1-l2)*l1/(l1-c)
gdd(2) = ((((l1dd-l2dd)*l2+(l1d-l2d)*l2d0+(l1d0-l2d0)*l2d+(l1-l2)*l2dd&
& )*(a-l2)-((l1d-l2d)*l2+(l1-l2)*l2d)*l2d0+(l1d0-l2d0)*l2*l2d+(l1-l2)*&
& (l2d0*l2d+l2*l2dd))*(a-l2)**2+(((l1d-l2d)*l2+(l1-l2)*l2d)*(a-l2)+(l1&
& -l2)*l2*l2d)*2*(a-l2)*l2d0)/((a-l2)**2)**2
gd(2) = (((l1d-l2d)*l2+(l1-l2)*l2d)*(a-l2)+(l1-l2)*l2*l2d)/(a-l2)**2
gd0(2) = (((l1d0-l2d0)*l2+(l1-l2)*l2d0)*(a-l2)+(l1-l2)*l2*l2d0)/(a-l2)&
& **2
g(2) = (l1-l2)*l2/(a-l2)
END SUBROUTINE GFUN_D_D
subroutine hfun(x, p, h, gfun)
subroutine hfun(x, p, a, b, c, h)
double precision, intent(in) :: x(2), p(2)
double precision, intent(in) :: x(2), p(2), a, b, c
double precision, intent(out) :: h
interface
subroutine gfun(x, g)
double precision, intent(in) :: x(2)
double precision, intent(out) :: g(2)
end subroutine gfun
end interface
! local variables
double precision :: g(2), p1, p2
double precision :: p1, p2
double precision :: l1, l2, th1, th2, f1, f2
p1 = p(1)
p2 = p(2)
call gfun(x, g)
th1 = x(1)
th2 = x(2)
l1 = a * sin(th1)**2 + b * cos(th1)**2
l2 = b * cos(th2)**2 + c * sin(th2)**2
f1 = (l1-c)/((l1-l2)*l1)
f2 = (a-l2)/((l1-l2)*l2)
h = 0.5d0 * (p1**2 / g(1) + p2**2 / g(2))
h = 0.5d0 * (p1**2 * f1 + p2**2 *f2)
end subroutine hfun
! -*- f90 -*-
! Note: the context of this file is case sensitive.
python module hfun__user__routines
interface hfun_user_interface
subroutine gfun(x, g)
double precision, intent(in) :: x(2)
double precision, intent(out) :: g(2)
end subroutine gfun
end interface hfun_user_interface
end python module hfun__user__routines
python module hfun ! in
interface ! in :mod_nlesolve
subroutine hfun(x, p, h, gfun)
use hfun__user__routines
external gfun
double precision, intent(in) :: x(2), p(2)
double precision, intent(out) :: h
end subroutine hfun
end interface
end python module hfun
! This file was auto-generated with f2py (version:2).
! See http://cens.ioc.ee/projects/f2py2e/
......@@ -4,34 +4,39 @@
! Differentiation of hfun in forward (tangent) mode (with options fixinterface):
! variations of useful results: h
! with respect to varying inputs: p x
! RW status of diff variables: h:out p:in x:in-killed
SUBROUTINE HFUN_D(x, xd, p, pd, h, hd, GFUN_D)
! RW status of diff variables: h:out p:in x:in
SUBROUTINE HFUN_D(x, xd, p, pd, a, b, c, h, hd)
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: x(2), p(2)
DOUBLE PRECISION, INTENT(IN) :: x(2), p(2), a, b, c
DOUBLE PRECISION, INTENT(IN) :: xd(2), pd(2)
DOUBLE PRECISION, INTENT(OUT) :: h
DOUBLE PRECISION, INTENT(OUT) :: hd
INTERFACE
SUBROUTINE GFUN_D(x, xd, g, gd)
DOUBLE PRECISION, INTENT(IN) :: x(2)
DOUBLE PRECISION, INTENT(IN) :: xd(2)
DOUBLE PRECISION, INTENT(OUT) :: g(2)
DOUBLE PRECISION, INTENT(OUT) :: gd(2)
END SUBROUTINE GFUN_D
END INTERFACE
! local variables
DOUBLE PRECISION :: g(2), p1, p2
DOUBLE PRECISION :: gd(2), p1d, p2d
DOUBLE PRECISION :: p1, p2
DOUBLE PRECISION :: p1d, p2d
DOUBLE PRECISION :: l1, l2, th1, th2, f1, f2
DOUBLE PRECISION :: l1d, l2d, th1d, th2d, f1d, f2d
INTRINSIC SIN
INTRINSIC COS
p1d = pd(1)
p1 = p(1)
p2d = pd(2)
p2 = p(2)
gd = 0.D0
CALL GFUN_D(x, xd, g, gd)
hd = 0.5d0*((2*p1*p1d*g(1)-p1**2*gd(1))/g(1)**2+(2*p2*p2d*g(2)-p2**2*&
& gd(2))/g(2)**2)
h = 0.5d0*(p1**2/g(1)+p2**2/g(2))
th1d = xd(1)
th1 = x(1)
th2d = xd(2)
th2 = x(2)
l1d = a*2*SIN(th1)*th1d*COS(th1) - b*2*COS(th1)*th1d*SIN(th1)
l1 = a*SIN(th1)**2 + b*COS(th1)**2
l2d = c*2*SIN(th2)*th2d*COS(th2) - b*2*COS(th2)*th2d*SIN(th2)
l2 = b*COS(th2)**2 + c*SIN(th2)**2
f1d = (l1d*(l1-l2)*l1-(l1-c)*((l1d-l2d)*l1+(l1-l2)*l1d))/((l1-l2)*l1)&
& **2
f1 = (l1-c)/((l1-l2)*l1)
f2d = (-(l2d*(l1-l2)*l2)-(a-l2)*((l1d-l2d)*l2+(l1-l2)*l2d))/((l1-l2)*&
& l2)**2
f2 = (a-l2)/((l1-l2)*l2)
hd = 0.5d0*(2*p1*p1d*f1+p1**2*f1d+2*p2*p2d*f2+p2**2*f2d)
h = 0.5d0*(p1**2*f1+p2**2*f2)
END SUBROUTINE HFUN_D
! -*- f90 -*-
! Note: the context of this file is case sensitive.
python module hfun_d__user__routines
interface hfun_d_user_interface
subroutine gfun_d(x, xd, g, gd)
double precision, intent(in) :: x(2), xd(2)
double precision, intent(out) :: g(2), gd(2)
end subroutine gfun_d
end interface hfun_d_user_interface
end python module hfun_d__user__routines
python module hfun_d ! in
interface ! in :mod_nlesolve
subroutine hfun_d(x, xd, p, pd, h, hd, gfun_d)
use hfun_d__user__routines
external gfun_d
double precision, intent(in) :: x(2), p(2), xd(2), pd(2)
double precision, intent(out) :: h, hd
end subroutine hfun_d
end interface
end python module hfun_d
! This file was auto-generated with f2py (version:2).
! See http://cens.ioc.ee/projects/f2py2e/
......@@ -4,56 +4,77 @@
! Differentiation of hfun_d in forward (tangent) mode (with options fixinterface):
! variations of useful results: hd
! with respect to varying inputs: p x
! RW status of diff variables: p:in x:in-killed hd:out
! RW status of diff variables: p:in x:in hd:out
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of hfun in forward (tangent) mode (with options fixinterface):
! variations of useful results: h
! with respect to varying inputs: p x
! RW status of diff variables: h:out p:in x:in-killed
SUBROUTINE HFUN_D_D(x, xd, xd0, p, pd, pd0, h, hd, hdd, GFUN_D_D)
! RW status of diff variables: h:out p:in x:in
SUBROUTINE HFUN_D_D(x, xd0, xd, p, pd0, pd, a, b, c, h, hd, hdd)
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: x(2), p(2)
DOUBLE PRECISION, INTENT(IN) :: x(2), p(2), a, b, c
DOUBLE PRECISION, INTENT(IN) :: xd0(2), pd0(2)
DOUBLE PRECISION, INTENT(IN) :: xd(2), pd(2)
DOUBLE PRECISION, INTENT(OUT) :: h
DOUBLE PRECISION, INTENT(OUT) :: hd
DOUBLE PRECISION, INTENT(OUT) :: hdd
INTERFACE
SUBROUTINE GFUN_D_D(x, xd, xd0, g, gd, gd0, gdd)
DOUBLE PRECISION, INTENT(IN) :: x(2)
DOUBLE PRECISION, INTENT(IN) :: xd0(2)
DOUBLE PRECISION, INTENT(IN) :: xd(2)
DOUBLE PRECISION, INTENT(OUT) :: g(2)
DOUBLE PRECISION, INTENT(OUT) :: gd0(2)
DOUBLE PRECISION, INTENT(OUT) :: gd(2)
DOUBLE PRECISION, INTENT(OUT) :: gdd(2)
END SUBROUTINE GFUN_D_D
END INTERFACE
! local variables
DOUBLE PRECISION :: g(2), p1, p2
DOUBLE PRECISION :: gd0(2), p1d0, p2d0
DOUBLE PRECISION :: gd(2), p1d, p2d
DOUBLE PRECISION :: gdd(2)
DOUBLE PRECISION :: p1, p2
DOUBLE PRECISION :: p1d0, p2d0
DOUBLE PRECISION :: p1d, p2d
DOUBLE PRECISION :: l1, l2, th1, th2, f1, f2
DOUBLE PRECISION :: l1d0, l2d0, th1d0, th2d0, f1d0, f2d0
DOUBLE PRECISION :: l1d, l2d, th1d, th2d, f1d, f2d
DOUBLE PRECISION :: l1dd, l2dd, f1dd, f2dd
INTRINSIC SIN
INTRINSIC COS
p1d = pd(1)
p1d0 = pd0(1)
p1 = p(1)
p2d = pd(2)
p2d0 = pd0(2)
p2 = p(2)
gd = 0.d0
gdd = 0.D0
gd0 = 0.D0
CALL GFUN_D_D(x, xd, xd0, g, gd, gd0, gdd)
hdd = 0.5d0*(((2*p1d*(p1d0*g(1)+p1*gd0(1))-2*p1*p1d0*gd(1)-p1**2*gdd(1&
& ))*g(1)**2-(2*p1*p1d*g(1)-p1**2*gd(1))*2*g(1)*gd0(1))/(g(1)**2)**2+(&
& (2*p2d*(p2d0*g(2)+p2*gd0(2))-2*p2*p2d0*gd(2)-p2**2*gdd(2))*g(2)**2-(&
& 2*p2*p2d*g(2)-p2**2*gd(2))*2*g(2)*gd0(2))/(g(2)**2)**2)
hd = 0.5d0*((2*p1*p1d*g(1)-p1**2*gd(1))/g(1)**2+(2*p2*p2d*g(2)-p2**2*&
& gd(2))/g(2)**2)
h = 0.5d0*(p1**2/g(1)+p2**2/g(2))
th1d = xd(1)
th1d0 = xd0(1)
th1 = x(1)
th2d = xd(2)
th2d0 = xd0(2)
th2 = x(2)
l1dd = a*2*th1d*(th1d0*COS(th1)**2-SIN(th1)**2*th1d0) - b*2*th1d*(COS(&
& th1)**2*th1d0-th1d0*SIN(th1)**2)
l1d = a*2*SIN(th1)*th1d*COS(th1) - b*2*COS(th1)*th1d*SIN(th1)
l1d0 = a*2*SIN(th1)*th1d0*COS(th1) - b*2*COS(th1)*th1d0*SIN(th1)
l1 = a*SIN(th1)**2 + b*COS(th1)**2
l2dd = c*2*th2d*(th2d0*COS(th2)**2-SIN(th2)**2*th2d0) - b*2*th2d*(COS(&
& th2)**2*th2d0-th2d0*SIN(th2)**2)
l2d = c*2*SIN(th2)*th2d*COS(th2) - b*2*COS(th2)*th2d*SIN(th2)
l2d0 = c*2*SIN(th2)*th2d0*COS(th2) - b*2*COS(th2)*th2d0*SIN(th2)
l2 = b*COS(th2)**2 + c*SIN(th2)**2
f1dd = (((l1dd*l1+l1d*l1d0)*(l1-l2)+l1d*l1*(l1d0-l2d0)-l1d0*((l1d-l2d)&
& *l1+(l1-l2)*l1d)-(l1-c)*((l1dd-l2dd)*l1+(l1d-l2d)*l1d0+(l1d0-l2d0)*&
& l1d+(l1-l2)*l1dd))*(l1-l2)**2*l1**2-(l1d*(l1-l2)*l1-(l1-c)*((l1d-l2d&
& )*l1+(l1-l2)*l1d))*2*(l1-l2)*l1*((l1d0-l2d0)*l1+(l1-l2)*l1d0))/(((l1&
& -l2)*l1)**2)**2
f1d = (l1d*(l1-l2)*l1-(l1-c)*((l1d-l2d)*l1+(l1-l2)*l1d))/((l1-l2)*l1)&
& **2
f1d0 = (l1d0*(l1-l2)*l1-(l1-c)*((l1d0-l2d0)*l1+(l1-l2)*l1d0))/((l1-l2)&
& *l1)**2
f1 = (l1-c)/((l1-l2)*l1)
f2dd = ((l2d0*((l1d-l2d)*l2+(l1-l2)*l2d)-l2d*l2*(l1d0-l2d0)-(a-l2)*((&
& l1dd-l2dd)*l2+(l1d-l2d)*l2d0+(l1d0-l2d0)*l2d+(l1-l2)*l2dd)-(l2dd*l2+&
& l2d*l2d0)*(l1-l2))*(l1-l2)**2*l2**2-(-(l2d*(l1-l2)*l2)-(a-l2)*((l1d-&
& l2d)*l2+(l1-l2)*l2d))*2*(l1-l2)*l2*((l1d0-l2d0)*l2+(l1-l2)*l2d0))/((&
& (l1-l2)*l2)**2)**2
f2d = (-(l2d*(l1-l2)*l2)-(a-l2)*((l1d-l2d)*l2+(l1-l2)*l2d))/((l1-l2)*&
& l2)**2
f2d0 = (-(l2d0*(l1-l2)*l2)-(a-l2)*((l1d0-l2d0)*l2+(l1-l2)*l2d0))/((l1-&
& l2)*l2)**2
f2 = (a-l2)/((l1-l2)*l2)
hdd = 0.5d0*(2*p1d*(p1d0*f1+p1*f1d0)+2*p1*p1d0*f1d+p1**2*f1dd+2*p2d*(&
& p2d0*f2+p2*f2d0)+2*p2*p2d0*f2d+p2**2*f2dd)
hd = 0.5d0*(2*p1*p1d*f1+p1**2*f1d+2*p2*p2d*f2+p2**2*f2d)
h = 0.5d0*(p1**2*f1+p2**2*f2)
END SUBROUTINE HFUN_D_D
! -*- f90 -*-
! Note: the context of this file is case sensitive.
python module hfun_d_d__user__routines
interface hfun_d_d_user_interface
subroutine gfun_d_d(x, xd, xd0, g, gd, gd0, gdd)
double precision, intent(in) :: x(2), xd(2), xd0(2)
double precision, intent(out) :: g(2), gd(2), gdd(2), gd0(2)
end subroutine gfun_d_d
end interface hfun_d_d_user_interface
end python module hfun_d_d__user__routines
python module hfun_d_d ! in
interface ! in :mod_nlesolve
subroutine hfun_d_d(x, xd, xd0, p, pd, pd0, h, hd, hdd, gfun_d_d)
use hfun_d_d__user__routines
external gfun_d_d
double precision, intent(in) :: x(2), p(2), xd(2), pd(2), xd0(2), pd0(2)
double precision, intent(out) :: h, hd, hdd
end subroutine hfun_d_d
end interface
end python module hfun_d_d
! This file was auto-generated with f2py (version:2).
! See http://cens.ioc.ee/projects/f2py2e/
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of hfun_d_d in forward (tangent) mode (with options fixinterface):
! variations of useful results: hdd
! with respect to varying inputs: p x
! RW status of diff variables: p:in x:in hdd:out
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of hfun_d in forward (tangent) mode (with options fixinterface):
! variations of useful results: hd
! with respect to varying inputs: p x
! RW status of diff variables: p:in x:in hd:out
! Generated by TAPENADE (INRIA, Tropics team)
! Tapenade 3.8 (r4996) - 25 Oct 2013 15:08
!
! Differentiation of hfun in forward (tangent) mode (with options fixinterface):
! variations of useful results: h
! with respect to varying inputs: p x
! RW status of diff variables: h:out p:in x:in
SUBROUTINE HFUN_D_D_D(x, xd1, xd0, xd, p, pd1, pd0, pd, a, b, c, h, hd, &
& hdd, hddd)
IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN) :: x(2), p(2), a, b, c
DOUBLE PRECISION, INTENT(IN) :: xd1(2), pd1(2)
DOUBLE PRECISION, INTENT(IN) :: xd0(2), pd0(2)
DOUBLE PRECISION, INTENT(IN) :: xd(2), pd(2)
DOUBLE PRECISION, INTENT(OUT) :: h
DOUBLE PRECISION, INTENT(OUT) :: hd
DOUBLE PRECISION, INTENT(OUT) :: hdd
DOUBLE PRECISION, INTENT(OUT) :: hddd
! local variables
DOUBLE PRECISION :: p1, p2
DOUBLE PRECISION :: p1d1, p2d1
DOUBLE PRECISION :: p1d0, p2d0
DOUBLE PRECISION :: p1d, p2d
DOUBLE PRECISION :: l1, l2, th1, th2, f1, f2
DOUBLE PRECISION :: l1d1, l2d1, th1d1, th2d1, f1d1, f2d1
DOUBLE PRECISION :: l1d0, l2d0, th1d0, th2d0, f1d0, f2d0
DOUBLE PRECISION :: l1d0d, l2d0d, f1d0d, f2d0d
DOUBLE PRECISION :: l1d, l2d, th1d, th2d, f1d, f2d
DOUBLE PRECISION :: l1dd0, l2dd0, f1dd0, f2dd0
DOUBLE PRECISION :: l1dd, l2dd, f1dd, f2dd
DOUBLE PRECISION :: l1ddd, l2ddd, f1ddd, f2ddd
INTRINSIC SIN
INTRINSIC COS
p1d = pd(1)
p1d0 = pd0(1)
p1d1 = pd1(1)
p1 = p(1)
p2d = pd(2)
p2d0 = pd0(2)
p2d1 = pd1(2)
p2 = p(2)
th1d = xd(1)
th1d0 = xd0(1)
th1d1 = xd1(1)
th1 = x(1)
th2d = xd(2)
th2d0 = xd0(2)
th2d1 = xd1(2)
th2 = x(2)
l1ddd = a*2*th1d*(-(th1d0*2*COS(th1)*th1d1*SIN(th1))-th1d0*2*SIN(th1)*&
& th1d1*COS(th1)) - b*2*th1d*(-(th1d0*2*COS(th1)*th1d1*SIN(th1))-th1d0&
& *2*SIN(th1)*th1d1*COS(th1))
l1dd = a*2*th1d*(th1d0*COS(th1)**2-SIN(th1)**2*th1d0) - b*2*th1d*(COS(&
& th1)**2*th1d0-th1d0*SIN(th1)**2)
l1dd0 = a*2*th1d*(th1d1*COS(th1)**2-SIN(th1)**2*th1d1) - b*2*th1d*(COS&
& (th1)**2*th1d1-th1d1*SIN(th1)**2)
l1d = a*2*SIN(th1)*th1d*COS(th1) - b*2*