OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
check_edge_state.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| check_edge_state ../engine/source/interfaces/interf/check_edge_state.F
25!||--- called by ------------------------------------------------------
26!|| find_edge_from_remote_proc ../engine/source/interfaces/interf/find_edge_from_remote_proc.F
27!|| resol ../engine/source/engine/resol.F
28!||--- calls -----------------------------------------------------
29!|| check_active_elem_edge ../engine/source/interfaces/interf/check_active_elem_edge.F
30!||--- uses -----------------------------------------------------
31!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
32!|| shooting_node_mod ../engine/share/modules/shooting_node_mod.F
33!||====================================================================
34 SUBROUTINE check_edge_state( ITASK,M_EDGE_NB,S_EDGE_NB,M_EDGE_ID,S_EDGE_ID,
35 . SHIFT_INTERFACE,INTBUF_TAB,NEWFRONT,IPARI,GEO,
36 . IXS,IXC,IXT,IXP,IXR,IXTG,IXS10,
37 . ADDCNEL,CNEL,TAG_NODE,TAG_ELEM,SHOOT_STRUCT )
38!$COMMENT
39! CHECK_EDGE_STATE description
40! check the state of an edge (active or not)
41! CHECK_EDGE_STATE organization
42! loop over a list of edge :
43! -check if 1 or more element associated to the edge is/are active
44! - if there is no active element, the edge is deactivate
45!$ENDCOMMENT
46 USE intbufdef_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "task_c.inc"
56#include "com04_c.inc"
57#include "scr17_c.inc"
58#include "param_c.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER, INTENT(in) :: ITASK ! omp thread ID
63 INTEGER, INTENT(in) :: M_EDGE_NB,S_EDGE_NB ! number of local edge surface
64 INTEGER, DIMENSION(M_EDGE_NB), INTENT(in) :: M_EDGE_ID ! id of main edge that needs to be deactivated
65 INTEGER, DIMENSION(S_EDGE_NB), INTENT(in) :: S_EDGE_ID ! id of second edge that needs to be deactivated
66 INTEGER, DIMENSION(NINTER), INTENT(inout) :: NEWFRONT !< flag to force some exchanges related to S nodes between processor (if an S node becomes a shooting node - all interface) / force the collision detection algo if a new segment is activated for the (interface 25 + solid erosion)
67 INTEGER, DIMENSION(NINTER+1,2), INTENT(in) :: SHIFT_INTERFACE ! interface shift
68 TYPE(intbuf_struct_), DIMENSION(NINTER), INTENT(inout) :: INTBUF_TAB ! interface data
69 INTEGER, DIMENSION(NPARI,NINTER), INTENT(in) :: IPARI
70
71 INTEGER, DIMENSION(NIXS,NUMELS), INTENT(in) :: IXS ! solid array
72 INTEGER, DIMENSION(NIXC,NUMELC), INTENT(in) :: IXC ! shell array
73 INTEGER, DIMENSION(NIXT,NUMELT), INTENT(in) :: IXT! truss array
74 INTEGER, DIMENSION(NIXP,NUMELP), INTENT(in) :: IXP! beam array
75 INTEGER, DIMENSION(NIXR,NUMELR), INTENT(in) :: IXR! spring array
76 INTEGER, DIMENSION(NIXTG,NUMELTG), INTENT(in) :: IXTG! triangle array
77 INTEGER, DIMENSION(6,NUMELS10), INTENT(in) :: IXS10!< tetra10 data
78 INTEGER, DIMENSION(0:NUMNOD+1), INTENT(in) :: ADDCNEL ! address for the CNEL array
79 my_real, DIMENSION(NPROPG,NUMGEO), INTENT(in) :: geo
80 INTEGER, DIMENSION(0:LCNEL), INTENT(in) :: CNEL ! connectivity node-->element
81 INTEGER, DIMENSION(NUMNOD), INTENT(inout) :: TAG_NODE
82 INTEGER, DIMENSION(NUMELS+NUMELQ+NUMELC+NUMELT+NUMELP+NUMELR+NUMELTG), INTENT(inout) :: TAG_ELEM
83 TYPE(shooting_node_type), INTENT(inout) :: SHOOT_STRUCT ! structure for shooting node algo
84C-----------------------------------------------
85C L o c a l V a r i a b l e s
86C-----------------------------------------------
87 LOGICAL :: DEACTIVATION
88 INTEGER :: I,K,FIRST,LAST
89 INTEGER :: NIN,ID_INTER,NUMBER_INTER
90 INTEGER :: ITY,IDEL
91 INTEGER :: N1,N2,N3,N4
92 INTEGER :: NUMBER_NODE
93 INTEGER :: DICHOTOMIC_SEARCH_I_ASC ! function
94C-----------------------------------------------
95 IF(itask==-1) THEN
96 first = 1
97 last = m_edge_nb
98 ELSE
99 first = 1 + itask * (m_edge_nb / nthread)
100 last = (itask + 1) * (m_edge_nb / nthread)
101 IF((itask+1)==nthread) last = m_edge_nb
102 ENDIF
103 number_inter = shift_interface(ninter+1,2)
104 ! --------------------------
105 ! loop over the deactivated edge: main node
106 DO i=first,last
107 k = m_edge_id(i) ! get the global edge id
108 id_inter = dichotomic_search_i_asc(k, shift_interface(1,1), number_inter+1) ! find the interface of the surface
109 nin = shift_interface(id_inter,2)
110 k = k - shift_interface(id_inter,1) + 1 ! get the surface id in the NIN interface
111
112 ity = ipari(7,nin)
113 idel = ipari(17,nin)
114
115 IF(itask==-1) THEN
116 IF(ity==11.AND.idel==1) THEN
117 shoot_struct%INTER(nin)%REMOTE_ELM_M(k) = shoot_struct%INTER(nin)%REMOTE_ELM_M(k) - 1
118 ENDIF
119 ENDIF
120
121 ! check if the edge is active, if yes --> deactivate it
122 IF(intbuf_tab(nin)%STFM(k)/=zero) THEN
123
124 IF(ity==11.AND.idel==1) THEN
125 n1 = intbuf_tab(nin)%IRECTM((k-1)*2+1)
126 n2 = intbuf_tab(nin)%IRECTM((k-1)*2+2)
127 n3 = 0
128 n4 = 0
129 number_node = 2
130 IF(shoot_struct%INTER(nin)%REMOTE_ELM_M(k)<1) THEN
131 CALL check_active_elem_edge( number_node, n1,n2,n3,n4,
132 . deactivation,geo,ixs,ixc,
133 . ixt,ixp,ixr,ixtg,ixs10,addcnel,cnel,
134 . tag_node,tag_elem )
135 ELSE
136 deactivation = .false.
137 ENDIF
138 ELSE
139 deactivation=.true.
140 ENDIF
141 IF(deactivation) intbuf_tab(nin)%STFM(k) = zero
142 ENDIF
143 ENDDO
144 ! --------------------------
145
146 IF(itask==-1) THEN
147 first = 1
148 last = s_edge_nb
149 ELSE
150 first = 1 + itask * (s_edge_nb / nthread)
151 last = (itask + 1) * (s_edge_nb / nthread)
152 IF((itask+1)==nthread) last = s_edge_nb
153 ENDIF
154 ! --------------------------
155 ! loop over the deactivated edge : secondary node
156 DO i=first,last
157 k = s_edge_id(i) ! get the global edge id
158 id_inter = dichotomic_search_i_asc(k, shift_interface(1,1), number_inter+1) ! find the interface of the surface
159 nin = shift_interface(id_inter,2)
160 k = k - shift_interface(id_inter,1) + 1 ! get the surface id in the NIN interface
161
162 ity = ipari(7,nin)
163 idel = ipari(17,nin)
164
165 IF(itask==-1) THEN
166 IF(ity==11.AND.idel==1) THEN
167 shoot_struct%INTER(nin)%REMOTE_ELM_S(k) = shoot_struct%INTER(nin)%REMOTE_ELM_S(k) - 1
168 ENDIF
169 ENDIF
170
171 ! check if the edge is active, if yes --> deactivate it
172 IF(intbuf_tab(nin)%STFS(k)/=zero) THEN
173 IF(ity==11.AND.idel==1) THEN
174 n1 = intbuf_tab(nin)%IRECTS((k-1)*2+1)
175 n2 = intbuf_tab(nin)%IRECTS((k-1)*2+2)
176 n3 = 0
177 n4 = 0
178 number_node = 2
179 IF(shoot_struct%INTER(nin)%REMOTE_ELM_S(k)<1) THEN
180 CALL check_active_elem_edge( number_node, n1,n2,n3,n4,
181 . deactivation,geo,ixs,ixc,
182 . ixt,ixp,ixr,ixtg,ixs10,addcnel,cnel,
183 . tag_node,tag_elem )
184 ELSE
185 deactivation = .false.
186 ENDIF
187 ELSE
188 deactivation=.true.
189 ENDIF
190
191 IF(deactivation) THEN
192 intbuf_tab(nin)%STFS(k) = -abs(intbuf_tab(nin)%STFS(k))
193 newfront(nin) = -1
194 ENDIF
195 ENDIF
196 ENDDO
197 ! --------------------------
198
199 RETURN
200 END SUBROUTINE check_edge_state
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)
subroutine check_edge_state(itask, m_edge_nb, s_edge_nb, m_edge_id, s_edge_id, shift_interface, intbuf_tab, newfront, ipari, geo, ixs, ixc, ixt, ixp, ixr, ixtg, ixs10, addcnel, cnel, tag_node, tag_elem, shoot_struct)
#define my_real
Definition cppsort.cpp:32