17 implicit none ;
private 61 integer,
intent(in) :: N
62 real,
dimension(:),
intent(in) :: h
63 real,
dimension(:),
intent(in) :: u
64 real,
dimension(:,:),
intent(inout) :: edge_slopes
69 real :: h0_2, h1_2, h0h1
74 real,
dimension(5) :: x
75 real,
dimension(4,4) :: Asys
76 real,
dimension(4) :: Bsys, Csys
77 real,
dimension(3) :: Dsys
78 real,
dimension(N+1) :: tri_l, &
98 d = 4.0 * h0h1 * ( h0 + h1 ) + h1_3 + h0_3
101 alpha = h1 * (h0_2 + h0h1 - h1_2) / ( d +
h_neglect )
102 beta = h0 * (h1_2 + h0h1 - h0_2) / ( d +
h_neglect )
110 tri_b(i+1) = a * u(i) + b * u(i+1)
117 x(i) = x(i-1) + h(i-1)
123 asys(i,j) = ( (x(i+1)**j) - (x(i)**j) ) / j
126 bsys(i) = u(i) * ( h(i) )
133 dsys(2) = 2.0 * csys(3)
134 dsys(3) = 3.0 * csys(4)
143 x(i) = x(i-1) + h(n-5+i)
149 asys(i,j) = ( (x(i+1)**j) - (x(i)**j) ) / j
152 bsys(i) = u(n-4+i) * ( h(n-4+i) )
159 dsys(2) = 2.0 * csys(3)
160 dsys(3) = 3.0 * csys(4)
170 edge_slopes(i,1) = tri_x(i)
171 edge_slopes(i-1,2) = tri_x(i)
173 edge_slopes(1,1) = tri_x(1)
174 edge_slopes(n,2) = tri_x(n+1)
217 integer,
intent(in) :: N
218 real,
dimension(:),
intent(in) :: h
219 real,
dimension(:),
intent(in) :: u
220 real,
dimension(:,:),
intent(inout) :: edge_slopes
224 real :: h0, h1, h2, h3
226 real :: g_4, g_5, g_6
227 real :: d2, d3, d4, d5, d6
228 real :: n2, n3, n4, n5, n6
234 real :: h0ph1, h0ph1_2
235 real :: h0ph1_3, h0ph1_4
236 real :: h2ph3, h2ph3_2
237 real :: h2ph3_3, h2ph3_4
240 real,
dimension(7) :: x
241 real,
dimension(6,6) :: Asys
242 real,
dimension(6) :: Bsys, Csys
243 real,
dimension(5) :: Dsys
244 real,
dimension(N+1) :: tri_l, &
308 asys(2,3) = -0.5 * d2
310 asys(2,5) = -0.5 * h2
311 asys(2,6) = -0.5 * n2
315 asys(3,3) = - d3 / 6.0
316 asys(3,4) = h1_2 / 6.0
317 asys(3,5) = h2_2 / 6.0
320 asys(4,1) = - h1_2 / 2.0
321 asys(4,2) = - h2_2 / 2.0
322 asys(4,3) = d4 / 24.0
323 asys(4,4) = - h1_3 / 24.0
324 asys(4,5) = h2_3 / 24.0
325 asys(4,6) = n4 / 24.0
327 asys(5,1) = h1_3 / 6.0
328 asys(5,2) = - h2_3 / 6.0
329 asys(5,3) = - d5 / 120.0
330 asys(5,4) = h1_4 / 120.0
331 asys(5,5) = h2_4 / 120.0
332 asys(5,6) = n5 / 120.0
334 asys(6,1) = - h1_4 / 24.0
335 asys(6,2) = - h2_4 / 24.0
336 asys(6,3) = d6 / 720.0
337 asys(6,4) = - h1_5 / 720.0
338 asys(6,5) = h2_5 / 720.0
339 asys(6,6) = n6 / 720.0
341 bsys(:) = (/ 0.0, -1.0, 0.0, 0.0, 0.0, 0.0 /)
355 tri_b(k+1) = a * u(k-1) + b * u(k) + c * u(k+1) + d * u(k+2)
388 h0ph1_2 = h0ph1 * h0ph1
389 h0ph1_3 = h0ph1_2 * h0ph1
390 h0ph1_4 = h0ph1_2 * h0ph1_2
421 asys(2,3) = -0.5 * d2
423 asys(2,5) = -0.5 * h2
424 asys(2,6) = -0.5 * n2
428 asys(3,3) = - d3 / 6.0
429 asys(3,4) = h1_2 / 6.0
430 asys(3,5) = h2_2 / 6.0
433 asys(4,1) = - h0ph1_2 / 2.0
435 asys(4,3) = d4 / 24.0
436 asys(4,4) = - h1_3 / 24.0
437 asys(4,5) = h2_3 / 24.0
438 asys(4,6) = n4 / 24.0
440 asys(5,1) = h0ph1_3 / 6.0
442 asys(5,3) = - d5 / 120.0
443 asys(5,4) = h1_4 / 120.0
444 asys(5,5) = h2_4 / 120.0
445 asys(5,6) = n5 / 120.0
447 asys(6,1) = - h0ph1_4 / 24.0
449 asys(6,3) = d6 / 720.0
450 asys(6,4) = - h1_5 / 720.0
451 asys(6,5) = h2_5 / 720.0
452 asys(6,6) = n6 / 720.0
454 bsys(:) = (/ 0.0, -1.0, -h1, h1_2/2.0, -h1_3/6.0, h1_4/24.0 /)
468 tri_b(2) = a * u(1) + b * u(2) + c * u(3) + d * u(4)
473 x(i) = x(i-1) + h(i-1)
479 asys(i,j) = ( (x(i+1)**j) - (x(i)**j) ) / j
482 bsys(i) = u(i) * h(i)
489 dsys(2) = 2.0 * csys(3)
490 dsys(3) = 3.0 * csys(4)
491 dsys(4) = 4.0 * csys(5)
492 dsys(5) = 5.0 * csys(6)
528 h2ph3_2 = h2ph3 * h2ph3
529 h2ph3_3 = h2ph3_2 * h2ph3
530 h2ph3_4 = h2ph3_2 * h2ph3_2
561 asys(2,3) = -0.5 * d2
563 asys(2,5) = -0.5 * h2
564 asys(2,6) = -0.5 * n2
568 asys(3,3) = - d3 / 6.0
569 asys(3,4) = h1_2 / 6.0
570 asys(3,5) = h2_2 / 6.0
574 asys(4,2) = - h2ph3_2 / 2.0
575 asys(4,3) = d4 / 24.0
576 asys(4,4) = - h1_3 / 24.0
577 asys(4,5) = h2_3 / 24.0
578 asys(4,6) = n4 / 24.0
581 asys(5,2) = - h2ph3_3 / 6.0
582 asys(5,3) = - d5 / 120.0
583 asys(5,4) = h1_4 / 120.0
584 asys(5,5) = h2_4 / 120.0
585 asys(5,6) = n5 / 120.0
588 asys(6,2) = - h2ph3_4 / 24.0
589 asys(6,3) = d6 / 720.0
590 asys(6,4) = - h1_5 / 720.0
591 asys(6,5) = h2_5 / 720.0
592 asys(6,6) = n6 / 720.0
594 bsys(:) = (/ 0.0, -1.0, h2, h2_2/2.0, h2_3/6.0, h2_4/24.0 /)
608 tri_b(n) = a * u(n-3) + b * u(n-2) + c * u(n-1) + d * u(n)
613 x(i) = x(i-1) + h(n-7+i)
619 asys(i,j) = ( (x(i+1)**j) - (x(i)**j) ) / j
622 bsys(i) = u(n-6+i) * h(n-6+i)
629 dsys(2) = 2.0 * csys(3)
630 dsys(3) = 3.0 * csys(4)
631 dsys(4) = 4.0 * csys(5)
632 dsys(5) = 5.0 * csys(6)
643 edge_slopes(i,1) = tri_x(i)
644 edge_slopes(i-1,2) = tri_x(i)
646 edge_slopes(1,1) = tri_x(1)
647 edge_slopes(n,2) = tri_x(n+1)
subroutine, public edge_slopes_implicit_h3(N, h, u, edge_slopes)
subroutine, public solve_tridiagonal_system(Al, Ad, Au, B, X, system_size)
subroutine, public edge_slopes_implicit_h5(N, h, u, edge_slopes)
subroutine, public solve_linear_system(A, B, X, system_size)
real, parameter h_neglect
real function, public evaluation_polynomial(coefficients, nb_coefficients, x)