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

Go to the source code of this file.

Functions/Subroutines

subroutine count_remote_nb_elem_edge (size_buffer, buffer, geo, ixs, ixc, ixt, ixp, ixr, ixtg, addcnel, nodes, cnel, chunk, ixs10)

Function/Subroutine Documentation

◆ count_remote_nb_elem_edge()

subroutine count_remote_nb_elem_edge ( integer, intent(in) size_buffer,
integer, dimension(size_buffer), intent(inout) buffer,
intent(in) geo,
integer, dimension(nixs,numels), intent(in), target ixs,
integer, dimension(nixc,numelc), intent(in), target ixc,
integer, dimension(nixt,numelt), intent(in), target ixt,
integer, dimension(nixp,numelp), intent(in), target ixp,
integer, dimension(nixr,numelr), intent(in), target ixr,
integer, dimension(nixtg,numeltg), intent(in), target ixtg,
integer, dimension(0:numnod+1), intent(in) addcnel,
type(nodal_arrays_), intent(inout) nodes,
integer, dimension(0:lcnel), intent(in) cnel,
integer, intent(in) chunk,
integer, dimension(6,numels10), intent(in) ixs10 )
Parameters
[in]ixs10tetra10 data

Definition at line 30 of file count_remote_nb_elem_edge.F.

