1 /************************************************************************
2 *
3 *               *****   ***    ***
4 *                  *   *   *  *   *
5 *                 *     ***    ***
6 *                *     *   *  *   *
7 *               *****   ***    ***
8 *
9 * A FREE Finite Elements Analysis Program in ANSI C for the Windows
10 * and UNIX OS.
11 *
12 * Composed and edited and copyright by
13 * Professor Dr.-Ing. Frank Rieg, University of Bayreuth, Germany
14 *
15 * eMail:
16 * frank.rieg@uni-bayreuth.de
17 * dr.frank.rieg@t-online.de
18 *
19 * V15.0 November 18, 2015
20 *
21 * This program is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published by
23 * the Free Software Foundation; either version 2, or (at your option)
24 * any later version.
25 *
26 * This program is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29 * GNU General Public License for more details.
30 *
31 * You should have received a copy of the GNU General Public License
32 * along with this program; see the file COPYING.  If not, write to
33 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
34 ***********************************************************************/
35 /***********************************************************************
36 * prfl88 schreibt Flaechenlasten als Kontrolle in Z88O1.TXT
37 * 17.7.2011 Rieg
38 ***********************************************************************/
39 
40 /***********************************************************************
41 * Fuer UNIX
42 ***********************************************************************/
43 #ifdef FR_UNIX
44 #include <z88r.h>
45 #include <stdio.h>
46 #endif
47 
48 /***********************************************************************
49 * Fuer Windows
50 ***********************************************************************/
51 #ifdef FR_WIN
52 #include <z88r.h>
53 #include <stdio.h>
54 #endif
55 
56 /***********************************************************************
57 * Fuer Windows und GTK+
58 ***********************************************************************/
59 #ifdef FR_GTKWIN
60 #include <z88r.h>
61 #include <stdio.h>
62 #endif
63 
64 /***********************************************************************
65 * Formate
66 ***********************************************************************/
67 #define NL "\n"
68 
69 #ifdef FR_XINT
70 #define PD "%d"
71 #define B5D " %5d"
72 #endif
73 
74 #ifdef FR_XLONG
75 #define PD "%ld"
76 #define B5D " %5ld"
77 #endif
78 
79 #ifdef FR_XLOLO
80 #define PD "%lld"
81 #define B5D " %5lld"
82 #endif
83 
84 #ifdef FR_XDOUB
85 #define B13E " %+#13.5lE"
86 #endif
87 
88 #ifdef FR_XQUAD
89 #define B13E " %+#13.5LE"
90 #endif
91 
92 /***********************************************************************
93 * hier beginnt Function prfl88
94 ***********************************************************************/
prfl88(void)95 int prfl88(void)
96 {
97 extern FILE *fo1;
98 
99 extern FR_DOUBLEAY pres;
100 extern FR_DOUBLEAY tr1;
101 extern FR_DOUBLEAY tr2;
102 
103 extern FR_INT4AY ityp;
104 extern FR_INT4AY noi;
105 extern FR_INT4AY noffs;
106 extern FR_INT4AY nep;
107 
108 extern FR_INT4 npr,LANG;
109 
110 FR_INT4 j;
111 
112 /*---------------------------------------------------------------------*
113 * Beschreiben Z88O1.TXT, Ueberschrift
114 *---------------------------------------------------------------------*/
115 fprintf(fo1,"\n");
116 
117 if(LANG == 1)
118 {
119 fprintf(fo1,"Ausgabedatei Z88O1.TXT  Flaechenlasten\n");
120 fprintf(fo1,"                        **************\n\n");
121 fprintf(fo1,"Anzahl gegebene Flaechenlasten: " PD "\n\n",npr);
122 }
123 
124 if(LANG == 2)
125 {
126 fprintf(fo1,"output file Z88O1.TXT : surface loads\n");
127 fprintf(fo1,"                        *************\n\n");
128 fprintf(fo1,"number of given surface loads: " PD "\n\n",npr);
129 }
130 
131 /*---------------------------------------------------------------------*
132 * Schleife
133 *---------------------------------------------------------------------*/
134 for(j= 1; j <= npr; j++)
135   {
136 /*======================================================================
137 * Elementtypen 7, 8, 14, 15
138 *=====================================================================*/
139   if(ityp[nep[j]]== 7  || ityp[nep[j]]==  8 ||
140      ityp[nep[j]]== 14 || ityp[nep[j]]== 15)
141     {
142     if(LANG == 1)
143       fprintf(fo1,"Element#" B5D "   Normallast" B13E "   Schub r" B13E\
144 "   Knoten" B5D B5D B5D NL,nep[j],pres[j],tr1[j],
145       noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2]);
146     if(LANG == 2)
147       fprintf(fo1,"element#" B5D "   normal load" B13E "  shear r" B13E\
148 "   nodes"  B5D B5D B5D NL,nep[j],pres[j],tr1[j],
149       noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2]);
150     }
151 
152 /*======================================================================
153 * Elementtyp 17
154 *=====================================================================*/
155   if(ityp[nep[j]]== 17)
156     {
157     if(LANG == 1)
158       fprintf(fo1,"Element#" B5D "   Druck" B13E "   Knoten" B5D B5D B5D NL,
159       nep[j],pres[j],noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2]);
160     if(LANG == 2)
161       fprintf(fo1,"element#" B5D "   pressure" B13E "   nodes" B5D B5D B5D NL,
162       nep[j],pres[j],noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2]);
163     }
164 
165 /*======================================================================
166 * Elementtyp 16 und 22
167 *=====================================================================*/
168   if(ityp[nep[j]]== 16 || ityp[nep[j]]== 22)
169     {
170     if(LANG == 1)
171       fprintf(fo1,"Element#" B5D "   Druck" B13E\
172 "   Knoten" B5D B5D B5D B5D B5D B5D NL,nep[j],pres[j],
173       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],
174       noi[noffs[j]+3],noi[noffs[j]+4],noi[noffs[j]+5]);
175     if(LANG == 2)
176       fprintf(fo1,"element#" B5D "   pressure " B13E\
177 "   nodes" B5D B5D B5D B5D B5D B5D NL,nep[j],pres[j],
178       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],
179       noi[noffs[j]+3],noi[noffs[j]+4],noi[noffs[j]+5]);
180     }
181 
182 /*======================================================================
183 * Elementtyp 10 u. 21
184 *=====================================================================*/
185   if(ityp[nep[j]]== 10 || ityp[nep[j]]== 21)
186     {
187     if(LANG == 1)
188       fprintf(fo1,
189       "Element#" B5D "   Druck" B13E "   Schub r" B13E "   Schub s" B13E\
190 "   Knoten" B5D B5D B5D B5D B5D B5D B5D B5D NL,
191       nep[j],pres[j],tr1[j],tr2[j],
192       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3],
193       noi[noffs[j]+4],noi[noffs[j]+5],noi[noffs[j]+6],noi[noffs[j]+7]);
194     if(LANG == 2)
195       fprintf(fo1,
196       "Element#" B5D "   pressure" B13E "   shear r" B13E "   shear s" B13E\
197 "   nodes" B5D B5D B5D B5D B5D B5D B5D B5D NL,
198       nep[j],pres[j],tr1[j],tr2[j],
199       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3],
200       noi[noffs[j]+4],noi[noffs[j]+5],noi[noffs[j]+6],noi[noffs[j]+7]);
201     }
202 
203 /*======================================================================
204 * Elementtyp 1
205 *=====================================================================*/
206   if(ityp[nep[j]]== 1)
207     {
208     if(LANG == 1)
209       fprintf(fo1,
210       "Element#" B5D "   Druck" B13E "   Schub r" B13E "   Schub s" B13E\
211 "   Knoten" B5D B5D B5D B5D NL,
212       nep[j],pres[j],tr1[j],tr2[j],
213       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3]);
214     if(LANG == 2)
215       fprintf(fo1,
216       "Element#" B5D "   pressure" B13E "   shear r" B13E "   shear s" B13E\
217 "   nodes" B5D B5D B5D B5D NL,
218       nep[j],pres[j],tr1[j],tr2[j],
219       noi[noffs[j]  ],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3]);
220     }
221 
222 /*======================================================================
223 * Elementtypen 11 und 12
224 *=====================================================================*/
225   if(ityp[nep[j]]== 11  || ityp[nep[j]]== 12)
226     {
227     if(LANG == 1)
228       fprintf(fo1,"Element#" B5D "   Normallast" B13E "   Schub r" B13E\
229 "   Knoten" B5D B5D B5D B5D NL,nep[j],pres[j],tr1[j],
230       noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3]);
231     if(LANG == 2)
232       fprintf(fo1,"element#" B5D "   normal load" B13E "  shear r" B13E\
233 "   nodes" B5D B5D B5D B5D NL,nep[j],pres[j],tr1[j],
234       noi[noffs[j]],noi[noffs[j]+1],noi[noffs[j]+2],noi[noffs[j]+3]);
235     }
236 
237 /*======================================================================
238 * Elementtyp 18,19,20,23 und 24
239 *=====================================================================*/
240   if(ityp[nep[j]]== 18 || ityp[nep[j]]== 19 || ityp[nep[j]]== 20 ||
241      ityp[nep[j]]== 23 || ityp[nep[j]]== 24)
242     {
243     if(LANG == 1)
244       fprintf(fo1,"Element#" B5D "   Druck" B13E NL,nep[j],pres[j]);
245     if(LANG == 2)
246       fprintf(fo1,"Element#" B5D "   pressure" B13E NL,nep[j],pres[j]);
247     }
248 
249   }  /* Ende Schleife */
250 
251 return(0);
252 }
253