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