OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
new_seatbelt.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!|| new_seatbelt ../starter/source/tools/seatbelts/new_seatbelt.F
25!||--- called by ------------------------------------------------------
26!|| create_seatbelt ../starter/source/tools/seatbelts/create_seatbelt.F
27!|| ini_seatbelt ../starter/source/tools/seatbelts/ini_seatbelt.F
28!||--- calls -----------------------------------------------------
29!|| ancmsg ../starter/source/output/message/message.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE new_seatbelt(IXR,ITAB,KNOD2EL1D,NOD2EL1D,NOD_START,
34 . ELEM_CUR,TAG_RES,TAG_NOD,ID,FLAG,
35 . NNOD,IPM,NB_ELEM_1D,NB_BRANCH,BRANCH_TAB,
36 . BRANCH_CPT)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE message_mod
41 USE seatbelt_mod
42 use element_mod , only : nixr
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "param_c.inc"
51#include "com04_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER IXR(NIXR,*),ITAB(*),KNOD2EL1D(*),NOD2EL1D(*),NOD_START,TAG_RES(*),TAG_NOD(*),
56 . ELEM_CUR,ID,FLAG,NNOD,IPM(NPROPMI,*)
57 INTEGER, INTENT(IN) :: NB_ELEM_1D
58 INTEGER, INTENT(INOUT) :: NB_BRANCH,BRANCH_TAB(2*NB_ELEM_1D),BRANCH_CPT
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER K,NODE_CUR,NRES_FOUND,NODE_NEXT,ELEM_NEXT,ID_PREV,MTYP,MID,ELEM_TEST
63C-----------------------------------------------
64C S o u r c e L i n e s
65C-----------------------------------------------
66C
67C-- Loop to find elements of the seatbelt
68C
69 node_cur = nod_start
70 elem_next = 0
71 IF (flag == 0) tag_res(elem_cur) = id
72 tag_nod(ixr(2,elem_cur)) = id
73 tag_nod(ixr(3,elem_cur)) = id
74 nnod = nnod + 1
75 nres_found = 1
76C
77 DO WHILE (nres_found > 0)
78 nres_found = 0
79C
80 IF (ixr(2,elem_cur) == node_cur) THEN
81 node_next = ixr(3,elem_cur)
82 ELSE
83 node_next = ixr(2,elem_cur)
84 ENDIF
85C
86 DO k=knod2el1d(node_next)+1,knod2el1d(node_next+1)
87 IF ((nod2el1d(k) > numelt+numelp).AND.(nod2el1d(k) /= elem_cur+numelt+numelp)) THEN
88 elem_test = nod2el1d(k)-numelt-numelp
89 mid = ixr(5,elem_test)
90 IF (mid > 0) THEN
91 mtyp = ipm(2,mid)
92 IF ((mtyp == 114).AND.(tag_res(elem_test) == 0)) THEN
93 nres_found = nres_found + 1
94 IF(nres_found > 1) THEN
95 IF (flag > 0) THEN
96C-- loop inisde retractor : bifurcation is not allowded inside retractor or at entry
97 CALL ancmsg(msgid=2005,
98 . msgtype=msgerror,
99 . anmode=aninfo,
100 . i1=itab(node_next))
101 nres_found = 0
102 ELSE
103C-- start of the secondary branch is saved
104 nb_branch = nb_branch + 1
105 branch_cpt = branch_cpt + 1
106 CALL ancmsg(msgid=2098,
107 . msgtype=msgwarning,
108 . anmode=aninfo,
109 . i1=itab(node_next))
110 branch_tab(2*(branch_cpt-1)+1) = node_next
111 branch_tab(2*(branch_cpt-1)+2) = elem_test
112 ENDIF
113 ELSE
114 elem_next = elem_test
115 ENDIF
116 ENDIF
117 ENDIF
118 ENDIF
119 ENDDO
120C Exit loop if node is a connection between 1D and 2D seatblet
121 IF (nres_found > 0) THEN
122 DO k=1,n_comn_1d2d
123 IF (node_next == comn_1d2d(k)) nres_found=0
124 ENDDO
125 ENDIF
126C
127 IF (nres_found > 0) THEN
128 IF (flag == 0) THEN
129 tag_res(elem_next) = id
130 tag_nod(ixr(2,elem_next)) = id
131 tag_nod(ixr(3,elem_next)) = id
132 nnod = nnod + 1
133 ELSE
134 IF (tag_res(elem_next) > 0) THEN
135 id_prev = retractor(tag_res(elem_next))%ID
136 IF ((id_prev > 0).AND.(nres_found > 0)) CALL ancmsg(msgid=2010,
137 . msgtype=msgerror,
138 . anmode=aninfo,
139 . i1=id_prev,i2=ixr(nixr,elem_next),i3=retractor(id)%ID)
140 ENDIF
141 tag_res(elem_next) = id
142 tag_nod(ixr(2,elem_next)) = id
143 tag_nod(ixr(3,elem_next)) = id
144 ENDIF
145 ENDIF
146C
147 elem_cur = elem_next
148 node_cur = node_next
149 ENDDO
150C
151 END SUBROUTINE new_seatbelt
152
integer n_comn_1d2d
type(retractor_struct), dimension(:), allocatable retractor
integer, dimension(:), allocatable comn_1d2d
subroutine new_seatbelt(ixr, itab, knod2el1d, nod2el1d, nod_start, elem_cur, tag_res, tag_nod, id, flag, nnod, ipm, nb_elem_1d, nb_branch, branch_tab, branch_cpt)
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:895