OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
thpinit.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine thpinit (ithgrp, ithbuf, iparg, dd_iad, ixri, iflag, nthgrp2)

Function/Subroutine Documentation

◆ thpinit()

subroutine thpinit ( integer, dimension(nithgr,*) ithgrp,
integer, dimension(*) ithbuf,
integer, dimension(nparg,*) iparg,
integer, dimension(nspmd+1,*) dd_iad,
integer, dimension(4,*) ixri,
integer iflag,
integer nthgrp2 )

Definition at line 30 of file thpinit.F.

33C----------------------------------------------
34C INITIALISATION DU BUFFER TH (PROC SPMD)
35C----------------------------------------------
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "com01_c.inc"
47#include "param_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER :: ITHGRP(NITHGR,*),ITHBUF(*),IPARG(NPARG,*),DD_IAD(NSPMD+1,*), IXRI(4,*),IFLAG, NTHGRP2
52C-----------------------------------------------
53C F u n c t i o n
54C-----------------------------------------------
55 INTEGER NLOCAL
56 EXTERNAL nlocal
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER :: P,NT,NG,I,K,NNE,IAD,ITYP,IH,NFT,ITY,NEL,N1,N2
61C-----------------------------------------------
62 IF(iflag==0) THEN
63C
64C Initialisation de nft0 = nft
65C
66 DO ng = 1, ngroup
67 iparg(31,ng) = iparg(3,ng)
68 ENDDO
69 ENDIF
70C
71C Mise a jour de PROC dans ITHBUF en fonction de la domdec
72C
73 IF (nspmd>1) THEN
74C traitement de p1 a pmaxporc-1 (p0 par defaut)
75 DO nt = 1, nthgrp2
76 ityp=ithgrp(2,nt)
77 nne =ithgrp(4,nt)
78 iad =ithgrp(5,nt)
79 IF((ityp >= 1 .AND. ityp <= 7) .OR. ityp == 50 .OR. ityp == 51 .OR. ityp == 100)THEN
80 DO ih = 1, nne
81 k = ithbuf(iad-1+ih)
82 DO ng = 1, ngroup
83 ity = iparg(5,ng)
84 IF(ity==ityp) THEN
85 nel = iparg(2,ng)
86 nft = iparg(3,ng)
87 p = iparg(32,ng)
88 IF (k>nft.AND.k<=nft+nel) THEN
89 ithbuf(iad+nne-1+ih) = p
90 ENDIF
91 ENDIF
92 ENDDO
93 ENDDO
94 ELSEIF (ityp==0) THEN
95c DO IH = 1, NNE
96c K = ITHBUF(IAD-1+IH)
97c DO P = 1, NSPMD
98c IF(MOD(FRONT(K,P),10)==1) THEN
99c ITHBUF(IAD+NNE-1+IH) = P-1
100c GOTO 209
101c ENDIF
102c ENDDO
103c 209 CONTINUE
104c ENDDO
105 ELSEIF (ityp==109) THEN
106 DO ih = 1, nne
107 k = ithbuf(iad-1+ih)
108 n1 = ixri(2,k)
109 n2 = ixri(3,k)
110 DO p = 1, nspmd
111 IF(nlocal(n1,p)==1.AND.
112 . nlocal(n2,p)==1) THEN
113 ithbuf(iad+nne-1+ih) = p
114 GOTO 109
115 ENDIF
116 ENDDO
117 109 CONTINUE
118 ENDDO
119 ENDIF
120 ENDDO
121 ENDIF
122C
123 RETURN
integer function nlocal(n, p)
Definition ddtools.F:349