OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_active_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 check_active_elem_edge (number_node, n1, n2, n3, n4, deactivation, geo, ixs, ixc, ixt, ixp, ixr, ixtg, ixs10, addcnel, cnel, tag_node, tag_elem)

Function/Subroutine Documentation

◆ check_active_elem_edge()

subroutine check_active_elem_edge ( integer, intent(in) number_node,
integer, intent(in) n1,
integer, intent(in) n2,
integer, intent(in) n3,
integer, intent(in) n4,
logical, intent(inout) deactivation,
intent(in) geo,
integer, dimension(nixs,numels), intent(in) ixs,
integer, dimension(nixc,numelc), intent(in) ixc,
integer, dimension(nixt,numelt), intent(in) ixt,
integer, dimension(nixp,numelp), intent(in) ixp,
integer, dimension(nixr,numelr), intent(in) ixr,
integer, dimension(nixtg,numeltg), intent(in) ixtg,
integer, dimension(6,numels10), intent(in) ixs10,
integer, dimension(0:numnod+1), intent(in) addcnel,
integer, dimension(0:lcnel), intent(in) cnel,
integer, dimension(numnod), intent(inout) tag_node,
integer, dimension(numels+numelq+numelc+numelt+numelp+numelr+numeltg), intent(inout) tag_elem )
Parameters
[in]ixs10tetra10 data

Definition at line 29 of file check_active_elem_edge.F.

