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-----------------------------------------------
60 INTEGER NVAR
61C-----------------------------------------------
62C L o c a l V a r i a b l e s
63C-----------------------------------------------
64 CHARACTER(LEN=NCHARLINE100) :: CARTE
65 CHARACTER(LEN=NCHARLINE100) :: CARTE1
66 INTEGER I,J,K,L,M,N_H3D_PART,INDEX
67C=========================================================================
68
69 n_h3d_part = h3d_data%INPUT_LIST(id_input)%NB_PART
70
71
72 IF (n_h3d_part /= 0 )
73 . ALLOCATE(h3d_data%PARTS(1)%PART_LIST(n_h3d_part))
74c
75 ALLOCATE(h3d_data%PARTS(1)%PART(npart))
76c
77 IF (n_h3d_part /= 0 ) THEN
78 DO i=1,npart
79 h3d_data%PARTS(1)%PART(i) = 0
80 ENDDO
81 ELSE
82 DO i=1,npart
83 h3d_data%PARTS(1)%PART(i) = 1
84 ENDDO
85 ENDIF
86
87 DO j=1,n_h3d_part
88 IF(h3d_data%INPUT_LIST(id_input)%PART_LIST(j) > 0) THEN
89 ! Find the part with this ID
90 DO i=1,npart
91 IF(h3d_data%INPUT_LIST(id_input)%PART_LIST(j) == ipart(4,i)) THEN
92 h3d_data%PARTS(1)%PART(i) = 1
93 ENDIF
94 ENDDO
95 ELSE
96 ! Negative value refers to a part group
97 l = -h3d_data%INPUT_LIST(id_input)%PART_LIST(j) ! Get positive index of part group
98 index = 0
99 DO i=1,ngrpart
100 IF(igrpart(i)%ID == l) THEN
101 index = i
102 EXIT
103 ENDIF
104 ENDDO
105 IF(index > 0) THEN
106 DO i=1,igrpart(index)%NENTITY
107 k = igrpart(index)%ENTITY(i) ! Get the part ID from the group
108 ! Find the part with this ID
109 DO m=1,npart
110 IF (ipart(4,m) == k) THEN
111 h3d_data%PARTS(1)%PART(m) = 1
112 EXIT
113 ENDIF
114 ENDDO
115 ENDDO
116 ENDIF
117 ENDIF
118 ENDDO
119
120 RETURN
121 999 print *,'error lecture'
122 CALL arret(0)
123 END
subroutine create_h3d_parts(h3d_data, id_input, ipart, igrpart)
integer, parameter ncharline100
subroutine arret(nn)
Definition arret.F:87