OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
write_pcyl.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!|| write_pcyl ../starter/source/loads/general/load_pcyl/write_pcyl.F
25!||--- called by ------------------------------------------------------
26!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| message_mod ../starter/share/message_module/message_mod.F
30!||====================================================================
31 SUBROUTINE write_pcyl(LOAD_CYL ,NLOAD_CYL ,NODLOCAL)
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
115 END
#define my_real
Definition cppsort.cpp:32
subroutine write_pcyl(load_cyl, nload_cyl, nodlocal)
Definition write_pcyl.F:32
subroutine write_db(a, n)
Definition write_db.F:140
void write_i_c(int *w, int *len)