OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
create_h3d_parts.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "scr17_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine create_h3d_parts (h3d_data, id_input, ipart, igrpart)

Function/Subroutine Documentation

◆ create_h3d_parts()

subroutine create_h3d_parts ( type (h3d_database) h3d_data,
integer id_input,
integer, dimension(lipart1,*) ipart,
type(group_), dimension(ngrpart), intent(in) igrpart )

Definition at line 34 of file create_h3d_parts.F.

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)
integer, parameter ncharline100
subroutine arret(nn)
Definition arret.F:86