33!$COMMENT
34! COUNT_REMOTE_NB_ELEM_EDGE description
35! check if a list of node is associated
36! to a deleted element :
37! - if it's true : need to deactivate the node from the interface
38! COUNT_REMOTE_NB_ELEM_EDGE organization
39! loop over the 2 or 4 nodes:
40! - convert the global id to local id
41! - check if a element is associated to the list of node (2 or 4 nodes)
42! - if it's true, send to the remote processor "you need to deactivate
43! the nodes from your interface!"
44!$ENDCOMMENT
45 USE nodal_arrays_mod
46C-----------------------------------------------
47C I m p l i c i t T y p e s
48C-----------------------------------------------
49#include "implicit_f.inc"
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "com04_c.inc"
54#include "param_c.inc"
55#include "scr17_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER, INTENT(in) :: SIZE_BUFFER
60 INTEGER, INTENT(in) :: CHUNK ! chunk size : 1-> interface id, 2-> surface id, 3:6-> node id (for type11, 5&6 values are equal to 0)
61 INTEGER, DIMENSION(SIZE_BUFFER), INTENT(inout) :: BUFFER
62 INTEGER, DIMENSION(NIXS,NUMELS),TARGET, INTENT(in) :: IXS ! solid array
63 INTEGER, DIMENSION(NIXC,NUMELC),TARGET, INTENT(in) :: IXC ! shell array
64 INTEGER, DIMENSION(NIXT,NUMELT),TARGET, INTENT(in) :: IXT! truss array
65 INTEGER, DIMENSION(NIXP,NUMELP),TARGET, INTENT(in) :: IXP! beam array
66 INTEGER, DIMENSION(NIXR,NUMELR),TARGET, INTENT(in) :: IXR! spring array
67 INTEGER, DIMENSION(NIXTG,NUMELTG),TARGET, INTENT(in) :: IXTG! triangle array
68 INTEGER, DIMENSION(0:NUMNOD+1), INTENT(in) :: ADDCNEL ! address for the CNEL array
69 TYPE(nodal_arrays_), intent(inout) :: NODES
70 my_real, DIMENSION(NPROPG,NUMGEO), INTENT(in) :: geo
71 INTEGER, DIMENSION(0:LCNEL), INTENT(in) :: CNEL ! connectivity node-->element
72
73C-----------------------------------------------
74C L o c a l V a r i a b l e s
75C-----------------------------------------------
76 INTEGER :: I,J,K
77 INTEGER :: N1,N2,N3,N4,NIN
78 INTEGER :: NUMBER_NODE
79 INTEGER, DIMENSION(4) :: LOCAL_NODE,GLOBAL_NODE
80 INTEGER :: ELEM_ID,NODE_ID
81 INTEGER :: OFFSET_SOLID,OFFSET_QUAD,OFFSET_SHELL
82 INTEGER :: OFFSET_TRUSS,OFFSET_BEAM,OFFSET_SPRING
83 INTEGER :: OFFSET_TRIANGLE,OFFSET_UR
84
85 INTEGER, DIMENSION(:), ALLOCATABLE :: TAG_NODE
86 INTEGER :: NUMBER_ELEMENT, NUMBER_ELEMENT_HERE
87 INTEGER, DIMENSION(:), ALLOCATABLE :: LIST_ELEMENT
88 LOGICAL, DIMENSION(:), ALLOCATABLE :: ALREADY_HERE
89 INTEGER, DIMENSION(6,NUMELS10), INTENT(in) :: IXS10!< tetra10 data
90
91C-----------------------------------------------
92 ! --------------------------
93 offset_solid = 0
94 offset_quad=offset_solid+numels
95 offset_shell=offset_quad+numelq
96 offset_truss=offset_shell+numelc
97 offset_beam=offset_truss+numelt
98 offset_spring=offset_beam+numelp
99 offset_triangle=offset_spring+numelr
100 offset_ur=offset_triangle+numeltg
101 ! --------------------------
102 ! allocation of already_here array
103 ! cnel is not bijective (2 differents index can give the same cnel(i) value)
104 ! --> need to tag the elements to avoid a duplication
105 number_element = numels + numelq + numelc + numelt + numelp + numelr + numeltg
106 ALLOCATE( list_element(number_element) ) ! <-- list of element to flush only the modified cells
107 ALLOCATE( already_here(number_element) ) ! <-- boolean to avoid any element duplications
108 already_here(1:number_element) = .false.
109 number_element_here = 0
110
111 ALLOCATE( tag_node(numnod+1) )
112 tag_node(1:numnod+1) = 0
113 DO j=1,size_buffer,chunk
114 nin = buffer(j)
115 global_node(1:4) = buffer(j+2:j+chunk-1)
116 local_node(1) = get_local_node_id(nodes,global_node(1))
117 local_node(2) = get_local_node_id(nodes,global_node(2))
118 local_node(3:4) = numnod+1
119 number_node = 2 ! for type 11, there are 2 nodes per segments
120 IF(global_node(3)/=0) local_node(3) = get_local_node_id(nodes, global_node(3))
121 IF(global_node(4)/=0) local_node(4) = get_local_node_id(nodes, global_node(4))
122 IF((global_node(3)/=0).AND.(global_node(4)/=0)) number_node = 4 ! for type 7, there are 4 nodes per segments
123 buffer(j+2:j+3) = 0
124 n1 = local_node(1)
125 n2 = local_node(2)
126 n3 = local_node(3)
127 n4 = local_node(4)
128 number_element_here = 0
129 ! ---------------
130 ! loop over the elements connected to N1
131 DO i=addcnel(n1),addcnel(n1+1)-1
132 elem_id = cnel(i) ! <-- element id
133 tag_node(n1) = 0
134 tag_node(n2) = 0
135 tag_node(n3) = 0
136 tag_node(n4) = 0
137 ! -----------------
138 ! solid element
139 IF(elem_id<=offset_shell) THEN
140 DO k=2,9
141 node_id = ixs(k,elem_id)
142 tag_node(node_id) = 1
143 ENDDO
144 IF(elem_id>numels8.AND.elem_id<=numels8+numels10) THEN
145 DO k=1,6
146 node_id = ixs10(k,elem_id-numels8)
147 tag_node(node_id) = 1
148 ENDDO
149 ENDIF
150 ELSEIF(elem_id>offset_shell.AND.elem_id<=offset_truss) THEN
151 ! -----------------
152 ! shell element
153 DO k=2,5
154 node_id = ixc(k,elem_id-offset_shell)
155 tag_node(node_id) = 1
156 ENDDO
157 ELSEIF(elem_id>offset_truss.AND.elem_id<=offset_beam) THEN
158 ! -----------------
159 ! truss element
160 DO k=2,3
161 node_id = ixt(k,elem_id-offset_truss)
162 tag_node(node_id) = 1
163 ENDDO
164 ELSEIF(elem_id>offset_beam.AND.elem_id<=offset_spring) THEN
165 ! -----------------
166 ! beam element
167 DO k=2,3
168 node_id = ixp(k,elem_id-offset_beam)
169 tag_node(node_id) = 1
170 ENDDO
171 ELSEIF(elem_id>offset_spring.AND.elem_id<=offset_triangle) THEN
172 ! -----------------
173 ! spring element
174 DO k=2,3
175 node_id = ixr(k,elem_id-offset_spring)
176 tag_node(node_id) = 1
177 ENDDO
178
179 IF(nint(geo(12,ixr(1,elem_id-offset_spring))) == 12) THEN
180 node_id = ixr(4,elem_id-offset_spring)
181 tag_node(node_id) = 1
182 ENDIF
183 ELSEIF(elem_id>offset_triangle.AND.elem_id<=offset_ur) THEN
184 ! -----------------
185 ! triangle element
186 DO k=2,4
187 node_id = ixtg(k,elem_id-offset_triangle)
188 tag_node(node_id) = 1
189 ENDDO
190 ENDIF
191 ! -----------------
192 ! -----------------
193 ! check if the element has N1 & N2 & N3 & N4 (if N3 and N4 are real nodes)
194 IF( (tag_node(n1)+tag_node(n2)+tag_node(n3)+tag_node(n4)) == number_node) THEN
195 IF( .NOT.already_here(elem_id) ) THEN ! check if the element is already taken into account
196 buffer(j+2) = buffer(j+2) + 1
197 already_here(elem_id) = .true. ! <-- the element is now taken into account
198 number_element_here = number_element_here + 1
199 list_element(number_element_here) = elem_id
200 ENDIF
201 ENDIF
202
203 ! -----------------
204 ENDDO
205 ! ---------------
206
207 ! ---------------
208 ! re-initialization of already_here array for the next node
209 DO i=1,number_element_here
210 elem_id = list_element(i)
211 already_here(elem_id) = .false.
212 ENDDO
213 ! ---------------
214 ENDDO
215
216 DEALLOCATE( tag_node )
217 DEALLOCATE( list_element )
218 DEALLOCATE( already_here )
219
220 RETURN
#define my_real
Definition cppsort.cpp:32