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

Go to the source code of this file.

Functions/Subroutines

subroutine w_th (ithgrp, ithbuf, lenthg, nodlocal, cel, nthgrp0, nthgrp2, proc, celsph, numloccluster, nbr_th_monvol)

Function/Subroutine Documentation

◆ w_th()

subroutine w_th ( integer, dimension(nithgr,*) ithgrp,
integer, dimension(*) ithbuf,
integer lenthg,
integer, dimension(*) nodlocal,
integer, dimension(*) cel,
integer nthgrp0,
integer nthgrp2,
integer proc,
integer, dimension(*) celsph,
integer, dimension(*) numloccluster,
integer nbr_th_monvol )

Definition at line 31 of file w_th.F.

34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41#include "implicit_f.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com04_c.inc"
46#include "param_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER PROC, LENTHG, NTHGRP0, NTHGRP2,
51 . ITHGRP(NITHGR,*), ITHBUF(*), NODLOCAL(*),
52 . CEL(*), CELSPH(*), NUMLOCCLUSTER(*)
53 INTEGER :: NBR_TH_MONVOL ! number of /TH/MONV
54C-----------------------------------------------
55C E x t e r n a l F u n c t i o n s
56C-----------------------------------------------
57 INTEGER NLOCAL
58 EXTERNAL nlocal
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER NT, IH, ITYP, NNE, IAD, K, P, ESHIFT,
63 . ITHBUF_L(LENTHG)
64 eshift = 0
65C
66C Header recopie
67C
68 CALL write_i_c(ithgrp,nithgr*(nthgrp0+nbr_th_monvol))
69C
70C buffer renumerote localement
71C
72 DO nt = 1, lenthg
73 ithbuf_l(nt) = ithbuf(nt)
74 ENDDO
75C
76 DO nt = 1, nthgrp2
77 ityp=ithgrp(2,nt)
78 nne =ithgrp(4,nt)
79 iad =ithgrp(5,nt)
80 IF ((ityp>=1.AND.ityp<=7).OR.
81 . ityp==50.OR.ityp==51.OR.ityp==100) THEN
82C elements
83 DO ih = 1, nne
84 k = ithbuf_l(iad-1+ih)
85 p = ithbuf_l(iad+nne-1+ih)+1
86 IF(ityp==1) THEN
87 eshift = 0
88 ELSEIF(ityp==2) THEN
89 eshift = numels
90 ELSEIF(ityp==3) THEN
91 eshift = numels+numelq
92 ELSEIF(ityp==4) THEN
93 eshift = numels+numelq+numelc
94 ELSEIF(ityp==5) THEN
95 eshift = numels+numelq+numelc+numelt
96 ELSEIF(ityp==6) THEN
97 eshift = numels+numelq+numelc+numelt+numelp
98 ELSEIF(ityp==7) THEN
99 eshift = numels+numelq+numelc+numelt+numelp+numelr
100 ELSEIF(ityp==100) THEN
101 eshift = numels+numelq+numelc+numelt+numelp+numelr+numeltg
102 ENDIF
103 IF(p==proc) THEN
104 IF(ityp==51)THEN
105 ithbuf_l(iad-1+ih) = celsph(k)
106 ELSE
107 ithbuf_l(iad-1+ih) = cel(k+eshift)
108 ENDIF
109 ENDIF
110 ENDDO
111 ELSEIF (ityp==0) THEN
112C noeuds
113 DO ih = 1, nne
114 k = ithbuf_l(iad-1+ih)
115 IF(nlocal(k,proc)==1) THEN
116C noeud present => nodlocal
117 ithbuf_l(iad-1+ih) = nodlocal(k)
118 ELSE
119C noeud abscent => 0
120 ithbuf_l(iad-1+ih) = 0
121 ENDIF
122 ENDDO
123 ELSEIF (ityp==109) THEN
124 ELSEIF (ityp == 114) THEN
125 DO ih=iad,iad+nne-1
126c local number of cluster, or zero
127 ithbuf_l(ih) = numloccluster(ithbuf(ih))
128 ENDDO
129 ENDIF
130 ENDDO
131C
132 CALL write_i_c(ithbuf_l,lenthg)
133C
134 RETURN
integer function nlocal(n, p)
Definition ddtools.F:349
void write_i_c(int *w, int *len)