OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
wrtdes.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!|| wrtdes ../engine/source/output/th/wrtdes.F
25!||--- called by ------------------------------------------------------
26!|| hist1 ../engine/source/output/th/hist1.F
27!|| hist13 ../engine/source/output/th/hist13.F
28!|| hist2 ../engine/source/output/th/hist2.F
29!|| lecnoise ../engine/source/general_controls/computation/lecnoise.F
30!|| noise ../engine/source/general_controls/computation/noise.f
31!|| thcluster ../engine/source/output/th/thcluster.F
32!|| thkin ../engine/source/output/th/thkin.F
33!|| thmonv ../engine/source/output/th/thmonv.F
34!|| thsechecksum ../engine/source/output/th/thchecksum.F90
35!|| thsens ../engine/source/output/th/thsens.F
36!|| thsurf ../engine/source/output/th/thsurf.F
37!|| write_th ../engine/source/output/th/write_th.F
38!|| wrtdes0 ../engine/source/output/th/wrtdes0.F
39!||--- calls -----------------------------------------------------
40!|| eor_c ../common_source/tools/input_output/write_routtines.c
41!|| write_i_c ../common_source/tools/input_output/write_routtines.c
42!|| write_r_c ../common_source/tools/input_output/write_routtines.c
43!||====================================================================
44 SUBROUTINE wrtdes(A,IA,L,IFORM,IR)
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER L, IFORM, IR
53 INTEGER IA(*)
54 my_real a(*)
55C-----------------------------------------------
56C C o m m o n B l o c k s
57C-----------------------------------------------
58#include "scr13_c.inc"
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62 INTEGER I, L1, L2, II
63 REAL R4
64 CHARACTER EOR*8, CH8(1000)*8
65C-----------------------------------------------
66C E x t e r n a l F u n c t i o n s
67C-----------------------------------------------
68 CHARACTER STRR*8, STRI*8
69C-----------------------------------------------
70 EXTERNAL strr,stri
71 DATA eor/'ZZZZZEOR'/
72 IF(l==0)RETURN
73
74 IF (iform==0)THEN
75 IF (ir==1)THEN
76 WRITE(iunit) (a(i),i=1,l)
77 ELSE
78 WRITE(iunit) (ia(i),i=1,l)
79 ENDIF
80
81 ELSEIF (iform==1)THEN
82 l1=1
83 l2=1000
84 DO
85 l2=min(l,l2)
86 ii=0
87 IF(ir==1)THEN
88 DO i=l1,l2
89 ii=ii+1
90 ch8(ii)=strr(a(i))
91 ENDDO
92 ELSE
93 DO i=l1,l2
94 ii=ii+1
95 ch8(ii)=stri(ia(i))
96 ENDDO
97 ENDIF
98 IF(l2<l)THEN
99 WRITE(iunit,'(10A8)') (ch8(i),i=1,ii)
100 l1=l1+1000
101 l2=l2+1000
102 cycle
103 ELSEIF(ii<1000) THEN
104 WRITE(iunit,'(10A8)') (ch8(i),i=1,ii),eor
105 ELSE
106 WRITE(iunit,'(10A8)') (ch8(i),i=1,ii)
107 WRITE(iunit,'(10A8)') eor
108 ENDIF
109 ENDDO
110
111 ELSEIF (iform==2)THEN
112 IF(ir==1)THEN
113 WRITE(iunit,'(A,I5,A)')eor,l,'R'
114 WRITE(iunit,'((5(1X,1PE15.8)))')(a(i),i=1,l)
115 ELSE
116 WRITE(iunit,'(A,I5,A)')eor,l,'I'
117 WRITE(iunit,'(16I10)') (ia(i),i=1,l)
118 ENDIF
119
120 ELSEIF (iform==3)THEN
121 CALL eor_c(4*l)
122 IF(ir==1)THEN
123 DO i=1,l
124 r4 = a(i)
125 CALL write_r_c(r4,1)
126 ENDDO
127 ELSE
128 CALL write_i_c(ia,l)
129 ENDIF
130 CALL eor_c(4*l)
131
132 ENDIF
133
134 RETURN
135 END
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
subroutine noise(dt2r, in, j, buf, v, a, ixs, elbuf_tab, iparg, weight, ixq)
Definition noise.F:41
void write_i_c(int *w, int *len)
void write_r_c(float *w, int *len)
void eor_c(int *len)
subroutine wrtdes(a, ia, l, iform, ir)
Definition wrtdes.F:45