00001 #ifndef PROBDESCT_H 00002 #define PROBDESCT_H 00003 00004 #include <stdio.h> 00005 #include "aliast.h" 00006 #include "galias.h" 00007 #include "gfunct.h" 00008 #include "timecontr.h" 00009 #include "hdbcontr.h" 00010 #include "slesolv.h" 00011 #include "nonlinmant.h" 00012 #include "iotools.h" 00013 #include "xfile.h" 00014 00015 /** 00016 class probdesc 00017 00018 it is one of the 5 most important classes of the program 00019 (probdesc, transtop, transmat, transbclc, transcrsec) 00020 00021 class contains general information about solved problem 00022 */ 00023 00024 class probdesct 00025 { 00026 public: 00027 probdesct (void); 00028 ~probdesct (void); 00029 void read (XFILE *in); 00030 void print (FILE *out); 00031 long give_var_dofid(namevart var); 00032 00033 00034 00035 char *path; 00036 char *filename; 00037 char *suffix; 00038 00039 /// keyword processing option 00040 pkwd_sw kwdsw; 00041 00042 /// problem name 00043 char name[1001]; 00044 00045 /// type of problem 00046 problemtypet tprob; 00047 00048 /// type of transported matter 00049 transmattert tmatt; 00050 /// number of transported matters=number of row(column) blocks in matrices 00051 long ntm; 00052 00053 /// total number of known(=implemented) primary variables(= nodal unknowns) 00054 static const long tnkv = sizeof(namevartstr)/sizeof(*namevartstr); 00055 00056 /** array of dof indices for individual known(=implemented) primary variables(= nodal unknowns) 00057 var_dofid[int(namevart)] = <0;ntm-1> <=> dof id at node for the given name(=namevart) of nodal unknown 00058 = -1 if the given name(=namevart) is not defined in the problem*/ 00059 long var_dofid[tnkv]; 00060 00061 /** array with ordered names of used primary variables(= nodal unknowns) 00062 dofname[i] = name of i-th nodal unknown*/ 00063 namevart *dofname; 00064 00065 /// names of transported media 00066 mednamest mednam; 00067 /// array of scales of transported media 00068 double *scale; 00069 00070 /// data about solver of system of nonlinear equations 00071 nonlinmant nlman; 00072 00073 /// gravity acceleration is taken into account 00074 gravityaccelerationt tgravity; 00075 double gr1,gr2,gr3; 00076 00077 /// geometrical dimension 00078 long gdim; 00079 /// savemode - deals with the number of integration points 00080 /// savemode=0 - greater number of integration points 00081 /// savemode=1 - smaller number of integration points 00082 long savemode; 00083 00084 /// type of transport solver 00085 /// trsolv = 1 - full newton method (matrices are recomputed in all internal loops) 00086 /// trsolv = 2 - modified Newton method (matrices are recomputed only in new increment) 00087 transpsolver trsolv; 00088 00089 /// type of residuum computation 00090 /// trestype = 1 - residuum is computed from internal fluxes 00091 /// trestype = 2 - residuum is computed as difference between right and left hand side 00092 transpresiduumtype trestype; 00093 00094 /// convergence control for full newton-raphson 00095 /// yes = 1 00096 /// no = 0 00097 answertype convergcontrolt; 00098 00099 // STORAGE TYPE 00100 /// type of storage of conductivity matrix 00101 storagetype tstorkm; 00102 /// type of storage of capacity matrix 00103 storagetype tstorcm; 00104 00105 /// diagonalization of capacity matrix 00106 long diagcap; 00107 00108 /// data about solver of system of linear equations 00109 slesolv *ssle; 00110 00111 /// time controller 00112 timecontr timecont; 00113 /// time 00114 double time; 00115 /// index of actual time step 00116 long istep; 00117 /// index of actual iteration step (Newton-Raphson) 00118 long jstep; 00119 00120 /// threshold for rejection from compressed storages 00121 double limit; 00122 /// computer zero 00123 double zero; 00124 /// threshold for the size of the right hand side %vector 00125 double *threshrhs; 00126 00127 /// definition of homogenization 00128 /// homogt = 0 - homogenization is switched off 00129 /// homogt = 1 - homogenization is switched on, homogenization is computed on a single processor 00130 /// homogt = 2 - homogenization is performed on a parallel computer 00131 long homogt; 00132 00133 /// type of macro-micro problem correspondence 00134 /// mami=1 - elements are connected with microproblems 00135 /// mami=2 - aggregates of elements are connected with microproblems, each element from the aggregate sends its own data 00136 /// mami=3 - aggregates of elements are connected with microproblems, values from elements are averaged and one packet of data is sent to microproblem 00137 macromicrotype mami; 00138 00139 00140 /***************************/ 00141 /* non-stationary solver */ 00142 /***************************/ 00143 00144 /// coefficient alpha 00145 /// alpha=0.0 - explicit algorithm 00146 /// alpha=1/2 - Crank-Nicholson scheme 00147 /// alpha=1.0 - implicit algorithm 00148 double alpha; 00149 00150 /// required error in Newton-Raphson method 00151 double err; 00152 double *errarr; 00153 /// maximum number of inner iterations in Newton-Rapson method 00154 long nii; 00155 00156 /// stochastic calculation indicator 00157 long stochasticcalc; 00158 00159 00160 /// compute gradients 00161 /// gradcomp=0 - gradients are not computed 00162 /// gradcomp=1 - gradients are computed 00163 long gradcomp; 00164 /// compute fluxes 00165 /// fluxcomp=0 - fluxes are not computed 00166 /// fluxcomp=1 - fluxes are computed 00167 long fluxcomp; 00168 /// compute other values 00169 /// othercomp=0 - values from array other are not computed 00170 /// othercomp=1 - values from array other are computed 00171 long othercomp; 00172 /// compute eq_other values 00173 /// eqothercomp=0 - values from array eqother are not computed 00174 /// eqothercomp=1 - values from array eqother are computed 00175 long eqothercomp; 00176 00177 /// gradient averaging 00178 /// gradaver=0 - components of other array are not averaged 00179 /// gradaver=1 - components of other array are averaged, arithmetic average is used 00180 /// gradaver=2 - components of other array are averaged, volume average is used 00181 long gradaver; 00182 /// flux averaging 00183 /// fluxaver=0 - components of other array are not averaged 00184 /// fluxaver=1 - components of other array are averaged, arithmetic average is used 00185 /// fluxaver=2 - components of other array are averaged, volume average is used 00186 long fluxaver; 00187 /// other values averaging 00188 /// otheraver=0 - components of other array are not averaged 00189 /// otheraver=1 - components of other array are averaged, arithmetic average is used 00190 /// otheraver=2 - components of other array are averaged, volume average is used 00191 long otheraver; 00192 /// eqother values averaging 00193 /// eqotheraver=0 - components of other array are not averaged 00194 /// eqotheraver=1 - components of other array are averaged, arithmetic average is used 00195 /// eqotheraver=2 - components of other array are averaged, volume average is used 00196 long eqotheraver; 00197 00198 /// position where gradients are computed 00199 /// gradpos = 1 - integration points 00200 /// gradpos = 2 - nodes, values are copied from the closest integration point 00201 /// gradpos = 3 - nodes, values are computed at nodes 00202 long gradpos; 00203 00204 /// position where fluxes are computed 00205 /// fluxpos = 1 - integration points 00206 /// fluxpos = 2 - nodes, values are copied from the closest integration point 00207 /// fluxpos = 3 - nodes, values are computed at nodes 00208 long fluxpos; 00209 00210 /// position where other are computed 00211 /// otherpos = 1 - integration points 00212 /// otherpos = 2 - nodes, values are copied from the closest integration point 00213 /// otherpos = 3 - nodes, values are computed at nodes 00214 long otherpos; 00215 00216 /// position where eqother are computed 00217 /// eqotherpos = 1 - integration points 00218 /// eqotherpos = 2 - nodes, values are copied from the closest integration point 00219 /// eqotherpos = 3 - nodes, values are computed at nodes 00220 long eqotherpos; 00221 00222 /// adaptivity calculation indicator 00223 /// adaptivity == 0 - no adaptivity calculation 00224 /// adaptivity == 1 - adaptivity calculation - SPR type 00225 /// adaptivity == 2 - adaptivity calculation - Z2 type 00226 long adaptivityflag; 00227 00228 /// storage of actual nodal values on nodes 00229 /// nvs=0 - actual nodal values are not stored 00230 /// nvs=1 - actual nodal values are stored 00231 long nvs; 00232 /// storage of initial nodal values on nodes 00233 /// invs=0 - initial nodal values are not stored 00234 /// invs=1 - initial nodal values are stored 00235 long invs; 00236 /// storage of nodal values from previous time step on nodes 00237 /// pnvs=0 - previous nodal values are not stored 00238 /// pnvs=1 - previous nodal values are stored 00239 long pnvs; 00240 /// storage of time derivative of nodal values on nodes 00241 /// tdnvs=0 - time derivative of nodal values are not stored 00242 /// tdnvs=1 - time derivative of nodal values are stored 00243 long tdnvs; 00244 00245 /// type of time printing 00246 timetypeprint tprt; 00247 00248 00249 /// number of simulation 00250 long ns; 00251 00252 /// backup controler 00253 hdbcontr hdbcont; 00254 }; 00255 00256 #endif