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

Go to the source code of this file.

Functions/Subroutines

subroutine write_pcyl (load_cyl, nload_cyl, nodlocal)

Function/Subroutine Documentation

◆ write_pcyl()

subroutine write_pcyl ( type (press_cyl_), dimension(nload_cyl), intent(in) load_cyl,
integer nload_cyl,
integer, dimension(*), intent(in) nodlocal )

Definition at line 31 of file write_pcyl.F.

32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE message_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER :: NLOAD_CYL
45 TYPE (PRESS_CYL_) ,DIMENSION(NLOAD_CYL) ,INTENT(IN) :: LOAD_CYL
46 INTEGER , DIMENSION(*) ,INTENT(IN) :: NODLOCAL
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
50 INTEGER :: I,J,N1,N2,N3,N4,NSEG,LINT,IAD,OFF
51 INTEGER, DIMENSION(:),ALLOCATABLE :: ITMP
52 my_real, DIMENSION(3) :: rtmp
53C-----------------------------------------------
54c -> PCYL_ID
55c -> NSEG
56c -> SEGNOD(NSEG,4) (N1,N2,NB3,N4) by segment
57c -> FRAME_ID
58c -> SENS_ID
59c -> TABLE_ID
60c -> XSCALE_R
61c -> XSCALE_T
62c -> YSCALE_P
63c=======================================================================
64
65 ! --------------
66 ! loop over the /load/pcyl
67 DO i=1,nload_cyl
68 nseg = load_cyl(i)%NSEG ! get the number of segment
69 lint = 5 + nseg*4
70 ALLOCATE(itmp(lint))
71 rtmp(1) = load_cyl(i)%XSCALE_R
72 rtmp(2) = load_cyl(i)%XSCALE_T
73 rtmp(3) = load_cyl(i)%YSCALE
74c
75 itmp(1) = nseg
76 itmp(2) = load_cyl(i)%ID
77 itmp(3) = load_cyl(i)%ISENS
78 itmp(4) = load_cyl(i)%ITABLE
79 itmp(5) = load_cyl(i)%IFRAME
80 iad = 5
81 ! --------------
82 ! loop over the segment to convert global node id into local node id
83 DO j=1,load_cyl(i)%NSEG
84 n1 = load_cyl(i)%SEGNOD(j,1) ! get the global node id N1
85 n2 = load_cyl(i)%SEGNOD(j,2) ! get the global node id N2
86 n3 = load_cyl(i)%SEGNOD(j,3) ! get the global node id N3
87 n4 = load_cyl(i)%SEGNOD(j,4) ! get the global node id N4
88 itmp(iad+1) = nodlocal(n1) ! global --> local for N1
89 itmp(iad+2) = nodlocal(n2) ! global --> local for N2
90 itmp(iad+3) = nodlocal(n3) ! global --> local for N3
91 ! global --> local for N4 : for triangle, N4 = 0, for shell N4/=0
92 IF (n4 == 0) THEN
93 itmp(iad+4) = 0
94 ELSE
95 itmp(iad+4) = nodlocal(n4)
96 ENDIF
97 iad = iad + 4
98 ENDDO
99 ! --------------
100
101 ! --------------
102 ! write the data related to the load/pcyl
103 CALL write_i_c(itmp,iad)
104 CALL write_db(rtmp,3)
105 ! /LOAD/PCYL option : adress for parith/on
106 CALL write_i_c(load_cyl(i)%SEGMENT_ADRESS,4*load_cyl(i)%S_SEGMENT_ADRESS)
107 ! --------------
108
109 DEALLOCATE(itmp)
110 ENDDO
111 ! --------------
112
113
114 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine write_db(a, n)
Definition write_db.F:140
void write_i_c(int *w, int *len)