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

Go to the source code of this file.

Functions/Subroutines

subroutine thcoq_count (nthgrp2, ithgrp, wa_size, index_wa_coq, iparg, ithbuf, sithbuf)

Function/Subroutine Documentation

◆ thcoq_count()

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

Definition at line 28 of file thcoq_count.F.

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