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