33!$COMMENT
34! CHECK_ACTIVE_ELEM_EDGE description
35! check if a element associated to an edge is active
36! CHECK_ACTIVE_ELEM_EDGE organization
37! loop over the element associated to the N1 node
38! if 1 active element contains N1 & N2, the edge must be kept (for interface 11)
39! if 1 active element contains N1 & N2 & N3 & N4, the surface must be kept (for interface 7)
40!$ENDCOMMENT
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com04_c.inc"
49#include "param_c.inc"
50#include "scr17_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 LOGICAL, INTENT(inout) :: DEACTIVATION
55 INTEGER, INTENT(in) :: NUMBER_NODE ! number of node of the edge/surface
56 INTEGER, INTENT(in) :: N1,N2,N3,N4 ! node id : for interface type11 -> N3&N4 are fake node id (ie. =0)
57 INTEGER, DIMENSION(NIXS,NUMELS), INTENT(in) :: IXS ! solid array
58 INTEGER, DIMENSION(NIXC,NUMELC), INTENT(in) :: IXC ! shell array
59 INTEGER, DIMENSION(NIXT,NUMELT), INTENT(in) :: IXT! truss array
60 INTEGER, DIMENSION(NIXP,NUMELP), INTENT(in) :: IXP! beam array
61 INTEGER, DIMENSION(NIXR,NUMELR), INTENT(in) :: IXR! spring array
62 INTEGER, DIMENSION(NIXTG,NUMELTG), INTENT(in) :: IXTG! triangle array
63 INTEGER, DIMENSION(6,NUMELS10), INTENT(in) :: IXS10!< tetra10 data
64 INTEGER, DIMENSION(0:NUMNOD+1), INTENT(in) :: ADDCNEL ! address for the CNEL array
65 my_real, DIMENSION(NPROPG,NUMGEO), INTENT(in) :: geo
66 INTEGER, DIMENSION(0:LCNEL), INTENT(in) :: CNEL ! connectivity node-->element
67 INTEGER, DIMENSION(NUMNOD), INTENT(inout) :: TAG_NODE
68 INTEGER, DIMENSION(NUMELS+NUMELQ+NUMELC+NUMELT+NUMELP+NUMELR+NUMELTG), INTENT(inout) :: TAG_ELEM
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 LOGICAL :: STILL_COMPUTE,STILL_ALIVE
73 INTEGER :: I,K
74 INTEGER :: NEXT
75 INTEGER :: ELEM_ID,NODE_ID,OTHER_NODE
76 INTEGER :: OFFSET_SOLID,OFFSET_QUAD,OFFSET_SHELL
77 INTEGER :: OFFSET_TRUSS,OFFSET_BEAM,OFFSET_SPRING
78 INTEGER :: OFFSET_TRIANGLE,OFFSET_UR
79C-----------------------------------------------
80 ! --------------------------
81 offset_solid = 0
82 offset_quad=offset_solid+numels
83 offset_shell=offset_quad+numelq
84 offset_truss=offset_shell+numelc
85 offset_beam=offset_truss+numelt
86 offset_spring=offset_beam+numelp
87 offset_triangle=offset_spring+numelr
88 offset_ur=offset_triangle+numeltg
89 ! --------------------------
90
91 still_compute = .true.
92 next = 0
93 i = addcnel(n1) + next
94 deactivation = .false.
95 still_alive = .false.
96
97 ! ------------------
98 ! check if 1 or more elements is/are associated to
99 ! N1 node
100 ! if no element, the edge can be deactivated (only if
101 ! the remote elements associated to N1/N2 are all deleted)
102 IF((addcnel(n1+1) - addcnel(n1)) ==0) THEN
103 deactivation = .true.
104 still_compute = .false.
105 ENDIF
106 ! ------------------
107
108 DO WHILE( still_compute )
109
110 elem_id = cnel(i)
111 tag_node(n1) = 0
112 tag_node(n2) = 0
113 IF(number_node>2) THEN
114 tag_node(n3) = 0
115 tag_node(n4) = 0
116 ENDIF
117 ! -------------------------
118 ! loop over the active element
119 ! for interface 11 : if still 1 or more active elements with N1 & N2 : need to keep the edge
120 ! else : need to deactivate the edge
121 ! for interface 7 : if still 1 or more active elements with N1 & N2 & N3 & N4 : need to keep the surface
122 ! else : need to deactivate the surface
123 IF(tag_elem(elem_id)>0) THEN
124 ! -----------------
125 ! solid element
126 IF(elem_id<=offset_shell) THEN
127 DO k=2,9
128 node_id = ixs(k,elem_id)
129 tag_node(node_id) = 1
130 ENDDO
131 IF(elem_id>numels8.AND.elem_id<=numels8+numels10) THEN
132 DO k=1,6
133 node_id = ixs10(k,elem_id-numels8)
134 tag_node(node_id) = 1
135 ENDDO
136 ENDIF
137 ELSEIF(elem_id>offset_shell.AND.elem_id<=offset_truss) THEN
138 ! -----------------
139 ! shell element
140 DO k=2,5
141 node_id = ixc(k,elem_id-offset_shell)
142 tag_node(node_id) = 1
143 ENDDO
144 ELSEIF(elem_id>offset_truss.AND.elem_id<=offset_beam) THEN
145 ! -----------------
146 ! truss element
147 DO k=2,3
148 node_id = ixt(k,elem_id-offset_truss)
149 tag_node(node_id) = 1
150 ENDDO
151 ELSEIF(elem_id>offset_beam.AND.elem_id<=offset_spring) THEN
152 ! -----------------
153 ! beam element
154 DO k=2,3
155 node_id = ixp(k,elem_id-offset_beam)
156 tag_node(node_id) = 1
157 ENDDO
158 ELSEIF(elem_id>offset_spring.AND.elem_id<=offset_triangle) THEN
159 ! -----------------
160 ! spring element
161 DO k=2,3
162 node_id = ixr(k,elem_id-offset_spring)
163 tag_node(node_id) = 1
164 ENDDO
165
166 IF(nint(geo(12,ixr(1,elem_id-offset_spring))) == 12) THEN
167 node_id = ixr(4,elem_id-offset_spring)
168 tag_node(node_id) = 1
169 ENDIF
170 ELSEIF(elem_id>offset_triangle.AND.elem_id<=offset_ur) THEN
171 ! -----------------
172 ! triangle element
173 DO k=2,4
174 node_id = ixtg(k,elem_id-offset_triangle)
175 tag_node(node_id) = 1
176 ENDDO
177 ENDIF
178 ! -----------------
179
180 ! -----------------
181 ! for interface 7 : need to check if the element has N3 & N4
182 other_node = 0
183 IF(number_node>2) other_node = tag_node(n3)
184 IF(number_node>3) other_node = other_node + tag_node(n4)
185
186 ! -----------------
187
188 ! -----------------
189 ! check if the element has N1 & N2
190 IF(tag_node(n1)+tag_node(n2)+other_node==number_node) THEN
191 still_compute = .false.
192 still_alive = .true.
193 ENDIF
194 ! -----------------
195
196 ENDIF
197 next = next + 1
198 i = addcnel(n1) + next
199 IF(i>addcnel(n1+1)-1) THEN
200 still_compute = .false.
201 ENDIF
202 ! -------------------------
203 ENDDO
204
205 IF(.NOT.still_alive) THEN
206 deactivation = .true.
207 ENDIF
208
209 RETURN
#define my_real
Definition cppsort.cpp:32