00001 #ifndef STOCHDRIVER_H 00002 #define STOCHDRIVER_H 00003 00004 #include <stdio.h> 00005 #include "alias.h" 00006 struct vector; 00007 #include "matrix.h" 00008 #include "fuzzygen.h" 00009 #include "fuzzynum.h" 00010 #include "iotools.h" 00011 00012 /** 00013 class stochdriver 00014 00015 this class controles stochastic computations 00016 00017 JK, TK 00018 */ 00019 00020 class stochdriver 00021 { 00022 public: 00023 stochdriver (); 00024 ~stochdriver (); 00025 00026 void compute_nprunknowns (); 00027 00028 void read (XFILE* in); 00029 void readtable (XFILE *in); 00030 void writetable (); 00031 00032 void changevalues (long sampleid); 00033 void assemble_new_values (long sampleid); 00034 void replace_values (); 00035 00036 void changematerials (long id,vector &val); 00037 void changecrsections (long id,vector &val); 00038 void changenodloads (long id,vector &val); 00039 00040 void extractor (); 00041 void save_results (long sampleid); 00042 00043 void diagpostproc (); 00044 00045 void update_auxparam (); 00046 00047 /* 00048 void give_new_invalues (double *buff); 00049 void save_new_invalues (double *buff); 00050 void give_new_outvalues (double *buff); 00051 void save_new_outvalues (double *buff); 00052 */ 00053 00054 /// name of auxiliary file 00055 char auxfilein[1001]; 00056 char auxfileout[1001]; 00057 00058 /// number of stochastic materials 00059 long nsmt; 00060 /// number of stochastic cross-sections 00061 long nscs; 00062 /// number of stochastic nodal loads 00063 long nsnl; 00064 00065 /// data about material types 00066 mattype *mt; 00067 long *idm; 00068 atsel *atm; 00069 00070 /// data about cross-section types 00071 crsectype *cst; 00072 long *idcs; 00073 atsel *atcs; 00074 00075 /// stochastic loaded nodes 00076 long *idln; 00077 atsel *atln; 00078 00079 /// number of samples 00080 long nsampl; 00081 /// number of stochastic variables 00082 long nstochvar; 00083 /// number of printed output variables 00084 long nprunknowns; 00085 00086 matrix stochtabin; 00087 matrix stochtabout; 00088 00089 00090 /// number of printed nodal displacements 00091 long npnd; 00092 /// array conatining numbers of nodes 00093 long *nna; 00094 /// numbers of particular DOFs 00095 atsel *pnd; 00096 00097 /// number of required eigenvectors 00098 long neigv; 00099 00100 /// number of elements with printed values 00101 long npev; 00102 /// array containing numbers of elements 00103 long *ena; 00104 /// description of printed values on elements 00105 atsel *ev; 00106 00107 00108 long ndispl,nelem; 00109 00110 00111 00112 00113 00114 00115 /// array of actual input variables 00116 double *avi; 00117 /// array of actual output variables 00118 double *avo; 00119 /// input stream; contains particular samples 00120 XFILE *datin; 00121 /// output stream; contains particular samples 00122 FILE *datout; 00123 00124 00125 /// generator of fuzzy numbers 00126 fuzzygen fg; 00127 /// output fuzzy numbers 00128 fuzzynum *fn; 00129 }; 00130 00131 #endif