OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i17main.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!|| i17main ../engine/source/interfaces/int17/i17main.F
25!||--- called by ------------------------------------------------------
26!|| lag_mult ../engine/source/tools/lagmul/lag_mult.F
27!||--- calls -----------------------------------------------------
28!|| i17buce ../engine/source/interfaces/int17/i17buce.F
29!|| i17crit ../engine/source/interfaces/int17/i17crit.F
30!|| i17lagm ../engine/source/interfaces/int17/i17lagm.F
31!|| i21lagm ../engine/source/interfaces/int17/i21lagm.F
32!|| my_barrier ../engine/source/system/machine.F
33!||--- uses -----------------------------------------------------
34!|| groupdef_mod ../common_source/modules/groupdef_mod.F
35!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
36!||====================================================================
37 SUBROUTINE i17main(
38 1 NIN ,IPARI ,INTBUF_TAB ,X ,
39 2 V ,A ,ITASK ,IGRBRIC ,
40 3 EMINX ,MS ,NC ,IADLL ,
41 4 LLL ,JLL ,SLL ,XLL ,N_MUL_MX,
42 5 IXS ,IXS16 ,IXS20 ,NKMAX ,COMNTAG )
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE intbufdef_mod
47 USE groupdef_mod
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C
51C-------------------------------------------------------------------------------
52C NOM DIMENSION DESCRIPTION E/S
53C-------------------------------------------------------------------------------
54C
55C NIN 1 NUMERO INTERFACE E
56C
57C IPARI NPARI,NINTER PARAMETRES D'INTERFACE E
58C
59C X 3,NUMNOD COORDONNEES E
60C
61C V 3,NUMNOD VITESSES E
62C
63C EMINX 6*NME<6*NUMELS MIN MAX DE CHAQUE ELEMENT TMP_GLOBAL
64C
65C WAT 4*(NME+100)+4*(NMES+100) TABLEAUX DE TRI TMP_TASK
66C
67C-----------------------------------------------
68C I m p l i c i t T y p e s
69C-----------------------------------------------
70#include "implicit_f.inc"
71#include "comlock.inc"
72C-----------------------------------------------
73C C o m m o n B l o c k s
74C-----------------------------------------------
75#include "com04_c.inc"
76#include "com08_c.inc"
77#include "param_c.inc"
78#include "task_c.inc"
79 COMMON /i17tric/SIZE
81 . SIZE
82C-----------------------------------------------
83C D u m m y A r g u m e n t s
84C-----------------------------------------------
85 INTEGER NIN,ITASK ,NC,N_MUL_MX ,NKMAX
86 INTEGER IPARI(NPARI,NINTER),
87 . IADLL(*) ,LLL(*) ,JLL(*) ,SLL(*) , COMNTAG(*),
88 . IXS(NIXS,*) ,IXS16(8,*) ,IXS20(12,*)
89C REAL
90 my_real
91 . x(3,*), v(3,*), a(3,*), ms(*),eminx(6,*),
92 . xll(*)
93
94 TYPE(intbuf_struct_) INTBUF_TAB
95 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC
96C-----------------------------------------------
97C L o c a l V a r i a b l e s
98C-----------------------------------------------
99 INTEGER NME,NAD,EAD,LWAT,
100 . nme_t,esh_t,ign,ige,multimp,noint,i,mx_cand,nmes,
101 . idum1, idum2, idum3, nmesr
102C REAL
103 my_real
104 . startt, stopt,xx,xy,xz,tzinf,minbox,xmsr(6),size_t
105C-----------------------------------------------
106C S o u r c e L i n e s
107C-----------------------------------------------
108 noint = ipari(15,nin)
109 multimp = ipari(23,nin)
110 ign = ipari(36,nin)
111 ige = ipari(34,nin)
112 nmes =igrbric(ign)%NENTITY
113 nme =igrbric(ige)%NENTITY
114 lwat = 4*(nme+100)+4*(nmes+100)
115 mx_cand=multimp*nmes
116 startt = intbuf_tab%VARIABLES(3)
117 stopt = intbuf_tab%VARIABLES(11)
118 IF(startt>tt) RETURN
119 IF(tt>stopt) RETURN
120C -------------------------------------------------------------
121 nme_t=nme/nthread
122 esh_t = itask*nme_t
123 IF(itask==nthread-1)nme_t=nme-(nthread-1)*(nme/nthread)
124 SIZE = zero
125 intbuf_tab%XSLVG(1) = -ep30
126 intbuf_tab%XSLVG(2) = -ep30
127 intbuf_tab%XSLVG(3) = -ep30
128 intbuf_tab%XSLVG(4) = ep30
129 intbuf_tab%XSLVG(5) = ep30
130 intbuf_tab%XSLVG(6) = ep30
131 intbuf_tab%XMSRG(1) = -ep30
132 intbuf_tab%XMSRG(2) = -ep30
133 intbuf_tab%XMSRG(3) = -ep30
134 intbuf_tab%XMSRG(4) = ep30
135 intbuf_tab%XMSRG(5) = ep30
136 intbuf_tab%XMSRG(6) = ep30
137 xmsr(1) = -ep30
138 xmsr(2) = -ep30
139 xmsr(3) = -ep30
140 xmsr(4) = ep30
141 xmsr(5) = ep30
142 xmsr(6) = ep30
143C -------------------------------------------------------------
144 CALL my_barrier
145C=======================================================================
146C TEST pour savoir s'il faut retrier + initialisation
147C=======================================================================
148 size_t = zero
149 CALL i17crit(
150 1 x ,v ,a ,igrbric(ige)%ENTITY ,eminx,
151 2 nme ,itask ,intbuf_tab%XSAV,ixs ,ixs16,
152 3 ixs20 ,xmsr ,size_t)
153C -------------------------------------------------------------
154#include "lockon.inc"
155 intbuf_tab%XMSRG(1)=max(intbuf_tab%XMSRG(1),xmsr(1))
156 intbuf_tab%XMSRG(2)=max(intbuf_tab%XMSRG(2),xmsr(2))
157 intbuf_tab%XMSRG(3)=max(intbuf_tab%XMSRG(3),xmsr(3))
158 intbuf_tab%XMSRG(4)=min(intbuf_tab%XMSRG(4),xmsr(4))
159 intbuf_tab%XMSRG(5)=min(intbuf_tab%XMSRG(5),xmsr(5))
160 intbuf_tab%XMSRG(6)=min(intbuf_tab%XMSRG(6),xmsr(6))
161#include "lockoff.inc"
162 CALL my_barrier
163C -------------------------------------------------------------
164 CALL i17crit(
165 1 x ,v ,a ,igrbric(ign)%ENTITY,eminx(1,nme+1),
166 2 nmes ,itask ,intbuf_tab%XSAV,ixs ,ixs16 ,
167 3 ixs20 ,intbuf_tab%XSLVG ,size_t )
168C -------------------------------------------------------------
169#include "lockon.inc"
170 intbuf_tab%XSLVG(1)=max(intbuf_tab%XSLVG(1),xmsr(1))
171 intbuf_tab%XSLVG(2)=max(intbuf_tab%XSLVG(2),xmsr(2))
172 intbuf_tab%XSLVG(3)=max(intbuf_tab%XSLVG(3),xmsr(3))
173 intbuf_tab%XSLVG(4)=min(intbuf_tab%XSLVG(4),xmsr(4))
174 intbuf_tab%XSLVG(5)=min(intbuf_tab%XSLVG(5),xmsr(5))
175 intbuf_tab%XSLVG(6)=min(intbuf_tab%XSLVG(6),xmsr(6))
176 SIZE = SIZE + size_t
177#include "lockoff.inc"
178 CALL my_barrier
179C -------------------------------------------------------------
180C TZINF = BUFIN(JD(11)+3) * SIZE / NME / 18
181C MINBOX = BUFIN(JD(11)+4) * SIZE / NME / 18
182C error in the estimation formula
183 tzinf = intbuf_tab%VARIABLES(4) * SIZE / (nme+nmes) / 6
184 minbox = intbuf_tab%VARIABLES(5) * SIZE / (nme+nmes) / 6
185 xx = max(intbuf_tab%XSLVG(1)-intbuf_tab%XMSRG(4),intbuf_tab%XMSRG(1)-intbuf_tab%XSLVG(4))
186 xy = max(intbuf_tab%XSLVG(2)-intbuf_tab%XMSRG(5),intbuf_tab%XMSRG(2)-intbuf_tab%XSLVG(5))
187 xz = max(intbuf_tab%XSLVG(3)-intbuf_tab%XMSRG(6),intbuf_tab%XMSRG(3)-intbuf_tab%XSLVG(6))
188C -------------------------------------------------------------
189 IF(xx**2 + xy**2 + xz**2 >= tzinf**2) THEN
190C=======================================================================
191C TRI
192C=======================================================================
193 ipari(35,nin) = 0
194C -------------------------------------------------------------
195 CALL my_barrier
196C -------------------------------------------------------------
197 CALL i17buce(
198 1 igrbric(ign)%ENTITY,ixs ,ixs16 ,ixs20 ,igrbric(ige)%ENTITY ,
199 2 nme_t ,lwat ,nmes ,intbuf_tab%CAND_E,intbuf_tab%CAND_N,
200 3 noint ,ipari(35,nin) ,tzinf ,minbox ,eminx ,
201 4 intbuf_tab%XSAV,itask ,x ,v ,a ,
202 5 mx_cand ,eminx(1,nme+1),esh_t ,intbuf_tab%FROTS,intbuf_tab%KS,
203 6 idum1 ,idum2 ,idum3 ,nin ,nmesr ,
204 7 v )
205C IDUM1 & IDUM2 replace ISENDTO, IRCVFROM useful for SPMD i17 pena
206C -------------------------------------------------------------
207 CALL my_barrier
208C -------------------------------------------------------------
209 ENDIF
210C=======================================================================
211C CONTACT
212C=======================================================================
213 CALL i17lagm(
214 1 x ,v ,lll ,jll ,sll ,
215 2 xll ,intbuf_tab%CAND_N,intbuf_tab%CAND_E,ipari(35,nin),ixs,
216 3 ixs16 ,iadll ,eminx ,igrbric(ign)%ENTITY,igrbric(ige)%ENTITY,
217 4 nc ,n_mul_mx ,itask ,a ,ipari(30,nin),
218 5 nin ,nkmax ,eminx(1,nme+1),comntag )
219 CALL i21lagm(
220 1 x ,v ,lll ,jll ,sll ,
221 2 xll ,intbuf_tab%CAND_N,intbuf_tab%CAND_E,ipari(35,nin),ixs,
222 3 ixs20 ,iadll ,eminx ,igrbric(ign)%ENTITY,igrbric(ige)%ENTITY,
223 4 nc ,n_mul_mx ,itask ,a ,ipari(30,nin),
224 5 nin ,nkmax ,eminx(1,nme+1),comntag )
225C
226 CALL my_barrier
227C
228 RETURN
229 END
230C
#define my_real
Definition cppsort.cpp:32
subroutine i17buce(neles, ixs, ixs16, ixs20, nelem, nme, lwat, nmes, cand_e, cand_n, noint, i_stok_glob, tzinf, minbox, eminxm, xsav, itask, x, v, a, mx_cand, eminxs, esh_t, frots, ks, isendto, ircvfrom, weight, nin, nmesr, vcom)
Definition i17buce.F:184
subroutine i17crit(x, v, a, nelem, eminx, nme, itask, xsav, ixs, ixs16, ixs20, xmsr_g, size_t_g)
Definition i17crit.F:37
subroutine i17lagm(x, v, lll, jll, sll, xll, candn, cande, i_stok, ixs, ixs16, iadll, eminx, neles, nelem, nc, n_mul_mx, itask, a, itied, nint, nkmax, eminxs, comntag)
Definition i17lagm.F:36
subroutine i17main(nin, ipari, intbuf_tab, x, v, a, itask, igrbric, eminx, ms, nc, iadll, lll, jll, sll, xll, n_mul_mx, ixs, ixs16, ixs20, nkmax, comntag)
Definition i17main.F:43
subroutine i21lagm(x, v, lll, jll, sll, xll, candn, cande, i_stok, ixs, ixs20, iadll, eminx, nsv, nelem, nc, n_mul_mx, itask, a, itied, nint, nkmax, eminxs, comntag)
Definition i21lagm.F:35
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine my_barrier
Definition machine.F:31