OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i25_prepare.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!|| spmd_i25_prepare ../engine/source/interfaces/int25/i25_prepare.F
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- uses -----------------------------------------------------
28!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
29!|| message_mod ../engine/share/message_module/message_mod.F
30!|| tri7box ../engine/share/modules/tri7box.F
31!||====================================================================
32 SUBROUTINE spmd_i25_prepare(MODE,IPARI, INTBUF_TAB,
33 * IAD_ELEM, FR_ELEM,INTLIST,NBINTC,
34 * IAD_I25 , SFR_I25, FR_I25)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE tri7box
39 USE message_mod
40 USE intbufdef_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45#include "assert.inc"
46C-----------------------------------------------
47C C o m m o n B l o c k s
48C-----------------------------------------------
49#include "param_c.inc"
50#include "com04_c.inc"
51#include "com01_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER MODE
56 INTEGER IPARI(NPARI,*),IAD_ELEM(2,*),FR_ELEM(*),
57 * intlist(*),nbintc,iad_i25(nbintc+1,nspmd), sfr_i25,
58 * fr_i25(*)
59 TYPE(intbuf_struct_) INTBUF_TAB(*)
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 INTEGER SZFRI25,IAFR25
64 INTEGER P,I,J,NI,NIN,NOD,NTY,NSN,SN
65 INTEGER, DIMENSION(:), ALLOCATABLE :: ITAG
66C-----------------------------------------------
67C Partie 1, calcul des tailles de FR_I25
68C-----------------------------------------------
69 ALLOCATE(itag(numnod))
70 itag(1:numnod)=0
71 IF (mode==1)THEN
72
73 szfri25 = 0
74
75 DO p = 1, nspmd
76 IF(iad_elem(1,p+1)-iad_elem(1,p)>0) THEN
77 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
78 nod = fr_elem(j)
79 itag(nod)=1
80 ENDDO
81 DO ni=1,nbintc
82 nin = intlist(ni)
83 nty = ipari(7,nin)
84 nsn = ipari(5,nin)
85
86 IF(nty==25) THEN
87 DO i=1,nsn
88 sn = intbuf_tab(nin)%NSV(i)
89 IF(itag(sn)==1)THEN
90 szfri25 = szfri25+1
91 ENDIF
92 ENDDO
93 ENDIF
94 ENDDO
95C Flush ITAG to zero again for next CPU
96 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
97 nod = fr_elem(j)
98 itag(nod)=0
99 ENDDO
100 ENDIF
101 ENDDO
102 sfr_i25=szfri25
103
104C-----------------------------------------------
105C Partie 2, on remplis FR_I25 et IAD_I25
106C-----------------------------------------------
107 ELSEIF(mode==2)THEN
108 iad_i25(1,1)=1
109 iafr25=0
110 DO p = 1, nspmd
111 IF(iad_elem(1,p+1)-iad_elem(1,p)>0) THEN
112 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
113 nod = fr_elem(j)
114 itag(nod)=1
115 ENDDO
116
117 DO ni=1,nbintc
118 iad_i25(ni+1,p)=iad_i25(ni,p)
119 nin = intlist(ni)
120 nty = ipari(7,nin)
121 nsn = ipari(5,nin)
122
123 IF(nty==25) THEN
124 DO i=1,nsn
125 sn = intbuf_tab(nin)%NSV(i)
126 assert(sn > 0)
127 assert(sn <= numnod)
128 IF(itag(sn)==1)THEN
129 iad_i25(ni+1,p)=iad_i25(ni+1,p)+1
130 iafr25 = iafr25 + 1
131 fr_i25(iafr25)=i
132 ENDIF
133 ENDDO
134 ENDIF
135 ENDDO
136C Flush ITAG to zero again for next CPU
137 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
138 nod = fr_elem(j)
139 itag(nod)=0
140 ENDDO
141 ELSE
142 DO i=2,nbintc+1
143 iad_i25(i,p)=iad_i25(1,p)
144 ENDDO
145 ENDIF ! IF(IAD_ELEM(1,P+1)-IAD_ELEM(1,P)>0)
146 IF(p<nspmd)iad_i25(1,p+1)=iad_i25(nbintc+1,p)
147 ENDDO
148 ENDIF
149
150
151 DEALLOCATE(itag)
152 RETURN
153C-----------------------------------------------
154 END
155
subroutine spmd_i25_prepare(mode, ipari, intbuf_tab, iad_elem, fr_elem, intlist, nbintc, iad_i25, sfr_i25, fr_i25)
Definition i25_prepare.F:35