File: dyn88i2.c

package info (click to toggle)
z88 13.0.0%2Bdfsg2-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 107,800 kB
  • ctags: 3,296
  • sloc: ansic: 45,530; sh: 71; makefile: 14
file content (670 lines) | stat: -rw-r--r-- 17,489 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
/***********************************************************************
* 
*               *****   ***    ***
*                  *   *   *  *   *
*                 *     ***    ***
*                *     *   *  *   *
*               *****   ***    ***
*
* A FREE Finite Elements Analysis Program in ANSI C for the UNIX OS.
*
* Composed and edited and copyright by 
* Professor Dr.-Ing. Frank Rieg, University of Bayreuth, Germany
*
* eMail: 
* frank.rieg@uni-bayreuth.de
* dr.frank.rieg@t-online.de
* 
* V12.0  February 14, 2005
*
* Z88 should compile and run under any UNIX OS and Motif 2.0.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING.  If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
***********************************************************************/ 
/***********************************************************************
*  function dyn88i2 liest z88.dyn aus und laesst memory kommen
*  hier wird File Z88.DYN erneut geoeffnet (vorher schon in lan88i2)
*  18.1.08 Rieg - fuer Iterationssolver - Part 2 
***********************************************************************/ 

/***********************************************************************
* Fuer UNIX
***********************************************************************/
#ifdef FR_UNIX
#include <z88i.h>
#include <stdio.h>   /* FILE,NULL,fopen,fclose,fgets,sscanf */
                     /* rewind                              */
#include <string.h>  /* strstr */
#include <stdlib.h>  /* FR_CALLOC */
#endif

/***********************************************************************
* Fuer Windows 95
***********************************************************************/
#ifdef FR_WIN95
#include <z88i.h>
#include <stdio.h>   /* FILE,NULL,fopen,fclose,fgets,sscanf */
                     /* rewind                              */
#include <string.h>  /* strstr */
#include <stdlib.h>  /* FR_CALLOC */
#endif

/***********************************************************************
*  Functions
***********************************************************************/
int wlog88i2(FR_INT4,int);

