00001 #ifndef TRANSMAT_H
00002 #define TRANSMAT_H
00003
00004 #include <stdio.h>
00005 #include "iotools.h"
00006 #include "aliast.h"
00007 #include "selection.h"
00008 #include "intpointst.h"
00009 #include "isotrmat.h"
00010 #include "sejtkrmat.h"
00011 #include "nlisotrmat.h"
00012 #include "cerny_concrete.h"
00013 #include "damisotrmat.h"
00014 #include "bazped.h"
00015 #include "baroghelB.h"
00016 #include "concreteB.h"
00017 #include "pedersen.h"
00018 #include "carbmat1.h"
00019 #include "carbmat1.h"
00020 #include "dampermeability.h"
00021 #include "kunzel.h"
00022 #include "kunzel2.h"
00023 #include "glasgowmat.h"
00024 #include "genfile.h"
00025 #include "C60baroghel.h"
00026 #include "C30baroghel.h"
00027 #include "o30bazant.h"
00028 #include "C60bazant.h"
00029 #include "C30bazant.h"
00030 #include "saltmat1.h"
00031 #include "saltmat2.h"
00032 #include "saltmat3.h"
00033 #include "saltmat4.h"
00034 #include "grunewaldmat.h"
00035 #include "aepointst.h"
00036 #include "soil1mat.h"
00037 #include "discisotrmat.h"
00038 #include "cemhydmat.h"
00039 #include "devriesmat.h"
00040 #include "lincoupmat.h"
00041 #include "discmat.h"
00042 #include "consol_awf1.h"
00043 #include "consol_awf2.h"
00044 #include "millymat.h"
00045 #include "homogmat.h"
00046 #include "radiationmat.h"
00047 #include "richards.h"
00048 #include "moistheat.h"
00049
00050 class transmat
00051 {
00052 public:
00053 transmat (void);
00054 ~transmat (void);
00055
00056
00057
00058
00059
00060
00061
00062 long intpnum (void);
00063
00064
00065 void readip (FILE *in);
00066
00067
00068 void intpointalloc ();
00069
00070
00071 void alloc_nontransq(long n);
00072
00073
00074 void intpointinit ();
00075
00076
00077 void assemble_dof_nameord(namevart *dofname, long ntm, long *var_dofid, long tnkv);
00078
00079
00080 void give_dof_names(long ipp, namevart *dofname, long ntm);
00081
00082
00083 void read (XFILE *in);
00084
00085
00086 void print (FILE *out);
00087
00088
00089 void readmatchar (XFILE *in);
00090
00091
00092 void readmattype(XFILE *in, mattypet mtype, long numt);
00093
00094
00095 void printmatchar (FILE *out, mattypet mt, long numinst);
00096
00097
00098 void initmaterialmodels (void);
00099
00100
00101 void initvalues (long ipp,long im,long ido);
00102
00103
00104 void updateipval (void);
00105
00106
00107 void updateipvalmat (long ipp,long im,long ido);
00108
00109
00110
00111
00112
00113 void matcond (matrix &d,long ipp,long ri,long ci);
00114
00115
00116 void matcond2 (matrix &d,long ipp,long ri,long ci);
00117
00118
00119 double capcoeff (long ipp,long ri,long ci);
00120
00121
00122 void volume_rhs (matrix &d,long ipp,long ri,long ci,long ncomp);
00123
00124
00125 void computenlfluxes (long lcid,long ipp);
00126
00127
00128 void flux_contributions (long ipp);
00129
00130
00131 void transmission_transcoeff(double &new_trc,double trc,long ri,long ci,long nn,long bc,long ipp);
00132
00133
00134 void transmission_transcoeff(double &new_trc,double trc,long ri,long ci,long nn,long bc,long ipp,int flag);
00135
00136
00137 void transmission_nodval(double &new_nodval,double nodval,double trc2,long ri,long ci,long nid,long bc,long ipp);
00138
00139
00140 void transmission_flux(double &flux,double nodval,double trc2,long ri,long ci,long nn,long bc,long ipp);
00141
00142
00143 void values_correction (vector &nv,long ipp);
00144
00145
00146 void values_transformation (mattypet mti,long idmi,double *inv,
00147 double *iinv,mattypet mto,long idmo,double *outv,double *ioutv,double *jum);
00148
00149 void fluxcomparing (long ipp);
00150
00151
00152 void aux_values (long lcid);
00153
00154 void mat_aux_values (long ipp);
00155
00156
00157 double give_extinction_coeff (mattypet mt,long matid);
00158
00159
00160
00161
00162
00163
00164 void storegrad (long lcid,long ipp,vector &gr);
00165
00166
00167 void givegrad (long lcid,long ipp,vector &gr);
00168
00169
00170 void storeflux (long lcid,long ipp,vector &fl);
00171
00172
00173 void givefluxes (long lcid,long ipp,vector &fl);
00174
00175
00176 void storeother (long ipp,long ncomp,double *comp);
00177
00178
00179 void storeeqother (long ipp,long ncompeq,double *compeq);
00180
00181
00182 void giveother (long ipp,long ncomp,double *comp);
00183
00184
00185 void giveeqother (long ipp,long ncompeq,double *compeq);
00186
00187
00188 long givencompother ();
00189
00190
00191 long givencompeqother (long ipp,long im);
00192
00193
00194 double givecompother(long compother,long ipp,double *r);
00195
00196
00197 void give_othervalue_name(FILE *out,long ipp,long compother);
00198
00199
00200 void give_eqothervalue_name(FILE *out,long ipp,long compeqother);
00201
00202
00203 double give_temperature (long ipp);
00204
00205
00206 double give_inittemperature (long ipp);
00207
00208
00209 double give_rel_hum (long ipp);
00210
00211
00212 double givetransq(nonmechquant qt, long ipp);
00213
00214
00215 double give_water_pressure(long ipp);
00216
00217
00218 double give_pore_pressure(long ipp);
00219
00220
00221 double give_suction(long ipp);
00222
00223
00224 double give_saturation_degree(long ipp);
00225
00226
00227 double give_vol_moist_cont(long ipp);
00228
00229
00230 double give_nodal_vol_moist_cont (long nid,long mattype);
00231
00232
00233 double give_nodal_sat_vol_moist_cont (long nid,long mattype);
00234
00235
00236 double give_nodal_rel_hum (long nid,long mattype);
00237
00238
00239
00240
00241
00242
00243 long search_reqntq(nontransquant* &rntq);
00244
00245
00246 void give_reqntq(long ipp, long *antq);
00247
00248
00249 double givenontransq (nontransquant qt, long ipp);
00250
00251
00252 void storenontransq (nontransquant qt, long ipp, double val);
00253
00254
00255 long givestatusntq (nontransquant qt);
00256
00257
00258 long givenontransqid (nontransquant qt);
00259
00260
00261
00262
00263
00264
00265
00266 long cycle_detection (double *r,double *pr,double *ppr,long ipp);
00267
00268
00269 void save_intpointst_txt (FILE *aux, sel &selelems, sel *selother);
00270
00271
00272 void save_intpointst_txt (long ni, sel &selelems, sel *selother);
00273
00274
00275 void save_intpointst_bin (FILE *aux, sel &selelems, sel *selother);
00276
00277
00278 void save_intpointst_bin (long ni, sel &selelems, sel *selother);
00279
00280
00281 void restore_intpointst_txt (FILE *aux, sel &selelems, sel *selother, long **selid);
00282
00283
00284 void restore_intpointst_txt (sel &selelems, sel *selother, long **selid);
00285
00286
00287 void restore_intpointst_bin (FILE *aux, sel &selelems, sel *selother, long **selid);
00288
00289
00290 void restore_intpointst_bin (sel &selelems, sel *selother, long **selid);
00291
00292
00293
00294
00295 long nmt;
00296
00297 mattypet *mattype;
00298
00299 long *numtype;
00300
00301 long tnip;
00302
00303 intpointst *ip;
00304
00305
00306 long *elip;
00307
00308
00309
00310
00311
00312
00313
00314 isotrmat *itrm;
00315
00316
00317 nlisotrmat *nlitrm;
00318
00319 homogmat *hommat;
00320
00321
00322 damisotrmat *damitrm;
00323
00324
00325 sejtkrmat *sejtkrm;
00326 con_awf1mat *consol_awf1;
00327
00328
00329
00330 discisotrmat *ditrm;
00331
00332 carbmat1 *carb1;
00333
00334
00335 cernymat *cernym;
00336
00337
00338
00339 kunmat *kun;
00340 kunmat2 *kun2;
00341 grunewaldmat *grunw;
00342 bazpedmat *bazped;
00343 pedmat *ped;
00344 devriesmat *dvries;
00345 discmat *sdmat;
00346 con_awf2mat *consol_awf2;
00347 millymat *mill;
00348 moistheatmat *moisth;
00349
00350 baroghelmat *baroghel;
00351 concreteBmat *concrete;
00352 C60barmat *C60baroghel;
00353 C30barmat *C30baroghel;
00354 o30bazmat *o30bazant;
00355 C60bazmat *C60bazant;
00356 C30bazmat *C30bazant;
00357 glasgowmat *tench;
00358
00359 dampermeability *damper;
00360
00361
00362
00363 saltmat1 *salt1;
00364
00365
00366 saltmat2 *salt2;
00367 saltmat3 *salt3;
00368
00369 saltmat4 *salt4;
00370
00371 radiationmat *radmat;
00372 richards *richar;
00373
00374 soil1mat *soil1;
00375
00376
00377 cemhydmat *cemhydr;
00378
00379
00380 lincoupmat *lcmat;
00381
00382
00383
00384 aepointst grad,flux;
00385
00386
00387
00388
00389 double *initval;
00390
00391
00392 double **nontransq;
00393
00394 long nntq;
00395
00396 static const long tnkntq = sizeof(nontransquantstr)/sizeof(*nontransquantstr);
00397
00398 long ntqid[tnkntq];
00399
00400 nontransquant *ntqo;
00401 };
00402
00403 #endif