OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
minter1d_rat.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| minter1d_rat ../common_source/eos/minter1d_rat.F
25!||--- called by ------------------------------------------------------
26!|| mintp1_rt ../common_source/eos/mintp1_rt.F
27!|| mintp_re ../common_source/eos/mintp_re.F
28!|| mintp_rt ../common_source/eos/mintp_rt.F
29!||--- uses -----------------------------------------------------
30!|| constant_mod ../common_source/modules/constant_mod.F
31!||====================================================================
32 SUBROUTINE minter1d_rat(X0,X1,X2,X3,Y0,Y1,Y2,Y3,X,Y,YP,I,N)
33C INTERPOLATION (RATIONAL FUNCTION)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE constant_mod , ONLY : zero, em20, one
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41 IMPLICIT NONE
42#include "my_real.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER I, N
47 my_real x0, x1, x2, x3, y0, y1, y2, y3, x, y, yp
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 my_real q, d, r, s, sp, c2, dm, sm, c1, c6, c4, c3, c3d, c5
52C-----------------------------------------------
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
84 END
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21
subroutine minter1d_rat(x0, x1, x2, x3, y0, y1, y2, y3, x, y, yp, i, n)