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

Go to the source code of this file.

Functions/Subroutines

subroutine count3 (irect, mnn, n, nrt, ntag)

Function/Subroutine Documentation

◆ count3()

subroutine count3 ( integer, dimension(*) irect,
integer, dimension(*) mnn,
integer n,
integer nrt,
integer, dimension(0:2*numnod), intent(inout) ntag )

Definition at line 32 of file count3.F.

33C-----------------------------------------------------------------------
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C D u m m y A r g u m e n t s
40C-----------------------------------------------
41 INTEGER N, NRT
42 INTEGER IRECT(*), MNN(*)
43 INTEGER, DIMENSION(0:2*NUMNOD), INTENT(INOUT) :: NTAG
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "com04_c.inc"
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 INTEGER IWORK(70000)
52 INTEGER I, NN, K,NINDEX0
53 INTEGER, DIMENSION(:), ALLOCATABLE :: INDEX0
54C-----------------------------------------------
55C
56 ALLOCATE(index0(2*numnod))
57 ntag(0) = 1 ! special case IRECT=0
58 n = 0
59 nindex0 = 0
60 DO i=1,nrt*4 ! 4 : size of IRECT
61 nn = irect(i)
62 IF(ntag(nn) == 0) THEN
63 n=n+1
64 mnn(n)=nn
65 ntag(nn)=1
66 nindex0 = nindex0 + 1
67 index0(nindex0) = nn
68 END IF
69 ENDDO
70C Need to sort MNM but avoid treatment over NUMNOD if too big
71 IF(n>numnod/10)THEN ! test to check which treatment is best
72 n=0
73 DO i=1,numnod
74 IF(ntag(i) /= 0) THEN
75 n=n+1
76 mnn(n)=i
77 ntag(i) = 0
78 END IF
79 END DO
80 ELSE ! N needs to be at least < NUMNOD/2
81 CALL my_orders(0,iwork,mnn,ntag(1),n,1)
82 DO i=1,n
83 ntag(n+i)=mnn(i)
84 END DO
85 DO i=1,n
86 mnn(i)=ntag(n+ntag(i))
87 END DO
88 DO i=1,n
89 ntag(n+ntag(i)) = 0
90 ENDDO
91 DO i=1,n
92 ntag(n+i) = 0
93 ntag(i) = 0
94 ENDDO
95 END IF
96
97#include "vectorize.inc"
98 DO k = 1,nindex0
99 ntag(index0(k)) = 0
100 ENDDO
101
102 DEALLOCATE(index0)
103C
104 RETURN
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82