46 integer,
intent(in) :: k
47 real(kind=dp),
intent(inout) :: dydx(k)
48 real(kind=dp),
intent(in) :: x(k),y(k)
49 integer,
intent(in) :: c0,c1,d,o
50 real(kind=dp),
dimension(K) :: dx,dy,k0,k1
51 real(kind=dp) :: y0,y1,x1,x0
60 integer,
intent(in) :: k
61 real(kind=dp),
intent(inout) :: dydx(k)
62 real(kind=dp),
intent(in) :: x(k),y(k)
63 integer,
intent(in) :: c0,c1,d,o
65 real(kind=dp),
dimension(K) :: dx,dy,k0,k1
66 real(kind=dp) :: y0,y1,x1,x0
78 x1 = 2.0 * x(k) - x(k-1)
79 x0 = 2.0 * x(1) - x(2)
82 dx(i-1) = (x(i)-x(i-2)) / 2.0
84 dx(k) = (x1 - x(k-1))/2.0
85 dx(1) = (x(2) - x0)/2.0
97 y1 = 2.0 * y(k) - y(k-1)
98 y0 = 2.0 * y(1) - y(2)
100 y1 = 4.0 * y(k) - 6.0 * y(k-1) + 4.0 * y(k-2) - y(k-3)
101 y0 = 4.0 * y(1) - 6.0 * y(2) + 4.0 * y(3) - y(4)
104 dy(i-1) = y(i)-y(i-2)
112 if (c1 .ne. 2.0)
then
116 y1 = 4.0 * y(k) - 6.0 * y(k-1) + 4.0 * y(k-2) - y(k-3)
117 y0 = 4.0 * y(1) - 6.0 * y(2) + 4.0 * y(3) - y(4)
121 dy(i) = y(i+1)-2.0*y(i)+y(i-1)
123 dy(k) = y1 - 2.0*y(k) + y(k-1)
124 dy(1) = y(2) - 2.0*y(1) + y0
130 dydx(i) = dy(i) / (2.0 * dx(i))
132 dydx(i) = dy(i) / (dx(i) ** 2.0)
137 dydx(k) = c1 * dydx(k)
140 dydx(1) = c0 * dydx(1)
derivative calculation of y=f(x) : dy/dx
subroutine cos_rpdederive(dydx, K, x, y, c0, c1, d, o)