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

Go to the source code of this file.

Functions/Subroutines

subroutine sort_surf (igrsurf, ixs, ixc, ixtg, ixq, ixp, ixr, ixt, kxx, nixx)

Function/Subroutine Documentation

◆ sort_surf()

subroutine sort_surf ( type(surf_), dimension(nsurf), intent(inout) igrsurf,
integer, dimension(nixs,numels), intent(in) ixs,
integer, dimension(nixc,numelc), intent(in) ixc,
integer, dimension(nixtg,numeltg), intent(in) ixtg,
integer, dimension(nixq,numelq), intent(in) ixq,
integer, dimension(nixp,numelp), intent(in) ixp,
integer, dimension(nixr,numelr), intent(in) ixr,
integer, dimension(nixt,numelt), intent(in) ixt,
integer, dimension(nixx,numelx), intent(in) kxx,
integer, intent(in) nixx )
Parameters
[in]nixxarray size
[in]ixselem buffer for /BRIC entities
[in]ixcelem buffer for /SHELL entities
[in]ixtgelem buffer for /SH3N (3d) or /TRIA (2d) entities
[in]ixqelem buffer for /QUAD entities
[in]ixpelem buffer for /BEAM entities
[in]ixrelem buffer for /SPRING entities
[in]ixtelem buffer for /TRUSS entities
[in]kxxelem buffer for /XELEM entities
[in,out]igrsurfdata structure for surfaces

Definition at line 30 of file sort_surf.F.

31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
34 USE groupdef_mod
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C C o m m o n B l o c k s
41C-----------------------------------------------
42#include "com04_c.inc"
43#include "param_c.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER,INTENT(IN) :: NIXX !< array size
48 INTEGER,INTENT(IN) :: IXS(NIXS,NUMELS) !< elem buffer for /BRIC entities
49 INTEGER,INTENT(IN) :: IXC(NIXC,NUMELC) !< elem buffer for /SHELL entities
50 INTEGER,INTENT(IN) :: IXTG(NIXTG,NUMELTG) !< elem buffer for /SH3N (3d) or /TRIA (2d) entities
51 INTEGER,INTENT(IN) :: IXQ(NIXQ,NUMELQ) !< elem buffer for /QUAD entities
52 INTEGER,INTENT(IN) :: IXP(NIXP,NUMELP) !< elem buffer for /BEAM entities
53 INTEGER,INTENT(IN) :: IXR(NIXR,NUMELR) !< elem buffer for /SPRING entities
54 INTEGER,INTENT(IN) :: IXT(NIXT,NUMELT) !< elem buffer for /TRUSS entities
55 INTEGER,INTENT(IN) :: KXX(NIXX,NUMELX) !< elem buffer for /XELEM entities
56 TYPE(SURF_),INTENT(INOUT), DIMENSION(NSURF) :: IGRSURF !< data structure for surfaces
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER I,J,IAD_L,NN,ELEM,ELEM_G,N1,N2,N3,N4,ITYP,K,IADG2,IADIBUF,IT,IAD
61 INTEGER, DIMENSION(:), ALLOCATABLE :: IBUFSSG_TRI,IWORK,INDEX
62 INTEGER, DIMENSION(:,:), ALLOCATABLE :: ITRI
63C-----------------------------------------------
64C S o u r c e L i n e s
65C-----------------------------------------------
66 ALLOCATE (iwork(80000))
67
68 DO k=1,nsurf
69 nn = igrsurf(k)%NSEG
70
71 ALLOCATE (ibufssg_tri(nisx*nn))
72 ALLOCATE (itri(2,nn))
73 ALLOCATE (index(3*nn))
74
75 DO i=1,nn
76 ibufssg_tri(6*(i-1)+1) = igrsurf(k)%NODES(i,1)
77 ibufssg_tri(6*(i-1)+2) = igrsurf(k)%NODES(i,2)
78 ibufssg_tri(6*(i-1)+3) = igrsurf(k)%NODES(i,3)
79 ibufssg_tri(6*(i-1)+4) = igrsurf(k)%NODES(i,4)
80 ibufssg_tri(6*(i-1)+5) = igrsurf(k)%ELTYP(i)
81 ibufssg_tri(6*(i-1)+6) = igrsurf(k)%ELEM(i)
82
83 elem = igrsurf(k)%ELEM(i)
84 ityp = igrsurf(k)%ELTYP(i)
85 ! ITYP = 0 - surf of segments
86 ! ITYP = 1 - surf of solids
87 ! ITYP = 2 - surf of quads
88 ! ITYP = 3 - surf of SH4N
89 ! ITYP = 4 - line of trusses
90 ! ITYP = 5 - line of beams
91 ! ITYP = 6 - line of springs
92 ! ITYP = 7 - surf of SH3N
93 ! ITYP = 8 - line of XELEM (nstrand element)
94 ! ITYP = 101 - ISOGEOMETRIC
95
96 itri(1,i) = ityp
97 itri(2,i) = 0
98
99 SELECT CASE (ityp)
100 CASE ( 0 )
101 itri(2,i) = 0
102 CASE ( 1 )
103 itri(2,i) = ixs(nixs,elem)
104 CASE ( 2 )
105 itri(2,i) = ixq(nixq,elem)
106 CASE ( 3 )
107 itri(2,i) = ixc(nixc,elem)
108 CASE ( 4 )
109 itri(2,i) = ixt(nixt,elem)
110 CASE ( 5 )
111 itri(2,i) = ixp(nixp,elem)
112 CASE ( 6 )
113 itri(2,i) = ixr(nixr,elem)
114 CASE ( 7 )
115 itri(2,i) = ixtg(nixtg,elem)
116 CASE ( 8 )
117 itri(2,i) = kxx(nixx,elem)
118 END SELECT
119
120 index(i) = i
121
122 ENDDO ! next NN
123
124 CALL my_orders(0,iwork,itri,index,nn,2)
125
126 DO i=1,nn
127 it = index(i)
128 igrsurf(k)%NODES(i,1) = ibufssg_tri(6*(it-1)+1)
129 igrsurf(k)%NODES(i,2) = ibufssg_tri(6*(it-1)+2)
130 igrsurf(k)%NODES(i,3) = ibufssg_tri(6*(it-1)+3)
131 igrsurf(k)%NODES(i,4) = ibufssg_tri(6*(it-1)+4)
132 igrsurf(k)%ELTYP(i) = ibufssg_tri(6*(it-1)+5)
133 igrsurf(k)%ELEM(i) = ibufssg_tri(6*(it-1)+6)
134 ENDDO
135
136 DEALLOCATE(ibufssg_tri)
137 DEALLOCATE(itri)
138 DEALLOCATE(index)
139
140 ENDDO ! DO K=1,NSURF
141!---
142 RETURN
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82