OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
failwave_init.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!|| failwave_init ../starter/source/materials/fail/failwave_init.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| message_mod ../starter/share/message_module/message_mod.F
30!||====================================================================
31 SUBROUTINE failwave_init(FAILWAVE,IPARG,IXC,IXTG,NUMNOD)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE my_alloc_mod
36 USE message_mod
37 USE failwave_mod
38 use element_mod , only : nixc,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 "param_c.inc"
47#include "com01_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NUMNOD
52 INTEGER ,DIMENSION(NPARG,NGROUP), INTENT(IN) :: IPARG
53 INTEGER ,DIMENSION(NIXC,*) ,INTENT(IN) :: IXC
54 INTEGER ,DIMENSION(NIXTG,*) ,INTENT(IN) :: IXTG
55 TYPE (FAILWAVE_STR_) :: FAILWAVE
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I, J, IFAILWAVE, NG, NEL, NFT, ITY, IGTYP, IFRW, INOD, NNOD, NDDL, SIZE
60 INTEGER ,DIMENSION(:), ALLOCATABLE :: TAGNOD,INDX,IDXI
61C=======================================================================
62
63 ALLOCATE( tagnod(numnod),indx(numnod),idxi(numnod) )
64c
65 ifailwave = failwave%WAVE_MOD
66 IF (ifailwave == 0) THEN
67 failwave%NNOD = 0
68 failwave%NDDL = 0
69 failwave%SIZE = 0
70 ALLOCATE (failwave%FWAVE_NOD(0,0,0))
71 ALLOCATE (failwave%FWAVE_NOD_STACK(0,0,0))
72 ALLOCATE (failwave%MAXLEV(0))
73 ALLOCATE (failwave%INDX(0))
74 ALLOCATE (failwave%IDXI(0))
75c
76 ELSE
77c
78 tagnod(:) = 0
79 indx(:) = 0
80 idxi(:) = 0
81c
82 DO ng=1,ngroup
83 ifrw = iparg(79,ng)
84 IF (ifrw > 0) THEN
85 nel = iparg(2,ng)
86 nft = iparg(3,ng)
87 ity = iparg(5,ng)
88 igtyp = iparg(38,ng)
89 IF (ity == 3) THEN
90 DO i=1,nel
91 DO j=2,5
92 inod = ixc(j,i+nft)
93 tagnod(inod) = 1
94 ENDDO
95 ENDDO
96 ELSE IF (ity == 7) THEN
97 DO i=1,nel
98 DO j=2,4
99 inod = ixtg(j,i+nft)
100 tagnod(inod) = 1
101 ENDDO
102 ENDDO
103 ENDIF
104 ENDIF
105 ENDDO
106c
107 nnod = 0
108 DO i=1,numnod
109 IF (tagnod(i) == 1) THEN
110 nnod = nnod + 1
111 indx(nnod) = i ! INDX(nnod) -> NUMNOD
112 idxi(i) = nnod ! IDXI(numnod) -> NNOD
113 ENDIF
114 ENDDO
115c
116 IF (ifailwave == 1) THEN ! isotropic propagation
117 nddl = 1
118 SIZE = 1
119 ELSE ! directional propagation
120 nddl = 2
121 SIZE = 10
122 ENDIF
123 failwave%NNOD = nnod
124 failwave%SIZE = SIZE
125 failwave%NDDL = nddl
126 CALL my_alloc (failwave%INDX,nnod)
127 CALL my_alloc (failwave%IDXI,numnod)
128 CALL my_alloc (failwave%MAXLEV,0)
129 CALL my_alloc (failwave%MAXLEV_STACK,0)
130 ALLOCATE (failwave%FWAVE_NOD(nddl,numnod,size))
131 ALLOCATE (failwave%FWAVE_NOD_STACK(nddl,numnod,size))
132c
133 failwave%INDX(1:nnod) = indx(1:nnod)
134 failwave%IDXI(1:numnod)= idxi(1:numnod)
135 failwave%FWAVE_NOD = 0
136 failwave%FWAVE_NOD_STACK = 0
137 ENDIF
138
139 DEALLOCATE( tagnod,indx,idxi )
140c
141c--------------------------------
142 RETURN
143 END
subroutine failwave_init(failwave, iparg, ixc, ixtg, numnod)