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

Go to the source code of this file.

Functions/Subroutines

subroutine split_seg_ielem (ielem_m, proc_mvoisin, mvoisin, nrtm, nrtm_l, tag_seg, cep, cel, idel_solid, intercep, proc, numels, numelq, numelc, numelt, numelp, numelr, numeltg)

Function/Subroutine Documentation

◆ split_seg_ielem()

subroutine split_seg_ielem ( integer, dimension(2,nrtm), intent(in) ielem_m,
integer, dimension(4,nrtm), intent(inout) proc_mvoisin,
integer, dimension(4,nrtm), intent(in) mvoisin,
integer, intent(in) nrtm,
integer, intent(in) nrtm_l,
integer, dimension(nrtm_l), intent(in) tag_seg,
integer, dimension(*), intent(in) cep,
integer, dimension(*), intent(in) cel,
integer, intent(in) idel_solid,
type(intersurfp) intercep,
integer, intent(in) proc,
integer, intent(in) numels,
integer, intent(in) numelq,
integer, intent(in) numelc,
integer, intent(in) numelt,
integer, intent(in) numelp,
integer, intent(in) numelr,
integer, intent(in) numeltg )
Parameters
[in]nrtmnumber of main segments (global)
[in]nrtm_lnumber of main segments (local)
[in]proccurrent proc
[in]numelsnumber of solid elements (global)
[in]numelqnumber of quad elements (global)
[in]numelcnumber of shell elements (global)
[in]numeltnumber of truss elements (global)
[in]numelpnumber of beam elements (global)
[in]numelrnumber of spring elements (global)
[in]numeltgnumber of shell3n elements (global)
[in]idel_solidsolid eroosion flag
[in]ielem_melements connected to main segments
[in]tag_seglocal seg to global segment
[in]celarrays of proc of elements and local number of element
[in]mvoisinneighbhoors of main segments
[in,out]proc_mvoisinprocs of neighbhoors of main segments : to be built
intercepprocs of main segments

Definition at line 31 of file split_seg_ielem.F.

36c
37c split & write segments array (type INTEGER) with local value
38c
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE intbufdef_mod
43 USE front_mod
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER , INTENT(IN) :: NRTM !< number of main segments (global)
52 INTEGER , INTENT(IN) :: NRTM_L !< number of main segments (local)
53 INTEGER , INTENT(IN) :: PROC !< current proc
54 INTEGER , INTENT(IN) :: NUMELS !< number of solid elements (global)
55 INTEGER , INTENT(IN) :: NUMELQ !< number of quad elements (global)
56 INTEGER , INTENT(IN) :: NUMELC !< number of shell elements (global)
57 INTEGER , INTENT(IN) :: NUMELT !< number of truss elements (global)
58 INTEGER , INTENT(IN) :: NUMELP !< number of beam elements (global)
59 INTEGER , INTENT(IN) :: NUMELR !< number of spring elements (global)
60 INTEGER , INTENT(IN) :: NUMELTG !< number of shell3n elements (global)
61
62 INTEGER , INTENT(IN) :: IDEL_SOLID !< solid eroosion flag
63 INTEGER , INTENT(IN) :: IELEM_M(2,NRTM) !< elements connected to main segments
64 INTEGER , INTENT(IN) :: TAG_SEG(NRTM_L) !< local seg to global segment
65 INTEGER , INTENT(IN) :: CEP(*),CEL(*) !< arrays of proc of elements and local number of element
66 INTEGER , INTENT(IN) :: MVOISIN(4,NRTM) !< neighbhoors of main segments
67 INTEGER , INTENT(INOUT) :: PROC_MVOISIN(4,NRTM) !< procs of neighbhoors of main segments : to be built
68 TYPE(INTERSURFP) :: INTERCEP !< procs of main segments
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 INTEGER I,J,K,GLOB,IE1,IEL1,IE2,IEL2,N
73 INTEGER :: OFFSET_SHELL,OFFSET_SHELL3N
74 INTEGER, DIMENSION(:),ALLOCATABLE :: IBUF1,IBUF3
75C ----------------------------------------
76 ALLOCATE(ibuf1(2*nrtm_l))
77 ibuf1(1:2*nrtm_l) = 0
78 ALLOCATE(ibuf3(4*nrtm_l))
79 IF(idel_solid > 0) THEN
80 ibuf3(1:4*nrtm_l) = 0
81 ELSE
82 ibuf3(1:4*nrtm_l) = 0 !should always be allocated
83 ENDIF
84 offset_shell=numels+numelq
85 offset_shell3n=offset_shell+numelc+numelt+numelp+numelr
86 ! ---------------------
87 ! loop over the segment of the current proc
88 ! a segment can be connected to :
89 ! * a solid --> no offset
90 ! * a shell --> offset = global number of solid+quad, ielem_ m = local shell id + offset
91 ! * a shell 3n --> offset = global number of solid+quad+shell+truss+beam+spring ielem_ m = local shell3n id + offset
92 DO i=1, nrtm_l
93 k=tag_seg(i) ! get the segment id
94 ie1 = ielem_m(1,k) ! get the element id (element of the segment)
95 ! ----------------
96 iel1 = 0
97 ! convert the global element id to local element id (local to the processor)
98 IF(ie1 <= numels) THEN ! segment is connected to a solid
99 iel1 = cel(ie1)
100 ELSEIF(offset_shell<ie1.AND.ie1<=offset_shell+numelc) THEN ! segment is connected to a shell
101 iel1 = offset_shell+cel(ie1)
102 ELSEIF(offset_shell3n<ie1.AND.ie1<=offset_shell3n+numeltg) THEN ! segment is connected to a shell3n
103 iel1 = offset_shell3n+cel(ie1)
104 ENDIF
105 ! ----------------
106 ie2 = ielem_m(2,k)
107 iel2 = 0
108 IF(ie2 > 0) THEN
109 iel2 = cel(ie2)
110 ENDIF
111 IF(cep(ie1)==proc ) THEN
112 ibuf1(2*(i-1)+1) =iel1
113 IF(ie2 >0) THEN
114 IF(cep(ie2)==proc ) THEN
115 ibuf1(2*(i-1)+2) =iel2
116 ELSE
117 ibuf1(2*(i-1)+2) =-ie2
118 ENDIF
119 ENDIF
120 ENDIF
121 ENDDO
122 ! ---------------------
123 DO i = 1, nrtm
124 DO j = 1,4
125 k = mvoisin(j,i)
126 IF(k /= 0) proc_mvoisin(j,i) = intercep%P(k)
127 ENDDO
128 ENDDO
129 DO i = 1, nrtm_l
130 k=tag_seg(i)
131 DO j = 1,4
132 n = mvoisin(j,k)
133 IF(n /= 0) ibuf3(4*(i-1)+j) = proc_mvoisin(j,k)
134 ENDDO
135 ENDDO
136
137 CALL write_i_c(ibuf1,2*nrtm_l)
138 CALL write_i_c(ibuf3,4*nrtm_l)
139
140 DEALLOCATE(ibuf1)
141 DEALLOCATE(ibuf3)
142
143 RETURN
void write_i_c(int *w, int *len)