OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
h3d_update_fvmbag_centroids.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "vect01_c.inc"
#include "param_c.inc"
#include "inter22.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine h3d_update_fvmbag_centroids (h3dtitle, len_h3dtitle, ih3d, monvol, volmon, nfvbag, smonvol, svolmon, fvdata_p, airbags_node_id_shift)

Function/Subroutine Documentation

◆ h3d_update_fvmbag_centroids()

subroutine h3d_update_fvmbag_centroids ( character*80, intent(in) h3dtitle,
integer, intent(in) len_h3dtitle,
integer, intent(in) ih3d,
integer, dimension(smonvol), intent(in) monvol,
dimension(svolmon), intent(in) volmon,
integer, intent(in) nfvbag,
integer, intent(in) smonvol,
integer, intent(in) svolmon,
type(fvbag_data), dimension(nfvbag), intent(in) fvdata_p,
integer, intent(in) airbags_node_id_shift )

Definition at line 33 of file h3d_update_fvmbag_centroids.F.

35C-----------------------------------------------
36C D e s c r i p t i o n
37C-----------------------------------------------
38C This suroutine updates orphan nodes entities located at polyhedra centroids
39C (Visualization purpose)
40C-----------------------------------------------
41C P r e - C o n d i t i o n s
42C-----------------------------------------------
43C none
44C-----------------------------------------------
45C M o d u l e s
46C-----------------------------------------------
48 USE groupdef_mod , only:group_
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "com01_c.inc"
57#include "com04_c.inc"
58#include "vect01_c.inc"
59#include "param_c.inc"
60#include "inter22.inc"
61C-----------------------------------------------
62C D u m m y A r g u m e n t s
63C-----------------------------------------------
64 INTEGER,INTENT(IN) :: NFVBAG, SMONVOL,SVOLMON, AIRBAGS_NODE_ID_SHIFT
65 my_real,INTENT(IN) :: volmon(svolmon)
66 INTEGER,INTENT(IN) :: MONVOL(SMONVOL)
67 CHARACTER*80,INTENT(IN):: H3DTITLE
68 INTEGER,INTENT(IN) :: LEN_H3DTITLE , IH3D
69 TYPE(FVBAG_DATA),INTENT(IN) :: FVDATA_P(NFVBAG)
70C-----------------------------------------------
71C L o c a l V a r i a b l e s
72C-----------------------------------------------
73 INTEGER :: K1 !< index shift for MONVOL ARRAY
74 INTEGER :: NN, II !< loop
75 INTEGER :: ITYP !< monvol type (refer to read_monvol.F)
76 INTEGER :: IH3D_FLAG !< flag for H3D output
77 INTEGER :: NNODES !< number of centroids
78 INTEGER :: IFV !< FVMBAG identifier in [1, NFVBAG] where NFVBAG <= NVOLU
79 INTEGER :: NPOLH !< number of polyhedra for a given airbag
80 my_real :: value_x !< polyhedron centroid X-value
81 my_real :: value_y !< polyhedron centroid Y-value
82 my_real :: value_z !< polyhedron centroid Z-value
83 INTEGER :: ILEN !< loop upper bound
84
85 INTEGER, ALLOCATABLE,DIMENSION(:) :: ITAB_FVMBAG
86 my_real, ALLOCATABLE,DIMENSION(:,:) :: xyz_fvmbag,disp_fvmbag
87C-----------------------------------------------
88C S o u r c e L i n e s
89C-----------------------------------------------
90
91
92 !loop over all airbags, skip ones which are not FVMBAG (no internal mesh)
93 ! then generate H3D (orphan) nodes at centroids
94 k1=1
95 nnodes = 0
96 DO nn=1,nvolu
97 ityp=monvol(k1-1+2)
98 IF (ityp == 6.OR.ityp == 8 .OR. ityp == 11) THEN ! /MONVOL/FVMBAG, or FVMBAG1, or FVMBAG2
99 ih3d_flag = monvol(k1-1 +75) !GRNOD internal identifier in [1:NGRNOD]
100 ifv = monvol(k1-1 +45)
101 !check if grnod_id was provided, otherwise skip
102 IF(ih3d_flag == 1 .AND. ifv /= 0)THEN
103 npolh = fvdata_p(ifv)%NPOLH
104
105 IF(npolh > 0)THEN ! if there are any polyhedron
106
107 ALLOCATE(itab_fvmbag(npolh))
108 ALLOCATE(disp_fvmbag(3,npolh))
109
110 DO ii=1, fvdata_p(ifv)%NPOLH !loop over polyhedra composing the airbag mesh
111
112 disp_fvmbag(1,ii) = fvdata_p(ifv)%CENTROID_POLH(1,ii)
113 disp_fvmbag(2,ii) = fvdata_p(ifv)%CENTROID_POLH(2,ii)
114 disp_fvmbag(3,ii) = fvdata_p(ifv)%CENTROID_POLH(3,ii)
115
116 itab_fvmbag(ii) = airbags_node_id_shift+nnodes+ii
117 enddo! next I (next polyhedron)
118
119 CALL c_h3d_update_fvmbag_nodes(h3dtitle,len_h3dtitle,ih3d,itab_fvmbag,npolh,disp_fvmbag)
120
121 DEALLOCATE(itab_fvmbag)
122 DEALLOCATE(disp_fvmbag)
123 nnodes = nnodes + fvdata_p(ifv)%NPOLH
124
125 ENDIF !NNODES>0
126
127 ENDIF !IH3D_FLAG>0
128
129 ENDIF ! ITYP
130 k1=k1+nimv
131 ENDDO !next NN
132
133
134
135 !loop from NNODES +1 to AIRBAGS_TOTAL_FVM_IN_H3D : locate them to 0,0,0
136 ilen = airbags_total_fvm_in_h3d - nnodes
137 ALLOCATE(itab_fvmbag(ilen+1))
138 ALLOCATE(disp_fvmbag(3,ilen+1))
139
140 DO ii=1,ilen
141 itab_fvmbag(ii) = airbags_node_id_shift+nnodes+ii
142 disp_fvmbag(1,ii) = zero
143 disp_fvmbag(2,ii) = zero
144 disp_fvmbag(3,ii) = zero
145 ENDDO
146
147 CALL c_h3d_update_fvmbag_nodes(h3dtitle,len_h3dtitle,ih3d,itab_fvmbag,ilen,disp_fvmbag)
148
149 DEALLOCATE(itab_fvmbag)
150 DEALLOCATE(disp_fvmbag)
151
152
153 RETURN
void c_h3d_update_fvmbag_nodes(char *name, int *size, int *IH3D, int *ITAB, int *NUMNOD, my_real *D)
#define my_real
Definition cppsort.cpp:32
integer airbags_total_fvm_in_h3d
Definition fvbag_mod.F:191