OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
update_weight_inter_type7.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!|| update_weight_inter_type7 ../starter/source/spmd/domain_decomposition/update_weight_inter_type7.F
25!||--- called by ------------------------------------------------------
26!|| i20ini3 ../starter/source/interfaces/inter3d1/i20ini3.F
27!|| inint3 ../starter/source/interfaces/inter3d1/inint3.F
28!||--- uses -----------------------------------------------------
29!|| inter_cand_mod ../starter/share/modules1/inter_cand_mod.F
30!||====================================================================
31 SUBROUTINE update_weight_inter_type7(NELEMINT,INTERFACE_ID,NSN,NRTM,IFIEND,
32 . IRECT,NSV,I_STOK,CAND_E,CAND_N,
33 . IGAP,GAP,GAPMAX,GAPMIN,DGAPLOAD,
34 . DRAD,GAP_S,GAP_S_L,GAP_M,GAP_M_L,
35 . NUMNOD,X,INTER_CAND)
36!$COMMENT
37! UPDATE_WEIGHT_INTER_TYPE7 description :
38! save the contact data for interface type 7
39!
40! UPDATE_WEIGHT_INTER_TYPE7 organization :
41! for each contact, save :
42! * 4 main node IDs
43! * 1 secondary node ID
44! * 1 segment ID
45! * type of interface
46!$ENDCOMMENT
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(inout) :: NELEMINT
56 INTEGER, INTENT(in) :: INTERFACE_ID !< interface id
57 INTEGER, INTENT(in) :: NSN !< number of S node
58 INTEGER, INTENT(in) :: NRTM !< number of segment
59 INTEGER, INTENT(inout) :: IFIEND !< ???
60 INTEGER, DIMENSION(4,NRTM) :: IRECT !< list of M nodes for the NRTM segments
61 INTEGER, DIMENSION(NSN) :: NSV !< list of S nodes
62 INTEGER, INTENT(in) :: I_STOK !< total number of pair of candidate
63 INTEGER, INTENT(in) :: NUMNOD !< number of node
64 INTEGER, DIMENSION(I_STOK), INTENT(in) :: CAND_E !< segment id of the candidate I
65 INTEGER, DIMENSION(I_STOK), INTENT(in) :: CAND_N !< pointer to the S node id of the candidate I
66 INTEGER, INTENT(in) :: IGAP !< gap option for the current interface
67 my_real, INTENT(in) :: gap,gapmax,gapmin !< gap value
68 my_real, INTENT(IN) :: dgapload ,drad !< other kind of gap
69 my_real, DIMENSION(NSN) :: gap_s,gap_s_l !< gap of S node
70 my_real, DIMENSION(NRTM) :: gap_m,gap_m_l!< gap of segment
71 my_real, DIMENSION(3,NUMNOD), INTENT(in) :: x
72 TYPE(inter_cand_), INTENT(inout) :: INTER_CAND
73C-----------------------------------------------
74C L o c a l V a r i a b l e s
75C-----------------------------------------------
76 INTEGER :: S_NODE_ID
77 INTEGER :: SEGMENT_ID
78
79 INTEGER :: N,I
80 INTEGER :: IX1,IX2,IX3,IX4
82 . xmin,xmax,ymin,ymax,zmin,zmax,threshold,
83 . xi,x1,x2,x3,x4,yi,y1,y2,y3,y4,zi,z1,z2,z3,z4
84C-----------------------------------------------
85 ifiend = ifiend + i_stok
86 inter_cand%IXINT(1:inter_cand%S_IXINT_1,nelemint+1:nelemint+i_stok) = 0
87 inter_cand%ADDRESS(interface_id) = nelemint ! save the adress of the first pair
88 threshold = max(gap+dgapload,drad)
89 ! ---------------------------
90 ! loop over the S candidates
91 DO i = 1, i_stok
92 s_node_id = nsv(cand_n(i)) ! S node id
93 segment_id = cand_e(i) ! segment id
94 ! find the 4 M node id
95 ix1=irect(1,segment_id)
96 ix2=irect(2,segment_id)
97 ix3=irect(3,segment_id)
98 ix4=irect(4,segment_id)
99
100 inter_cand%IXINT(1,nelemint+i) = ix1
101 inter_cand%IXINT(2,nelemint+i) = ix2
102 inter_cand%IXINT(3,nelemint+i) = ix3
103 inter_cand%IXINT(4,nelemint+i) = ix4
104 inter_cand%IXINT(5,nelemint+i) = s_node_id
105 inter_cand%IXINT(6,nelemint+i) = 7
106 inter_cand%IXINT(7,nelemint+i) = segment_id
107 inter_cand%IXINT(8,nelemint+i) = interface_id
108
109 zi = x(3,s_node_id)
110 z1=x(3,ix1)
111 z2=x(3,ix2)
112 z3=x(3,ix3)
113 z4=x(3,ix4)
114 IF(igap==0)THEN
115 threshold = gap
116 ELSE
117 threshold=gap_s(cand_n(i))+gap_m(cand_e(i))
118 IF(igap==3)
119 . threshold=min(threshold,
120 . gap_s_l(cand_n(i))+gap_m_l(cand_e(i)))
121 threshold=min(threshold,gapmax)
122 threshold=max(threshold,gapmin)
123 ENDIF
124 threshold = max(threshold+dgapload,drad)
125
126 ! -------------
127 ! check if the S node will be retain for the interface force computation for the
128 ! first cycle of the engine
129 zmin = min(z1,z2,z3,z4)-threshold
130 zmax = max(z1,z2,z3,z4)+threshold
131 IF (zmin<=zi.AND.zmax>=zi) THEN
132 yi = x(2,s_node_id)
133 y1 = x(2,ix1)
134 y2 = x(2,ix2)
135 y3 = x(2,ix3)
136 y4 = x(2,ix4)
137 ymin = min(y1,y2,y3,y4)-threshold
138 ymax = max(y1,y2,y3,y4)+threshold
139 IF (ymin<=yi.AND.ymax>=yi) THEN
140 xi = x(1,s_node_id)
141 x1 = x(1,ix1)
142 x2 = x(1,ix2)
143 x3 = x(1,ix3)
144 x4 = x(1,ix4)
145 xmin = min(x1,x2,x3,x4)-threshold
146 xmax = max(x1,x2,x3,x4)+threshold
147 IF (xmin<=xi.AND.xmax>=xi) THEN
148 inter_cand%IXINT(6,nelemint+i)=-7
149 ENDIF
150 ENDIF
151 ENDIF
152 ! -------------
153 ENDDO
154 ! ---------------------------
155 nelemint=nelemint+i_stok
156 inter_cand%ADDRESS(interface_id+1) = nelemint ! save the adress of the last pair
157 ! ---------------------------
158
159 RETURN
160 END SUBROUTINE update_weight_inter_type7
#define my_real
Definition cppsort.cpp:32
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition law100_upd.F:272
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine update_weight_inter_type7(nelemint, interface_id, nsn, nrtm, ifiend, irect, nsv, i_stok, cand_e, cand_n, igap, gap, gapmax, gapmin, dgapload, drad, gap_s, gap_s_l, gap_m, gap_m_l, numnod, x, inter_cand)