#include "my_real.inc"
Go to the source code of this file.
|
| subroutine | minter1d_rat (x0, x1, x2, x3, y0, y1, y2, y3, x, y, yp, i, n) |
◆ minter1d_rat()
| subroutine minter1d_rat |
( |
| x0, |
|
|
| x1, |
|
|
| x2, |
|
|
| x3, |
|
|
| y0, |
|
|
| y1, |
|
|
| y2, |
|
|
| y3, |
|
|
| x, |
|
|
| y, |
|
|
| yp, |
|
|
integer | i, |
|
|
integer | n ) |
Definition at line 32 of file minter1d_rat.F.
33
34
35
36
38
39
40
41 IMPLICIT NONE
42#include "my_real.inc"
43
44
45
46 INTEGER I, N
47 my_real x0, x1, x2, x3, y0, y1, y2, y3, x, y, yp
48
49
50
51 my_real q, d, r, s, sp, c2, dm, sm, c1, c6, c4, c3, c3d, c5
52
53 q = x-x1
54 d = x2-x1
55 r = d-q
56 s = (y2-y1) / d
57 sp = (y3-y2) / (x3-x2)
58 c2 = (sp-s) / (x3-x1)
59 dm = x1-x0
60 dm = sign(
max(em20,abs(dm)),dm)
61 sm = (y1-y0) / dm
62 c1 = (s-sm) / (d+dm)
63 c6 = zero
64 IF(i == 1)THEN
65 IF(s*(s-d*c2) <= zero) c2 = s/d
66 c4 = c2
67 ELSE IF(i == n-1)THEN
68 c4 = c1
69 ELSE
70 IF(i == 2 .AND. sm*(sm-dm*c1) <= zero) c1=(s-sm-sm) / d
71 c3 = abs(c2*r)
72 c3d = c3+abs(c1*q)
73 c5 = zero
74 IF(c3d > zero) THEN
75 c3 = c3/c3d
76 c5 = c3*(c1-c2)
77 ENDIF
78 c4 = c2+c5
79 c6 = d*c5*(one-c3)
80 ENDIF
81 y = y1 + q*(s-r*c4)
82 yp = s+(q-r)*c4+c6
83 RETURN