OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
vinter_smooth.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!|| vinter_smooth ../engine/source/tools/curve/vinter_smooth.F
25!||--- called by ------------------------------------------------------
26!|| fixtemp ../engine/source/constraints/thermic/fixtemp.F
27!|| fixvel ../engine/source/constraints/general/impvel/fixvel.F
28!||====================================================================
29 SUBROUTINE vinter_smooth(TF,IAD,IPOS ,ILEN,NEL0,X,DYDX,Y)
30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35 INTEGER ILEN(*),IPOS(*),IAD(*),NEL0
36 my_real x(*),dydx(*),y(*),tf(2,*)
37 INTEGER I,J1,J,ICONT,J2,J_FIRST,J_LAST
38 my_real dydx1,dydx2,dydx3,x_first,x_last
39C-----------------------------------------------
40 j = 0
41 icont = 1
42 DO WHILE (icont == 1)
43!
44 j = j+1
45 icont = 0
46 DO i=1,nel0
47 j1 = ipos(i)+iad(i)+1
48 IF (j <= ilen(i)-1 .AND. x(i) > tf(1,j1)) THEN
49 ipos(i) = ipos(i) + 1
50 icont = 1
51 ELSEIF (ipos(i) >= 1 .AND. x(i) < tf(1,j1-1)) THEN
52 ipos(i) = ipos(i) - 1
53 icont = 1
54 ENDIF
55 ENDDO
56!
57 ENDDO
58!
59! smooth interpolation
60C
61 DO i=1,nel0
62C
63 j_first = ipos(i)+iad(i)
64 j_last = j_first + 1
65 x_first = tf(1,j_first)
66 x_last = tf(1,j_last)
67C
68 IF (x(i) <= x_first) THEN
69 y(i) = tf(2,j_first)
70 ELSEIF (x(i) >= x_last) THEN
71 y(i) = tf(2,j_last)
72 ELSE
73! within interval
74 j1 =ipos(i)+iad(i)
75 j2 = j1+1
76 dydx(i)=(x(i)-tf(1,j1))/(tf(1,j2)-tf(1,j1))
77!
78 dydx1 = dydx(i)
79 dydx2 = dydx1*dydx1
80 dydx3 = dydx1*dydx2
81!
82 y(i) = tf(2,j1) + (tf(2,j2)-tf(2,j1))*dydx3*
83 . (10. - 15.*dydx1 + 6.*dydx2)
84!
85!! Y(I) = TF(2,J1) + (TF(2,J2)-TF(2,J1))*DYDX(I)**3*
86!! . (10. - 15.*DYDX(I) + 6.*DYDX(I)**2)
87 ENDIF ! IF (X <= X_FIRST)
88 ENDDO
89!---
90 RETURN
91 END
#define my_real
Definition cppsort.cpp:32
subroutine vinter_smooth(tf, iad, ipos, ilen, nel0, x, dydx, y)