root/src/readfrd.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 
   2 #include <stdlib.h>
   3 #include <math.h>
   4 #include <stdio.h>
   5 #include <string.h>
   6 #include <unistd.h>
   7 #include <fcntl.h>
   8 #include <ctype.h>
   9 
  10 #define     MAX_LINE_LENGTH 256
  11 #define     MAX_INTEGER 2147483647
  12 #define     MAX_FLOAT   1.e32
  13 
  14 typedef struct {
  15   char  model[MAX_LINE_LENGTH]; /* model-name header*/
  16   char  **uheader; /* user header */
  17   char  **pheader; /* project header (remark: leading dataset-project-headers are stored in the related dataset!) */
  18   ITG   u;         /* number of user headers */
  19   ITG   p;         /* number of project headers */
  20   ITG   n;         /* number of nodes */
  21   ITG   e;         /* number of elements  */
  22   ITG   f;         /* number of faces */
  23   ITG   g;         /* number of edges */
  24   ITG   t;         /* number of texts */
  25   ITG   sets;      /* sets (groups) of entities */
  26   ITG   mats;      /* materials   */
  27   ITG   amps;      /* amplitudes  */
  28   ITG   l;         /* number of loadcases (Datasets) */
  29   ITG   b;         /* number of nodeBlocks */
  30   ITG   c;         /* number of 'cuts' over all nodeBlocks (block-to-block interfaces for isaac) */
  31   ITG   etype[100];/* number of elements of a certain type */
  32   ITG   nmax;      /* maximum nodenumber */
  33   ITG   nmin;      /* minimum nodenumber */
  34   ITG   emax;      /* maximum elemnumber */
  35   ITG   emin;      /* minimum elemnumber */
  36   ITG   orignmax;  /* max-node-nr-of-original-nodes (w/o nodes for drawing purposes) */
  37   ITG   orign;     /* nr-of-original-nodes (w/o nodes for drawing purposes) */
  38   ITG   olc;       /* nr-of-original-loadcases (w/o cgx generated datasets (lc)) */
  39   ITG   noffs;     /* node-nr offset, defined with asgn */
  40   ITG   eoffs;     /* elem-nr offset, defined with asgn */
  41 } Summen;
  42 
  43 
  44 typedef struct {
  45   ITG   nr;              /*   external node-nr (node[node-indx].nr) */
  46   ITG   indx;            /*   node-index (node[ext-node-nr].indx)   */
  47   char  pflag;           /*   1 if used for display purposes    */
  48                          /*  -1 if the node is deleted          */
  49                          /*   0 default                         */
  50   double nx;             /*   coordinates  node[ext-node-nr].nx */
  51   double ny;
  52   double nz;
  53 } Nodes;
  54 
  55 typedef struct {
  56   ITG nr;                /* external element-nr */
  57   //  ITG indx;              /* -index (elem[external elem-nr].indx)   */
  58   ITG type;              /* element type (1:Hexa8)  */
  59   ITG group;
  60   ITG mat;
  61   ITG attr;              /* -1: unstructured mesh tr3u (-2 for mesh with libGLu tr3g ) */
  62                          /*  0: default           */
  63                          /*  1: reduced integration he8r he20r */
  64                          /*  2: incompatible modes he8i */
  65                          /*  3: DASHPOTA be2d */
  66                          /*  4: plane strain (CPE) tr3e tr6e qu4e qu8e */
  67                          /*  5: plane stress (CPS) tr3s */
  68                          /*  6: axisymmetric  (CAX) tr3c */
  69                          /*  7: fluid he8f */
  70                          /*  8: tet10m */
  71   ITG nod[27];
  72   double **side;         /* side[Nr.][x|y|z]== normal vector */
  73 } Elements;
  74 
  75 typedef struct {
  76   char  **pheader;    /* project header */
  77   ITG   npheader;              /* number of headers */
  78   char  **compName;
  79   char  **icname;
  80   char  name[MAX_LINE_LENGTH];
  81   char  dataset_name[MAX_LINE_LENGTH];
  82   char  dataset_text[MAX_LINE_LENGTH];
  83   char  analysis_name[MAX_LINE_LENGTH];
  84   float value;
  85   char  filename[MAX_LINE_LENGTH];
  86   FILE *handle;
  87   fpos_t *fileptr;
  88   ITG   loaded;       /* if data are stored:1 else: 0 */
  89   ITG format_flag;
  90   ITG analysis_type;
  91   ITG step_number;
  92   ITG ncomps;
  93   ITG irtype;
  94   ITG *menu;
  95   ITG *ictype;
  96   ITG *icind1;
  97   ITG *icind2;
  98   ITG *iexist;
  99   float **dat;        /* node related data */
 100   float ***edat;      /* element related data */
 101   float *max;         /* maximum datum */
 102   float *min;         /* minimum datum */
 103   ITG *nmax;          /* node with maximum datum */
 104   ITG *nmin;          /* node with minimum datum */
 105 } Datasets;
 106 
 107 void freeDatasets(Datasets *lcase, ITG nr);
 108 ITG readfrd(char *datin, Summen *anz, Nodes **nptr, Elements **eptr, Datasets **lptr, ITG read_mode );
 109 ITG readfrdblock( ITG lc, Summen *anz,   Nodes     *node, Datasets *lcase );
 110 ITG stoi(char *string, ITG a, ITG b);
 111 double stof(char *string, ITG a, ITG b);
 112 void stos(char *string, ITG a, ITG b, char *puffer);
 113 ITG compare (char *str1, char *str2, ITG length);
 114 ITG frecord( FILE *handle1,  char *string);
 115 ITG elemChecker(ITG sum_e, Nodes *node, Elements *elem);
 116 void v_result( double *A, double *B, double *C );
 117 void v_prod( double *A, double *B, double *C );
 118 double v_betrag(double *a);
 119 ITG strsplt( char *rec_str, char breakchar, char ***ptr);

/* [<][>][^][v][top][bottom][index][help] */