OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
admordr.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "param_c.inc"
#include "parit_c.inc"
#include "remesh_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine admordr (sh4tree, sh3tree, ixc, ixtg)

Function/Subroutine Documentation

◆ admordr()

subroutine admordr ( integer, dimension(ksh4tree,*) sh4tree,
integer, dimension(ksh3tree,*) sh3tree,
integer, dimension(nixc,*) ixc,
integer, dimension(nixtg,*) ixtg )

Definition at line 34 of file admordr.F.

35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE remesh_mod
39 USE my_alloc_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44#include "comlock.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "param_c.inc"
49#include "parit_c.inc"
50#include "remesh_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER SH4TREE(KSH4TREE,*), SH3TREE(KSH3TREE,*),
55 . IXC(NIXC,*), IXTG(NIXTG,*)
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER N,NN,LEVEL,IP,NLEV,PTR,SON,
60 . J,NI,IERR
61 INTEGER,DIMENSION(:),ALLOCATABLE :: LTMP4
62 INTEGER,DIMENSION(:),ALLOCATABLE :: LTMP3
63 INTEGER,DIMENSION(:),ALLOCATABLE :: ITRI
64 INTEGER,DIMENSION(:),ALLOCATABLE :: SORT_INDEX
65 INTEGER WORK(70000)
66C-----------------------------------------------
67 CALL my_alloc(ltmp4,nsh4act)
68 CALL my_alloc(ltmp3,nsh3act)
69 CALL my_alloc(itri,max(nsh4act,nsh3act))
70 CALL my_alloc(sort_index,2*max(nsh4act,nsh3act))
71C-----------------------------------------------
72 IF(iparit/=0)THEN
73
74 DO nn = 1, nsh4act
75 itri(nn) = ixc(nixc,lsh4act(nn))
76 ENDDO
77 CALL my_orders(0,work,itri,sort_index,nsh4act,1)
78 ltmp4(1:nsh4act)=lsh4act(1:nsh4act)
79 DO nn = 1, nsh4act
80 lsh4act(nn)=ltmp4(sort_index(nn))
81 END DO
82
83 DO nn = 1, nsh3act
84 itri(nn) = ixtg(nixtg,lsh3act(nn))
85 ENDDO
86 CALL my_orders(0,work,itri,sort_index,nsh3act,1)
87 ltmp3(1:nsh3act)=lsh3act(1:nsh3act)
88 DO nn = 1, nsh3act
89 lsh3act(nn)=ltmp3(sort_index(nn))
90 END DO
91
92 END IF
93
94 psh4act=0
95
96 DO nn=1,nsh4act
97 n =lsh4act(nn)
98 level=sh4tree(3,n)
99 psh4act(level)=psh4act(level)+1
100 ltmp4(nn)=n
101 END DO
102C
103 DO level=1,levelmax
104 psh4act(level)=psh4act(level)+psh4act(level-1)
105 END DO
106C
107 DO level=levelmax+1,1,-1
108 psh4act(level)=psh4act(level-1)
109 END DO
110 psh4act(0)=0
111C
112 DO nn=1,nsh4act
113 n =ltmp4(nn)
114 level=sh4tree(3,n)
115 psh4act(level)=psh4act(level)+1
116 lsh4act(psh4act(level))=n
117 END DO
118C
119 DO level=levelmax+1,1,-1
120 psh4act(level)=psh4act(level-1)
121 END DO
122 psh4act(0)=0
123C
124 psh4kin(0)=0
125 lsh4kin(1:psh4act(1))=lsh4act(1:psh4act(1))
126
127 ptr = psh4act(1)
128 DO level=0,levelmax-1
129 psh4kin(level+1)=ptr
130 DO nn=psh4kin(level)+1,psh4kin(level+1)
131 n =lsh4kin(nn)
132 son=sh4tree(2,n)
133 ptr=ptr+1
134 lsh4kin(ptr)=son
135 ptr=ptr+1
136 lsh4kin(ptr)=son+1
137 ptr=ptr+1
138 lsh4kin(ptr)=son+2
139 ptr=ptr+1
140 lsh4kin(ptr)=son+3
141 END DO
142 DO nn=psh4act(level+1)+1,psh4act(level+2)
143 ptr=ptr+1
144 lsh4kin(ptr)=lsh4act(nn)
145 END DO
146 END DO
147 psh4kin(levelmax+1)=ptr
148
149C--------------------------------------------
150C TRIANGLES
151C--------------------------------------------
152 psh3act=0
153
154 DO nn=1,nsh3act
155 n =lsh3act(nn)
156 level=sh3tree(3,n)
157 psh3act(level)=psh3act(level)+1
158 ltmp3(nn)=n
159 END DO
160C
161 DO level=1,levelmax
162 psh3act(level)=psh3act(level)+psh3act(level-1)
163 END DO
164C
165 DO level=levelmax+1,1,-1
166 psh3act(level)=psh3act(level-1)
167 END DO
168 psh3act(0)=0
169C
170 DO nn=1,nsh3act
171 n =ltmp3(nn)
172 level=sh3tree(3,n)
173 psh3act(level)=psh3act(level)+1
174 lsh3act(psh3act(level))=n
175 END DO
176C
177 DO level=levelmax+1,1,-1
178 psh3act(level)=psh3act(level-1)
179 END DO
180 psh3act(0)=0
181C
182 psh3kin(0)=0
183 lsh3kin(1:psh3act(1))=lsh3act(1:psh3act(1))
184
185 ptr = psh3act(1)
186 DO level=0,levelmax-1
187 psh3kin(level+1)=ptr
188 DO nn=psh3kin(level)+1,psh3kin(level+1)
189 n =lsh3kin(nn)
190 son=sh3tree(2,n)
191 ptr=ptr+1
192 lsh3kin(ptr)=son
193 ptr=ptr+1
194 lsh3kin(ptr)=son+1
195 ptr=ptr+1
196 lsh3kin(ptr)=son+2
197 ptr=ptr+1
198 lsh3kin(ptr)=son+3
199 END DO
200 DO nn=psh3act(level+1)+1,psh3act(level+2)
201 ptr=ptr+1
202 lsh3kin(ptr)=lsh3act(nn)
203 END DO
204 END DO
205 psh3kin(levelmax+1)=ptr
206C--------------------------------------------
207 DEALLOCATE(ltmp4)
208 DEALLOCATE(ltmp3)
209 DEALLOCATE(itri)
210 DEALLOCATE(sort_index)
211
212 RETURN
#define max(a, b)
Definition macros.h:21
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
integer, dimension(:), allocatable lsh3act
Definition remesh_mod.F:62
integer, dimension(:), allocatable lsh4kin
Definition remesh_mod.F:62
integer, dimension(:), allocatable lsh3kin
Definition remesh_mod.F:62
integer, dimension(:), allocatable psh4kin
Definition remesh_mod.F:62
integer, dimension(:), allocatable psh3kin
Definition remesh_mod.F:62
integer, dimension(:), allocatable psh4act
Definition remesh_mod.F:62
integer nsh3act
Definition remesh_mod.F:66
integer nsh4act
Definition remesh_mod.F:66
integer, dimension(:), allocatable lsh4act
Definition remesh_mod.F:62
integer, dimension(:), allocatable psh3act
Definition remesh_mod.F:62