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!|| submodel_mod ../starter/share/modules1/submodel_mod.F
33!||====================================================================
34 SUBROUTINE new_seatbelt(IXR,ITAB,KNOD2EL1D,NOD2EL1D,NOD_START,
35 . ELEM_CUR,TAG_RES,TAG_NOD,ID,FLAG,
36 . NNOD,IPM,NB_ELEM_1D,NB_BRANCH,BRANCH_TAB,
37 . BRANCH_CPT)
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE message_mod
42 USE seatbelt_mod
43 USE submodel_mod , ONLY : nsubmod
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "param_c.inc"
52#include "com04_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER IXR(NIXR,*),ITAB(*),KNOD2EL1D(*),NOD2EL1D(*),NOD_START,TAG_RES(*),TAG_NOD(*),
57 . ELEM_CUR,ID,FLAG,NNOD,IPM(NPROPMI,*)
58 INTEGER, INTENT(IN) :: NB_ELEM_1D
59 INTEGER, INTENT(INOUT) :: NB_BRANCH,BRANCH_TAB(2*NB_ELEM_1D),BRANCH_CPT
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 INTEGER K,NODE_CUR,NRES_FOUND,ELEM_NEWT,NODE_NEXT,ELEM_NEXT,ID_PREV,MTYP,MID,ELEM_TEST
64C-----------------------------------------------
65C S o u r c e L i n e s
66C-----------------------------------------------
67C
68C-- Loop to find elements of the seatbelt
69C
70 node_cur = nod_start
71 elem_next = 0
72 IF (flag == 0) tag_res(elem_cur) = id
73 tag_nod(ixr(2,elem_cur)) = id
74 tag_nod(ixr(3,elem_cur)) = id
75 nnod = nnod + 1
76 nres_found = 1
77C
78 DO WHILE (nres_found > 0)
79 nres_found = 0
80C
81 IF (ixr(2,elem_cur) == node_cur) THEN
82 node_next = ixr(3,elem_cur)
83 ELSE
84 node_next = ixr(2,elem_cur)
85 ENDIF
86C
87 DO k=knod2el1d(node_next)+1,knod2el1d(node_next+1)
88 IF ((nod2el1d(k) > numelt+numelp).AND.(nod2el1d(k) /= elem_cur+numelt+numelp)) THEN
89 elem_test = nod2el1d(k)-numelt-numelp
90 mid = ixr(5,elem_test)
91 IF (mid > 0) THEN
92 mtyp = ipm(2,mid)
93 IF ((mtyp == 114).AND.(tag_res(elem_test) == 0)) THEN
94 nres_found = nres_found + 1
95 IF(nres_found > 1) THEN
96 IF (flag > 0) THEN
97C-- loop inisde retractor : bifurcation is not allowded inside retractor or at entry
98 CALL ancmsg(msgid=2005,
99 . msgtype=msgerror,
100 . anmode=aninfo,
101 . i1=itab(node_next))
102 nres_found = 0
103 ELSE
104C-- start of the secondary branch is saved
105 nb_branch = nb_branch + 1
106 branch_cpt = branch_cpt + 1
107 CALL ancmsg(msgid=2098,
108 . msgtype=msgwarning,
109 . anmode=aninfo,
110 . i1=itab(node_next))
111 branch_tab(2*(branch_cpt-1)+1) = node_next
112 branch_tab(2*(branch_cpt-1)+2) = elem_test
113 ENDIF
114 ELSE
115 elem_next = elem_test
116 ENDIF
117 ENDIF
118 ENDIF
119 ENDIF
120 ENDDO
121C Exit loop if node is a connection between 1D and 2D seatblet
122 IF (nres_found > 0) THEN
123 DO k=1,n_comn_1d2d
124 IF (node_next == comn_1d2d(k)) nres_found=0
125 ENDDO
126 ENDIF
127C
128 IF (nres_found > 0) THEN
129 IF (flag == 0) THEN
130 tag_res(elem_next) = id
131 tag_nod(ixr(2,elem_next)) = id
132 tag_nod(ixr(3,elem_next)) = id
133 nnod = nnod + 1
134 ELSE
135 IF (tag_res(elem_next) > 0) THEN
136 id_prev = retractor(tag_res(elem_next))%ID
137 IF ((id_prev > 0).AND.(nres_found > 0)) CALL ancmsg(msgid=2010,
138 . msgtype=msgerror,
139 . anmode=aninfo,
140 . i1=id_prev,i2=ixr(nixr,elem_next),i3=retractor(id)%ID)
141 ENDIF
142 tag_res(elem_next) = id
143 tag_nod(ixr(2,elem_next)) = id
144 tag_nod(ixr(3,elem_next)) = id
145 ENDIF
146 ENDIF
147C
148 elem_cur = elem_next
149 node_cur = node_next
150 ENDDO
151C
152 END SUBROUTINE new_seatbelt
153
integer n_comn_1d2d
type(retractor_struct), dimension(:), allocatable retractor
integer, dimension(:), allocatable comn_1d2d
integer nsubmod
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:889