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

Go to the source code of this file.

Functions/Subroutines

subroutine thpout_count (nthgrp2, ithgrp, wa_size, index_wa_pout, iparg, ithbuf, sithbuf)

Function/Subroutine Documentation

◆ thpout_count()

subroutine thpout_count ( integer, intent(in) nthgrp2,
integer, dimension(nithgr,*), intent(in) ithgrp,
integer, intent(inout) wa_size,
integer, dimension(2*nthgrp2+1), intent(inout) index_wa_pout,
integer, dimension(nparg,*) iparg,
integer, dimension(sithbuf) ithbuf,
integer, intent(in) sithbuf )

Definition at line 28 of file thpout_count.F.

30C-----------------------------------------------
31C I m p l i c i t T y p e s
32C-----------------------------------------------
33#include "implicit_f.inc"
34C-----------------------------------------------
35C C o m m o n B l o c k s
36C-----------------------------------------------
37#include "com01_c.inc"
38#include "task_c.inc"
39#include "param_c.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER,INTENT(IN) :: SITHBUF
44 INTEGER IPARG(NPARG,*),ITHBUF(SITHBUF)
45 INTEGER, INTENT(in) :: NTHGRP2
46 INTEGER, INTENT(inout) :: WA_SIZE
47 INTEGER, DIMENSION(2*NTHGRP2+1), INTENT(inout) :: INDEX_WA_POUT
48 INTEGER, DIMENSION(NITHGR,*), INTENT(in) :: ITHGRP
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 LOGICAL :: BOOL
53 INTEGER II,I,J,K,L,N,IP,IH,NG,ITY,MTE,LWA,NEL,NFT,KK(3)
54 INTEGER :: J_FIRST,NITER,IAD,NN,IADV,NVAR,ITYP,IJK
55 INTEGER, DIMENSION(NTHGRP2) :: INDEX_POUT
56C-----------------------------------------------
57
58
59C-------------------------
60C ELEMENTS POUTRE
61C-------------------------
62 ijk = 0
63 wa_size = 0
64 index_pout(1:nthgrp2) = 0
65 DO niter=1,nthgrp2
66 ityp=ithgrp(2,niter)
67 nn =ithgrp(4,niter)
68 iad =ithgrp(5,niter)
69 nvar=ithgrp(6,niter)
70 iadv=ithgrp(7,niter)
71 ii=0
72 IF(ityp==5)THEN
73 ii=0
74 ih=iad
75 DO WHILE (ithbuf(ih+nn) /= ispmd .AND. ih < iad+nn)
76 ih = ih + 1
77 ENDDO
78 IF (ih >= iad+nn) GOTO 666
79
80 DO ng=1,ngroup
81 ity=iparg(5,ng)
82 IF (ity == 5) THEN
83 mte=iparg(1,ng)
84 nel=iparg(2,ng)
85 nft=iparg(3,ng)
86 DO i=1,3
87 kk(i) = nel*(i-1)
88 ENDDO
89
90 DO i=1,nel
91 n=i+nft
92 k=ithbuf(ih)
93 ip=ithbuf(ih+nn)
94 IF (k == n) THEN
95 ih=ih+1
96 ii = ((ih-1) - iad)*nvar
97 DO WHILE (ithbuf(ih+nn) /= ispmd .AND. ih < iad+nn)
98 ih = ih + 1
99 ENDDO
100 IF (ih > iad+nn) GOTO 666
101 wa_size = wa_size + nvar + 1
102 ENDIF
103 ENDDO
104 ENDIF
105 ENDDO
106 ENDIF
107 666 continue
108 index_pout(niter) = wa_size
109 ENDDO
110
111
112 j_first = 0
113 bool = .true.
114 DO i=1,nthgrp2
115 IF(bool.EQV..true.) THEN
116 IF( index_pout(i)/=0 ) THEN
117 bool = .false.
118 j_first = i
119 ENDIF
120 ENDIF
121 ENDDO
122
123 j = 0
124 IF(j_first>0) THEN
125 j=j+1
126 index_wa_pout(j) = index_pout(j_first)
127 j=j+1
128 index_wa_pout(j) = j_first
129 DO i=j_first+1,nthgrp2
130 IF( index_pout(i)-index_pout(i-1)>0 ) THEN
131 j=j+1
132 index_wa_pout(j) = index_pout(i)
133 j=j+1
134 index_wa_pout(j) = i
135 ENDIF
136 ENDDO
137 ENDIF
138 index_wa_pout(2*nthgrp2+1) = j ! number of non-zero index
139C-----------
140 RETURN
integer function nvar(text)
Definition nvar.F:32