OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
create_h3d_parts.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!|| create_h3d_parts ../engine/source/output/h3d/h3d_build_fortran/create_h3d_parts.F
25!||--- called by ------------------------------------------------------
26!|| lech3d ../engine/source/output/h3d/h3d_build_fortran/lech3d.F
27!||--- calls -----------------------------------------------------
28!|| arret ../engine/source/system/arret.F
29!||--- uses -----------------------------------------------------
30!|| groupdef_mod ../common_source/modules/groupdef_mod.F
31!|| h3d_mod ../engine/share/modules/h3d_mod.F
32!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
33!||====================================================================
34 SUBROUTINE create_h3d_parts(H3D_DATA,ID_INPUT,IPART,IGRPART)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
39 USE h3d_mod
40 USE groupdef_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com04_c.inc"
49#include "scr17_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 TYPE (H3D_DATABASE) :: H3D_DATA
54 INTEGER ID_INPUT
55 INTEGER IPART(LIPART1,*)
56 TYPE(group_) ,DIMENSION(NGRPART) ,INTENT(IN) :: IGRPART
57C-----------------------------------------------
58C E x t e r n a l F u n c t i o n s
59C-----------------------------------------------
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 INTEGER I,J,K,L,M,N_H3D_PART,INDEX
64C=========================================================================
65
66 n_h3d_part = h3d_data%INPUT_LIST(id_input)%NB_PART
67
68
69 IF (n_h3d_part /= 0 )
70 . ALLOCATE(h3d_data%PARTS(1)%PART_LIST(n_h3d_part))
71c
72 ALLOCATE(h3d_data%PARTS(1)%PART(npart))
73c
74 IF (n_h3d_part /= 0 ) THEN
75 DO i=1,npart
76 h3d_data%PARTS(1)%PART(i) = 0
77 ENDDO
78 ELSE
79 DO i=1,npart
80 h3d_data%PARTS(1)%PART(i) = 1
81 ENDDO
82 ENDIF
83
84 DO j=1,n_h3d_part
85 IF(h3d_data%INPUT_LIST(id_input)%PART_LIST(j) > 0) THEN
86 ! Find the part with this ID
87 DO i=1,npart
88 IF(h3d_data%INPUT_LIST(id_input)%PART_LIST(j) == ipart(4,i)) THEN
89 h3d_data%PARTS(1)%PART(i) = 1
90 ENDIF
91 ENDDO
92 ELSE
93 ! Negative value refers to a part group
94 l = -h3d_data%INPUT_LIST(id_input)%PART_LIST(j) ! Get positive index of part group
95 index = 0
96 DO i=1,ngrpart
97 IF(igrpart(i)%ID == l) THEN
98 index = i
99 EXIT
100 ENDIF
101 ENDDO
102 IF(index > 0) THEN
103 DO i=1,igrpart(index)%NENTITY
104 k = igrpart(index)%ENTITY(i) ! Get the part ID from the group
105 ! Find the part with this ID
106 DO m=1,npart
107 IF (ipart(4,m) == k) THEN
108 h3d_data%PARTS(1)%PART(m) = 1
109 EXIT
110 ENDIF
111 ENDDO
112 ENDDO
113 ENDIF
114 ENDIF
115 ENDDO
116
117 RETURN
118 CALL arret(0)
119 END
subroutine create_h3d_parts(h3d_data, id_input, ipart, igrpart)
integer, parameter ncharline100
subroutine arret(nn)
Definition arret.F:86