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