1 /***********************************************************************
2 *
3 *               *****   ***    ***
4 *                  *   *   *  *   *
5 *                 *     ***    ***
6 *                *     *   *  *   *
7 *               *****   ***    ***
8 *
9 * A FREE Finite Elements Analysis Program in ANSI C for the UNIX and
10 * the Windows 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 * Function ale88n gibt Fehlermeldungen aus
37 * 31.7.2011 Rieg
38 ***********************************************************************/
39 
40 /***********************************************************************
41 * Fuer UNIX
42 ***********************************************************************/
43 #ifdef FR_UNIX
44 #include <z88n.h>
45 #include <stdio.h>    /* printf */
46 #endif
47 
48 /***********************************************************************
49 * Formate
50 ***********************************************************************/
51 #ifdef FR_XINT
52 #define PD "%d"
53 #endif
54 
55 #ifdef FR_XLONG
56 #define PD "%ld"
57 #endif
58 
59 #ifdef FR_XLOLO
60 #define PD "%lld"
61 #endif
62 
63 /***********************************************************************
64 * hier beginnt Function ale88n
65 ***********************************************************************/
ale88n(int ialert)66 int ale88n(int ialert)
67 {
68 extern FR_INT4 MAXKSS,MAXESS,LANG;
69 
70 switch(ialert)
71   {
72   case AL_NOLOG:
73     if(LANG == 1) printf("### kann Z88N.LOG nicht oeffnen ..Stop ###\n");
74     if(LANG == 2) printf("### cannot open Z88N.LOG ..stop ###\n");
75     break;
76   case AL_NODYN:
77     if(LANG == 1) printf("### kann Z88.DYN nicht oeffnen ..Stop ###\n");
78     if(LANG == 2) printf("### cannot open Z88.DYN ..stop ###\n");
79     break;
80   case AL_WRONGDYN:
81     if(LANG == 1) printf("### File Z88.DYN ist nicht korrekt ..Stop ###\n");
82     if(LANG == 2) printf("### file Z88.DYN is not correct ..stop ###\n");
83     break;
84   case AL_NOMEMY:
85     if(LANG == 1)printf("### nicht genuegend dynamisches Memory ..Stop ###\n");
86     if(LANG == 2)printf("### insufficient dynamic memory ..Stop ###\n");
87     break;
88   case AL_NONI:
89     if(LANG == 1) printf("### kann Z88NI.TXT nicht oeffnen ..Stop ###\n");
90     if(LANG == 2) printf("### cannot open Z88NI.TXT ..stop ###\n");
91     break;
92   case AL_NOI1:
93     if(LANG == 1) printf("### kann Z88I1.TXT nicht oeffnen ..Stop ###\n");
94     if(LANG == 2) printf("### cannot open Z88I1.TXT ..stop ###\n");
95     break;
96   case AL_EXSUPERK:
97     if(LANG == 1)
98       {
99       printf("### nur " PD " Superknoten zulaessig ..Stop ###\n",MAXKSS);
100       printf("### Abhilfe: MAXKSS in Z88.DYN erhoehen  ###\n");
101       }
102     if(LANG == 2)
103       {
104       printf("### only " PD " super nodes allowed ..stop ###\n",MAXKSS);
105       printf("### recover: increase MAXKSS in Z88.DYN ###\n");
106       }
107     break;
108   case AL_EXSUPERE:
109     if(LANG == 1)
110       {
111       printf("### nur " PD " Superelemente zulaessig ..Stop ###\n",MAXESS);
112       printf("### Abhilfe: MAXESS in Z88.DYN erhoehen    ###\n");
113       }
114     if(LANG == 2)
115       {
116       printf("### only " PD " super elements allowed ..stop ###\n",MAXESS);
117       printf("### recover: increase MAXESS in Z88.DYN    ###\n");
118       }
119     break;
120   case AL_TOBIG1:
121     if(LANG == 1)
122       {
123       printf("### Dynamischer Speicher erschoepft.. Stop ###\n");
124       printf("### Abhilfe: kleinere Struktur anfordern   ###\n");
125       printf("### oder MAXSE in Z88.DYN erhoehen         ###\n");
126       }
127     if(LANG == 2)
128       {
129       printf("### dynamic memory exhausted.. Stop ###\n");
130       printf("### recover: generate a smaller net ###\n");
131       printf("### or increase MAXSE in Z88.DYN    ###\n");
132       }
133     break;
134   case AL_FEEXID:
135     if(LANG == 1)
136       {
137       printf("### Achtung!                                 ###\n");
138       printf("### Erzeugte Struktur zu gross fuer FE-Lauf  ###\n");
139       printf("### MAXK,MAXE und MAXNFG in Z88.DYN erhoehen ###\n");
140       }
141     if(LANG == 2)
142       {
143       printf("### Warning! just generated net is too        ###\n");
144       printf("### heavy for a solver run ! recover:         ###\n");
145       printf("### increase MAXK,MAXE und MAXNFG in Z88.DYN  ###\n");
146       }
147     break;
148   }
149 return(0);
150 }
151