OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ninterp.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!|| ninterp ../engine/source/interfaces/int14/ninterp.F
25!||--- called by ------------------------------------------------------
26!|| i14dmp ../engine/source/interfaces/int14/i14dmp.F
27!|| i14frt ../engine/source/interfaces/int14/i14frt.F
28!|| i6damp ../engine/source/interfaces/inter3d/i6damp.F
29!|| i6fri3 ../engine/source/interfaces/inter3d/i6fri3.F
30!||====================================================================
31 SUBROUTINE ninterp(IFUNC,NPC,PLD,NPOINT,XV,YV)
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36C-----------------------------------------------
37C G l o b a l P a r a m e t e r s
38C-----------------------------------------------
39#include "mvsiz_p.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER IFUNC,NPC(*),NPOINT
44C REAL
46 . pld(*),xv(*),yv(*)
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
51 . pente, y
52 INTEGER RANG(MVSIZ)
53 INTEGER NDEB, NREST, I,
54 . IPT, NPT, II
55C-----------------------------------------------
56 ndeb=0
57 nrest=npoint
58 100 CONTINUE
59C---------------------------------
60 DO i=1,min(mvsiz,nrest)
61 rang(i)=0
62 ENDDO
63C---------------------------------
64 npt = (npc(ifunc+1)-npc(ifunc))/2
65 DO ipt=1,npt-1
66 ii=npc(ifunc)+2*(ipt-1)
67 DO i=1,min(mvsiz,nrest)
68 IF (pld(ii)<=xv(ndeb+i)
69 . .AND.xv(ndeb+i)<=pld(ii+2)) rang(i)=ipt
70 ENDDO
71 ENDDO
72 ii=npc(ifunc)+2*(npt-1)
73 DO i=1,min(mvsiz,nrest)
74 IF (xv(ndeb+i)>pld(ii)) rang(i)=npt
75 ENDDO
76C---------------------------------
77 DO i=1,min(mvsiz,nrest)
78 IF (rang(i)==0) THEN
79 ii=npc(ifunc)
80 pente=(pld(ii+3)-pld(ii+1))/(pld(ii+2)-pld(ii))
81 yv(ndeb+i) =pld(ii+1)+pente*(xv(ndeb+i)-pld(ii))
82 ELSEIF (rang(i)==npt) THEN
83 ii=npc(ifunc)+2*(npt-1)
84 pente=(pld(ii+1)-pld(ii-1))/(pld(ii)-pld(ii-2))
85 yv(ndeb+i) =pld(ii+1)
86 . +max(-pld(ii+1),pente*(xv(ndeb+i)-pld(ii)))
87 ELSE
88 ii=npc(ifunc)+2*(rang(i)-1)
89 pente=(pld(ii+3)-pld(ii+1))/(pld(ii+2)-pld(ii))
90 yv(ndeb+i) =pld(ii+1)
91 . +pente*(xv(ndeb+i)-pld(ii))
92 ENDIF
93 ENDDO
94C---------------------------------
95C Groupe suivant.
96C---------------------------------
97 IF (nrest-mvsiz>0) THEN
98 nrest=nrest-mvsiz
99 ndeb =ndeb +mvsiz
100 GOTO 100
101 END IF
102C-----------------------------------------------
103 RETURN
104 END
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine ninterp(ifunc, npc, pld, npoint, xv, yv)
Definition ninterp.F:32