/***********************************************************************
* hier beginnt Function dyn88i2
***********************************************************************/
int dyn88i2(void)
{
extern FR_DOUBLEAY GS;
extern FR_DOUBLEAY CI;
extern FR_DOUBLEAY se;
extern FR_DOUBLEAY rs;
extern FR_DOUBLEAY xi;
extern FR_DOUBLEAY xa;
extern FR_DOUBLEAY v;
extern FR_DOUBLEAY pk;
extern FR_DOUBLEAY zz;
extern FR_DOUBLEAY fak;
extern FR_DOUBLEAY x;
extern FR_DOUBLEAY y;
extern FR_DOUBLEAY z;
extern FR_DOUBLEAY emod;
extern FR_DOUBLEAY rnue;
extern FR_DOUBLEAY qpara;
extern FR_DOUBLEAY riyy;
extern FR_DOUBLEAY eyy;
extern FR_DOUBLEAY rizz;
extern FR_DOUBLEAY ezz;
extern FR_DOUBLEAY rit;
extern FR_DOUBLEAY wt;
extern FR_DOUBLEAY pres;
extern FR_DOUBLEAY tr1;
extern FR_DOUBLEAY tr2;

extern FR_INT4AY ip;
extern FR_INT4AY iez;
extern FR_INT4AY koi;
extern FR_INT4AY ifrei; 
extern FR_INT4AY ioffs;
extern FR_INT4AY koffs;
extern FR_INT4AY ityp;
extern FR_INT4AY ivon;
extern FR_INT4AY ibis;
extern FR_INT4AY intord;
extern FR_INT4AY nep;
extern FR_INT4AY noi;
extern FR_INT4AY noffs;

extern FILE *fdyn, *fl2;
extern char cdyn[];

extern FR_INT4 IDYNMEM,ICFLAG;
extern FR_INT4 MAXGS,MAXNFG,MAXK,MAXE,MAXKOI,MAXESM,MAXNEG,MAXPR;

double RDYNMEM;
char   cline[256], cdummy[80];
  
/*----------------------------------------------------------------------
*  Eintragungen in Z88I2.LOG
*---------------------------------------------------------------------*/
#ifdef FR_UNIX
if     (ICFLAG == 1) wlog88i2(1,LOG_CFLAGC);
else if(ICFLAG == 2) wlog88i2(2,LOG_CFLAGN);
#endif
      
/*----------------------------------------------------------------------
*  dyn- datei z88.dyn oeffnen
*---------------------------------------------------------------------*/
wlog88i2(0,LOG_OPENZ88DYN);

fdyn= fopen(cdyn,"r");
if(fdyn == NULL)
  {
  wlog88i2(0,LOG_NODYN);
  fclose(fl2);
  return(AL_NODYN);
  }

rewind(fdyn);

/*----------------------------------------------------------------------
*  dyn- datei z88.dyn lesen
*---------------------------------------------------------------------*/
#ifdef FR_XINT
#define CFORMA "%s %d"
#endif
#ifdef FR_XLONG
#define CFORMA "%s %ld"
#endif
#ifdef FR_XLOLO
#define CFORMA "%s %lld"
#endif

fgets(cline,256,fdyn);

if( (strstr(cline,"DYNAMIC START"))!= NULL)         /* Lesen File */
  {
  do
    {
    fgets(cline,256,fdyn);

    if( (strstr(cline,"COMMON START"))!= NULL)      /* Lesen COMMON */
      {
      do
        {
        fgets(cline,256,fdyn);
        if( (strstr(cline,"MAXGS"))!= NULL)         /* Lesen MAXGS */
          sscanf(cline,CFORMA,cdummy,&MAXGS);
        if( (strstr(cline,"MAXKOI"))!= NULL)        /* Lesen MAXKOI */
          sscanf(cline,CFORMA,cdummy,&MAXKOI);
        if( (strstr(cline,"MAXK"))!= NULL)          /* Lesen MAXK */
          sscanf(cline,CFORMA,cdummy,&MAXK);
        if( (strstr(cline,"MAXE"))!= NULL)          /* Lesen MAXE */
          sscanf(cline,CFORMA,cdummy,&MAXE);
        if( (strstr(cline,"MAXNFG"))!= NULL)        /* Lesen MAXNFG */
          sscanf(cline,CFORMA,cdummy,&MAXNFG);
        if( (strstr(cline,"MAXNEG"))!= NULL)        /* Lesen MAXNEG */
          sscanf(cline,CFORMA,cdummy,&MAXNEG);
        if( (strstr(cline,"MAXPR"))!= NULL)         /* Lesen MAXPR */
          sscanf(cline,CFORMA,cdummy,&MAXPR);
        }
      while( (strstr(cline,"COMMON END"))== NULL);
      }                                             /* end if COMMON START */

    }
  while( (strstr(cline,"DYNAMIC END"))== NULL);     
    
  }                                                 /* end if DYNAMIC START */
else
  {
  wlog88i2(0,LOG_WRONGDYN);
  fclose(fl2);
  return(AL_WRONGDYN);
  }  

if(MAXGS <= 0 || MAXKOI <= 0 || MAXK <= 0   ||
   MAXE <= 0  || MAXNFG <= 0 || MAXNEG <= 0 || MAXPR <= 0)
  {
  wlog88i2(0,LOG_WRONGDYN);
  fclose(fl2);
  return(AL_WRONGDYN);
  }  

/*----------------------------------------------------------------------
*  korrekt gelesen, file fdyn schliessen
*---------------------------------------------------------------------*/
fclose(fdyn);

wlog88i2(MAXGS,LOG_MAXGS);
wlog88i2(MAXKOI,LOG_MAXKOI);
wlog88i2(MAXK,LOG_MAXK);
wlog88i2(MAXE,LOG_MAXE);
wlog88i2(MAXNFG,LOG_MAXNFG);
wlog88i2(MAXNEG,LOG_MAXNEG);
wlog88i2(MAXESM,LOG_MAXESM);
wlog88i2(MAXPR,LOG_MAXPR);

wlog88i2(0,LOG_OKDYN);

/*----------------------------------------------------------------------
*  memory kommen lassen ..
*---------------------------------------------------------------------*/
wlog88i2(0,LOG_ALLOCMEMY);

/*======================================================================
*  memory fuer GS und CI (nur fuer SICCG88) 1 und 18
*=====================================================================*/
GS= (FR_DOUBLEAY) FR_CALLOC((MAXGS+1),sizeof(FR_DOUBLE));
if(GS == NULL)
  {
  wlog88i2(1,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(1,LOG_ARRAYOK);

if(ICFLAG == 1)
  {
  CI= (FR_DOUBLEAY) FR_CALLOC((MAXGS+1),sizeof(FR_DOUBLE));
  if(CI == NULL)
    {
    wlog88i2(18,LOG_ARRAYNOTOK);
    fclose(fl2);
    return(AL_NOMEMY);
    }
  else
    wlog88i2(18,LOG_ARRAYOK);
  }

/*======================================================================
*  memory fuer se,rs,fak,xi,xa 2,3,4,5,6
*=====================================================================*/
se= (FR_DOUBLEAY) FR_CALLOC((MAXESM+1),sizeof(FR_DOUBLE));
if(se == NULL)
  {
  wlog88i2(2,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(2,LOG_ARRAYOK);

rs= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(rs == NULL)
  {
  wlog88i2(3,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(3,LOG_ARRAYOK);

fak= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(fak == NULL)
  {
  wlog88i2(4,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(4,LOG_ARRAYOK);

xi= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(xi == NULL)
  {
  wlog88i2(5,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(5,LOG_ARRAYOK);

xa= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(xa == NULL)
  {
  wlog88i2(6,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(6,LOG_ARRAYOK);

/*======================================================================
*  memory fuer v,pk,zz 7,8,9
*=====================================================================*/
v= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(v == NULL)
  {
  wlog88i2(7,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(7,LOG_ARRAYOK);

pk= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(pk == NULL)
  {
  wlog88i2(8,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(8,LOG_ARRAYOK);

zz= (FR_DOUBLEAY) FR_CALLOC((MAXNFG+1),sizeof(FR_DOUBLE));
if(zz == NULL)
  {
  wlog88i2(9,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(9,LOG_ARRAYOK);

/*======================================================================
*  memory fuer x, y, z 10,11,12
*=====================================================================*/
x= (FR_DOUBLEAY) FR_CALLOC((MAXK+1),sizeof(FR_DOUBLE));
if(x == NULL)
  {
  wlog88i2(10,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(10,LOG_ARRAYOK);

y= (FR_DOUBLEAY) FR_CALLOC((MAXK+1),sizeof(FR_DOUBLE));
if(y == NULL)
  {
  wlog88i2(11,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(11,LOG_ARRAYOK);

z= (FR_DOUBLEAY) FR_CALLOC((MAXK+1),sizeof(FR_DOUBLE));
if(z == NULL)
  {
  wlog88i2(12,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(12,LOG_ARRAYOK);

/*======================================================================
*  memory fuer emod, rnue, qpara: 13,14,15
*=====================================================================*/
emod= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(emod == NULL)
  {
  wlog88i2(13,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(13,LOG_ARRAYOK);

rnue= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(rnue == NULL)
  {
  wlog88i2(14,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(14,LOG_ARRAYOK);

qpara= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(qpara == NULL)
  {
  wlog88i2(15,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(15,LOG_ARRAYOK);

/*======================================================================
*  memory fuer ip, iez, koi 16,17,20
*=====================================================================*/
ip= (FR_INT4AY) FR_CALLOC((MAXNFG+1),sizeof(FR_INT4));
if(ip == NULL)
  {
  wlog88i2(16,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(16,LOG_ARRAYOK);

iez= (FR_INT4AY) FR_CALLOC((MAXGS+1),sizeof(FR_INT4));
if(iez == NULL)
  {
  wlog88i2(17,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(17,LOG_ARRAYOK);

koi= (FR_INT4AY) FR_CALLOC((MAXKOI+1),sizeof(FR_INT4));
if(koi == NULL)
  {
  wlog88i2(20,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(20,LOG_ARRAYOK);

/*======================================================================
*  memory fuer ifrei, ioffs, koffs, ityp 21,22,23,24
*=====================================================================*/
ifrei= (FR_INT4AY) FR_CALLOC((MAXK+1),sizeof(FR_INT4));
if(ifrei == NULL)
  {
  wlog88i2(21,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(21,LOG_ARRAYOK);

ioffs= (FR_INT4AY) FR_CALLOC((MAXK+1),sizeof(FR_INT4));
if(ioffs == NULL)
  {
  wlog88i2(22,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(22,LOG_ARRAYOK);

koffs= (FR_INT4AY) FR_CALLOC((MAXE+1),sizeof(FR_INT4));
if(koffs == NULL)
  {
  wlog88i2(23,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(23,LOG_ARRAYOK);

ityp= (FR_INT4AY) FR_CALLOC((MAXE+1),sizeof(FR_INT4));
if(ityp == NULL)
  {
  wlog88i2(24,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(24,LOG_ARRAYOK);

/*======================================================================
*  memory fuer ivon, ibis, intord 25,26,27
*=====================================================================*/
ivon= (FR_INT4AY) FR_CALLOC((MAXNEG+1),sizeof(FR_INT4));
if(ivon == NULL)
  {
  wlog88i2(25,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(25,LOG_ARRAYOK);

ibis= (FR_INT4AY) FR_CALLOC((MAXNEG+1),sizeof(FR_INT4));
if(ibis == NULL)
  {
  wlog88i2(26,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(26,LOG_ARRAYOK);

intord= (FR_INT4AY) FR_CALLOC((MAXNEG+1),sizeof(FR_INT4));
if(intord == NULL)
  {
  wlog88i2(27,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(27,LOG_ARRAYOK);

/*======================================================================
*  memory fuer riyy,eyy,rizz,ezz,rit,wt:28,29,30,31,32,33
*=====================================================================*/
riyy= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(riyy == NULL)
  {
  wlog88i2(28,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(28,LOG_ARRAYOK);

eyy= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(eyy == NULL)
  {
  wlog88i2(29,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(29,LOG_ARRAYOK);

rizz= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(rizz == NULL)
  {
  wlog88i2(30,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(30,LOG_ARRAYOK);

ezz= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(ezz == NULL)
  {
  wlog88i2(31,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(31,LOG_ARRAYOK);

rit= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(rit == NULL)
  {
  wlog88i2(32,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(32,LOG_ARRAYOK);

wt= (FR_DOUBLEAY) FR_CALLOC((MAXNEG+1),sizeof(FR_DOUBLE));
if(wt == NULL)
  {
  wlog88i2(33,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(33,LOG_ARRAYOK);

/*======================================================================
*  memory fuer pres,tr1,tr2,nep,noi,noffs:34,35,36,37,38,39
*  Annahme: max. 8 Knoten pro Oberflaeche
*=====================================================================*/
pres= (FR_DOUBLEAY) FR_CALLOC((MAXPR+1),sizeof(FR_DOUBLE));
if(pres == NULL)
  {
  wlog88i2(34,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(34,LOG_ARRAYOK);

tr1= (FR_DOUBLEAY) FR_CALLOC((MAXPR+1),sizeof(FR_DOUBLE));
if(tr1 == NULL)
  {
  wlog88i2(35,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(35,LOG_ARRAYOK);

tr2= (FR_DOUBLEAY) FR_CALLOC((MAXPR+1),sizeof(FR_DOUBLE));
if(tr2 == NULL)
  {
  wlog88i2(36,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(36,LOG_ARRAYOK);

nep= (FR_INT4AY) FR_CALLOC((MAXPR+1),sizeof(FR_INT4));
if(nep == NULL)
  {
  wlog88i2(37,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(37,LOG_ARRAYOK);

noi= (FR_INT4AY) FR_CALLOC((MAXPR*8+1),sizeof(FR_INT4));
if(noi == NULL)
  {
  wlog88i2(38,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(38,LOG_ARRAYOK);

noffs= (FR_INT4AY) FR_CALLOC((MAXPR+1),sizeof(FR_INT4));
if(noffs == NULL)
  {
  wlog88i2(39,LOG_ARRAYNOTOK);
  fclose(fl2);
  return(AL_NOMEMY);
  }
else
  wlog88i2(39,LOG_ARRAYOK);

/***********************************************************************
* alles o.k. 
***********************************************************************/
RDYNMEM =   ((double)MAXGS+1.) *sizeof(FR_DOUBLE);     /* GS */
if(ICFLAG ==1)
  RDYNMEM+= ((double)MAXGS+1.) *sizeof(FR_DOUBLE);     /* CI */

RDYNMEM+=   ((double)MAXESM+1.)*sizeof(FR_DOUBLE);     /* se */
RDYNMEM+= 7*((double)MAXNFG+1.)*sizeof(FR_DOUBLE);     /* rs,fak,xi,xa,v,pk,zz*/
RDYNMEM+= 3*((double)MAXK+1.)  *sizeof(FR_DOUBLE);     /* x,y,z */
RDYNMEM+= 3*((double)MAXNEG+1.)*sizeof(FR_DOUBLE);     /* emod, rnue, qpara */
RDYNMEM+=   ((double)MAXNFG+1.)*sizeof(FR_INT4);       /* ip */
RDYNMEM+=   ((double)MAXGS+1.) *sizeof(FR_INT4);       /* iez */
RDYNMEM+=   ((double)MAXKOI+1.)*sizeof(FR_INT4);       /* koi */
RDYNMEM+= 2*((double)MAXK+1.)  *sizeof(FR_INT4);       /* ifrei, ioffs */
RDYNMEM+= 2*((double)MAXE+1.)  *sizeof(FR_INT4);       /* koffs, ityp */
RDYNMEM+= 3*((double)MAXNEG+1.)*sizeof(FR_INT4);       /* ivon,ibis,intord */
RDYNMEM+= 6*((double)MAXNEG+1.)*sizeof(FR_DOUBLE);     /* riyy,eyy,rizz,ezz,rit,wt */
RDYNMEM+=10*((double)MAXPR+1.) *sizeof(FR_INT4);       /* nep,noi,noffs */
RDYNMEM+= 3*((double)MAXPR+1.) *sizeof(FR_DOUBLE);     /* pres,tr1,tr2 */

IDYNMEM= (FR_INT4)(RDYNMEM/1048576.);   /* in MegaByte */
wlog88i2(IDYNMEM,LOG_SUMMEMY);
wlog88i2(0,LOG_EXITDYN88I2);

return(0);
}