OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
thnst_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 thnst_count (nthgrp2, ithgrp, wa_size, index_wa_nst, iparg, ithbuf, sithbuf)

Function/Subroutine Documentation

◆ thnst_count()

subroutine thnst_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_nst,
integer, dimension(nparg,*) iparg,
integer, dimension(sithbuf) ithbuf,
integer, intent(in) sithbuf )

Definition at line 28 of file thnst_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_NST
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, N, IH, NG, ITY, MTE, NB0, NB1, NB2, NB3,
54 . NB4, NB5, NNB3, MB1, MB2, MB3, MB4, MB5, K, IST, IP, L,
55 . LWA, IMAT, IPROP, NX, IGTYP, NUVAR, NUVARN,NEL,NFT,
56 . KVAR,KVARN
58 . wwa(100)
59 INTEGER :: J_FIRST,NITER,IAD,NN,IADV,NVAR,ITYP,IJK
60 INTEGER, DIMENSION(NTHGRP2) :: INDEX_NST
61C-------------------------
62C ELEMENTS NSTRANDS
63C-------------------------
64
65 ijk = 0
66 wa_size = 0
67 index_nst(1:nthgrp2) = 0
68 DO niter=1,nthgrp2
69 ityp=ithgrp(2,niter)
70 nn =ithgrp(4,niter)
71 iad =ithgrp(5,niter)
72 nvar=ithgrp(6,niter)
73 iadv=ithgrp(7,niter)
74 ii=0
75 IF(ityp==100)THEN
76! -------------------------------
77 ii=0
78 ih=iad
79
80 DO WHILE (ithbuf(ih+nn) /= ispmd .AND. ih < iad+nn)
81 ih = ih + 1
82 ENDDO
83 IF (ih >= iad+nn) GOTO 666
84
85 DO ng=1,ngroup
86 ity=iparg(5,ng)
87 IF (ity == 100) THEN
88C multi-purpose elements are nstrands elements only (to be modified).
89 nel=iparg(2,ng)
90 nft=iparg(3,ng)
91
92 DO i=1,nel
93 n =i+nft
94 k =ithbuf(ih)
95 IF (k == n) THEN
96 DO j=1,nn
97C loop over strands into the ONE NSTRAND TH group.
98C strand to save:
99 wa_size = wa_size + nvar
100 ih=ih+1
101 ENDDO ! DO J=1,NN
102 wa_size = wa_size + 1
103 ENDIF ! IF (K == N)
104 ENDDO ! DO I=1,NEL
105 ENDIF ! IF (ITY == 100)
106 ENDDO ! DO NG=1,NGROUP
107 ENDIF
108 666 continue
109 index_nst(niter) = wa_size
110 ENDDO
111
112
113 j_first = 0
114 bool = .true.
115 DO i=1,nthgrp2
116 IF(bool.EQV..true.) THEN
117 IF( index_nst(i)/=0 ) THEN
118 bool = .false.
119 j_first = i
120 ENDIF
121 ENDIF
122 ENDDO
123
124 j = 0
125 IF(j_first>0) THEN
126 j=j+1
127 index_wa_nst(j) = index_nst(j_first)
128 j=j+1
129 index_wa_nst(j) = j_first
130 DO i=j_first+1,nthgrp2
131 IF( index_nst(i)-index_nst(i-1)>0 ) THEN
132 j=j+1
133 index_wa_nst(j) = index_nst(i)
134 j=j+1
135 index_wa_nst(j) = i
136 ENDIF
137 ENDDO
138 ENDIF
139 index_wa_nst(2*nthgrp2+1) = j ! number of non-zero index
140C-----------
141 RETURN
#define my_real
Definition cppsort.cpp:32
integer function nvar(text)
Definition nvar.F:32