OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
upd_failwave_sh3n.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!|| set_failwave_sh3n ../engine/source/materials/fail/failwave/upd_failwave_sh3n.F
25!||--- called by ------------------------------------------------------
26!|| c3forc3 ../engine/source/elements/sh3n/coque3n/c3forc3.F
27!|| cdkforc3 ../engine/source/elements/sh3n/coquedk/cdkforc3.F
28!||--- uses -----------------------------------------------------
29!|| failwave_mod ../common_source/modules/failwave_mod.F
30!||====================================================================
31 SUBROUTINE set_failwave_sh3n(FAILWAVE ,FWAVE_EL ,DADV ,
32 . NEL ,IXTG ,ITAB ,NGL ,OFFLY )
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE failwave_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com04_c.inc"
45#include "comlock.inc"
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 INTEGER NEL,IXTG(NIXTG,*)
50 INTEGER, DIMENSION(NEL) , INTENT(IN) :: NGL,OFFLY
51 INTEGER, DIMENSION(NUMNOD), INTENT(IN ) :: ITAB
52 my_real ,DIMENSION(NEL) , INTENT(IN) :: dadv
53 INTEGER, DIMENSION(NEL) , INTENT(OUT) :: FWAVE_EL
54 TYPE (FAILWAVE_STR_) :: FAILWAVE
55CC-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER I,II,K,N1,N2,N3,FOUND,LEVEL,IDN,NINDX,NFAIL,FNOD1,FNOD2,
59 . knext,kprev,ncurr
60 INTEGER ,DIMENSION(NEL) :: INDX
61 INTEGER ,DIMENSION(3) :: NDL,NDR,NOD_ID,NOD_NN
62c---
63 DATA ndr/2,3,1/
64 DATA ndl/1,2,3/
65c-----------------------------------------------
66c set failure flag to elements using nodal frontwave information from neighbors
67C=======================================================================
68c
69c---------------
70 SELECT CASE (failwave%WAVE_MOD)
71c---------------
72 CASE (1) ! isotropic propagation
73c---------------
74 DO i=1,nel
75 IF (offly(i) == 1 .and. dadv(i) == one) THEN
76 n1 = failwave%IDXI(ixtg(2,i))
77 n2 = failwave%IDXI(ixtg(3,i))
78 n3 = failwave%IDXI(ixtg(4,i))
79 nfail = failwave%FWAVE_NOD(1,n1,1)
80 . + failwave%FWAVE_NOD(1,n2,1)
81 . + failwave%FWAVE_NOD(1,n3,1)
82 IF (nfail > 0) THEN
83 fwave_el(i) = 1
84 ENDIF
85 ENDIF
86 ENDDO
87c---------------
88 CASE (2,3) ! directional propagation
89c---------------
90 nindx = 0
91 DO i=1,nel
92 IF (offly(i) == 1 .and. dadv(i) == one) THEN
93 nindx = nindx + 1
94 indx(nindx) = i
95 ENDIF
96 ENDDO
97c
98 DO ii=1,nindx
99 i = indx(ii)
100 n1 = ixtg(2,i)
101 n2 = ixtg(3,i)
102 n3 = ixtg(4,i)
103 nod_nn(1) = failwave%IDXI(n1)
104 nod_nn(2) = failwave%IDXI(n2)
105 nod_nn(3) = failwave%IDXI(n3)
106 nod_id(1) = itab(n1)
107 nod_id(2) = itab(n2)
108 nod_id(3) = itab(n3)
109 found = 0
110c
111 DO k=1,3
112 ncurr = nod_nn(k)
113 IF (failwave%MAXLEV(ncurr) > 0) THEN
114 knext = ndr(k)
115 kprev = ndl(k)
116c
117 DO level = 1,failwave%MAXLEV(ncurr)
118 fnod1 = failwave%FWAVE_NOD(1,ncurr,level)
119 fnod2 = failwave%FWAVE_NOD(2,ncurr,level)
120c
121 IF ((fnod2 == 0 .and.
122 . (fnod1 == nod_id(knext) .or. fnod1 == nod_id(kprev)))
123 . .or.
124 . (fnod1 > 0 .and. fnod2 > 0 .and.
125 . fnod1 /= nod_id(kprev) .and. fnod1 /= nod_id(knext) .and.
126 . fnod2 /= nod_id(kprev) .and. fnod2 /= nod_id(knext)) ) THEN
127 found = 1
128 fwave_el(i) = 1
129 EXIT
130 ENDIF
131 ENDDO ! LEVEL
132 IF (found == 1) EXIT
133c
134 ENDIF
135 ENDDO ! K=1,3
136c
137c IF (FOUND == 1) THEN
138c#include "lockon.inc"
139c write(iout,'(A,I10)')'set failwave flag to element=',ngl(I)
140c#include "lockoff.inc"
141c ENDIF
142c
143 ENDDO ! II=1,NINDX
144c---------------
145 END SELECT
146c---------------
147 RETURN
148 END
149c
#define my_real
Definition cppsort.cpp:32
subroutine set_failwave_sh3n(failwave, fwave_el, dadv, nel, ixtg, itab, ngl, offly)