00001 #include "probdesct.h"
00002 #include "globalt.h"
00003 #include "aggregator.h"
00004 #include <string.h>
00005 #include "intools.h"
00006 #include "iotools.h"
00007 #include "gmatrix.h"
00008 #include "adaptivityt.h"
00009
00010
00011 probdesct::probdesct (void)
00012 {
00013 long i;
00014
00015 kwdsw = nokwd;
00016
00017
00018 ntm=0;
00019
00020 tmatt=nomedium;
00021
00022 mednam=heat;
00023
00024
00025 for (i=0; i<tnkv; i++)
00026 var_dofid[i] = -1;
00027
00028
00029 dofname = NULL;
00030
00031
00032 savemode=1;
00033
00034
00035 trsolv=fullnewtont;
00036
00037
00038
00039 trestype=lrhst;
00040
00041
00042
00043 convergcontrolt=no;
00044
00045 tstorkm = (storagetype) 0;
00046 tstorcm = (storagetype) 0;
00047
00048 adaptivityflag=0;
00049
00050 limit=0.0; zero=1.0e-20;
00051
00052 time=0.0; alpha=1.0;
00053 istep = 0;
00054 jstep = 0;
00055
00056 err=0.0; nii=0;
00057 errarr = NULL;
00058 threshrhs = NULL;
00059
00060 stochasticcalc=0;
00061 diagcap=0;
00062
00063 gdim=0;
00064 scale=NULL;
00065
00066 tgravity = gr_no;
00067 gr1 = gr2 = gr3 = 0.0;
00068
00069
00070 gradcomp = 0;
00071
00072 fluxcomp = 0;
00073
00074 othercomp = 0;
00075
00076 eqothercomp = 0;
00077
00078
00079 gradaver = 0;
00080
00081 fluxaver = 0;
00082
00083 otheraver = 0;
00084
00085 eqotheraver = 0;
00086
00087
00088 gradpos = 0;
00089
00090 fluxpos = 0;
00091
00092 otherpos = 0;
00093
00094 eqotherpos = 0;
00095
00096
00097 nvs=0;
00098
00099 pnvs=0;
00100
00101 invs=0;
00102
00103 tdnvs=0;
00104
00105
00106 homogt=0;
00107
00108 mami = (macromicrotype) 0;
00109
00110
00111 memset (name,0,sizeof(*name)*1001);
00112 path = filename = suffix = NULL;
00113
00114
00115
00116 tprt = secondst;
00117
00118
00119 ssle = new slesolv();
00120
00121
00122 hdbcont.hdbtype = nohdb;
00123 hdbcont.hdbfmtr = text;
00124 hdbcont.hdbfmts = text;
00125 hdbcont.hdbnames[0] = 0;
00126 hdbcont.hdbnamer[0] = 0;
00127 hdbcont.prec=15;
00128 hdbcont.selother_r = NULL;
00129 hdbcont.selother_s = NULL;
00130 hdbcont.selother_id = NULL;
00131 }
00132
00133 probdesct::~probdesct (void)
00134 {
00135 delete [] errarr;
00136 delete [] threshrhs;
00137 delete [] scale;
00138
00139 delete [] path;
00140 delete [] filename;
00141 delete [] suffix;
00142 delete ssle;
00143 delete [] dofname;
00144 }
00145
00146
00147
00148
00149
00150
00151
00152 void probdesct::read (XFILE *in)
00153 {
00154 long i;
00155
00156
00157 xfscanf (in,"% a",name);
00158
00159
00160 Mesprt=0;
00161 xfscanf (in,"%k%ld","mesprt",&Mesprt);
00162 if (Mesprt==1) fprintf (stdout,"\n detail information will be printed\n");
00163 else fprintf (stdout,"\n only important messages will be printed\n");
00164
00165
00166 xfscanf (in,"%k%m","problemtype",&problemtypet_kwdset,(int*)&tprob);
00167
00168
00169 xfscanf (in,"%k%m","transmatter",&transmattert_kwdset,(int*)&tmatt);
00170 switch (tmatt){
00171 case onemedium:{ ntm=1; break; }
00172 case twomediacoup:{ ntm=2; break; }
00173 case threemediacoup:{ ntm=3; break; }
00174 case fourmediacoup:{ ntm=4; break; }
00175 default:{
00176 print_err("unknown type of transported matter is required",__FILE__,__LINE__,__func__);
00177 }
00178 }
00179
00180
00181 xfscanf (in,"%k%m","mednames",&mednamest_kwdset,(int*)&mednam);
00182
00183
00184 scale = new double[ntm];
00185 memset(scale, 0, sizeof(*scale)*ntm);
00186
00187
00188 dofname = new namevart[ntm];
00189 memset(dofname, 0, sizeof(*dofname)*ntm);
00190
00191 xfscanf(in,"%k","scale");
00192 for (i=0; i<ntm; i++)
00193 xfscanf (in,"%lf",scale+i);
00194
00195
00196
00197
00198 xfscanf (in,"%k%ld","gradcomp",&gradcomp);
00199 if (gradcomp!=0 && gradcomp!=1)
00200 print_err("\n\n wrong identification of gradient computation", __FILE__,__LINE__, __func__);
00201 if (gradcomp==1) {
00202 xfscanf (in,"%k%m%k%ld","gradpos", &elempositiont_kwdset, &gradpos, "gradaver", &gradaver);
00203
00204 if (gradpos!=1 && gradpos!=2 && gradpos!=3){
00205 print_err("wrong definition of position where gradients are computed", __FILE__, __LINE__,__func__);
00206 }
00207 if (gradaver!=0 && gradaver!=1 && gradaver!=2)
00208 print_err("\n\n wrong identification of gradient averaging",__FILE__,__LINE__,__func__);
00209 }
00210
00211 if (Mesprt==1){
00212 if (gradcomp==0) fprintf (stdout,"\n gradients will not be computed and stored");
00213 else{
00214 fprintf (stdout,"\n gradients will be computed and stored");
00215 if (gradpos==1) fprintf (stdout,"\n gradients will be computed at integration points");
00216 if (gradpos==2) fprintf (stdout,"\n gradients will be copied to nodes from the closest integration point");
00217 if (gradpos==3) fprintf (stdout,"\n gradients will be computed at nodes");
00218
00219 if (gradaver==0) fprintf (stdout,"\n gradients will not be averaged");
00220 if (gradaver==1) fprintf (stdout,"\n gradients will be averaged at nodes");
00221 }
00222 }
00223
00224
00225
00226
00227
00228 xfscanf (in,"%k%ld","fluxcomp",&fluxcomp);
00229 if (fluxcomp!=0 && fluxcomp!=1)
00230 print_err("\n\n wrong identification of flux computation", __FILE__,__LINE__, __func__);
00231 if (fluxcomp==1) {
00232 xfscanf (in,"%k%m%k%ld","fluxpos", &elempositiont_kwdset, &fluxpos, "fluxaver", &fluxaver);
00233
00234 if (fluxpos!=1 && fluxpos!=2 && fluxpos!=3){
00235 print_err("wrong definition of position where fluxes are computed", __FILE__, __LINE__,__func__);
00236 }
00237 if (fluxaver!=0 && fluxaver!=1 && fluxaver!=2)
00238 print_err("\n\n wrong identification of flux averaging",__FILE__,__LINE__,__func__);
00239 }
00240
00241 if (Mesprt==1){
00242 if (fluxcomp==0) fprintf (stdout,"\n fluxes will not be computed and stored");
00243 else{
00244 fprintf (stdout,"\n fluxes will be computed and stored");
00245 if (fluxpos==1) fprintf (stdout,"\n fluxes will be computed at integration points");
00246 if (fluxpos==2) fprintf (stdout,"\n fluxes will be copied to nodes from the closest integration point");
00247 if (fluxpos==3) fprintf (stdout,"\n fluxes will be computed at nodes");
00248
00249 if (fluxaver==0) fprintf (stdout,"\n fluxes will not be averaged");
00250 if (fluxaver==1) fprintf (stdout,"\n fluxes will be averaged at nodes");
00251 }
00252 }
00253
00254
00255
00256
00257 xfscanf (in,"%k%ld","othercomp", &othercomp);
00258 if (othercomp!=0 && othercomp!=1)
00259 print_err("wrong definition of other values computation", __FILE__, __LINE__, __func__);
00260 if (othercomp==1){
00261 xfscanf (in,"%k%ld%k%ld","otherpos", &otherpos, "otheraver", &otheraver);
00262
00263 if (otherpos!=1 && otherpos!=2 && otherpos!=3){
00264 print_err("wrong definition of position where other are computed", __FILE__, __LINE__, __func__);
00265 }
00266 if (otheraver!=0 && otheraver!=1 && otheraver!=2)
00267 print_err("wrong definition of other averaging", __FILE__, __LINE__, __func__);
00268 }
00269
00270 if (Mesprt==1){
00271 if (othercomp==1){
00272 fprintf (stdout,"\n other will be computed and stored");
00273 if (otherpos==1) fprintf (stdout,"\n other will be computed at integration points");
00274 if (otherpos==2) fprintf (stdout,"\n other will be copied to nodes from the closest integration point");
00275 if (otherpos==3) fprintf (stdout,"\n other will be computed at nodes");
00276
00277 if (otheraver==0) fprintf (stdout,"\n other will not be averaged");
00278 if (otheraver==1) fprintf (stdout,"\n other will be averaged at nodes");
00279 }
00280 else
00281 fprintf (stdout,"\n other will not be computed and stored");
00282 }
00283
00284
00285
00286
00287
00288 xfscanf (in,"%k%ld","eqothercomp", &eqothercomp);
00289 if (eqothercomp!=0 && eqothercomp!=1)
00290 print_err("wrong definition of eqother values computation", __FILE__, __LINE__, __func__);
00291 if (eqothercomp==1){
00292 xfscanf (in,"%k%ld%k%ld","eqotherpos", &eqotherpos, "eqotheraver", &eqotheraver);
00293
00294 if (eqotherpos!=1 && eqotherpos!=2 && eqotherpos!=3){
00295 print_err("wrong definition of position where eqother are computed", __FILE__, __LINE__, __func__);
00296 }
00297 if (eqotheraver!=0 && eqotheraver!=1 && eqotheraver!=2)
00298 print_err("wrong definition of eqother averaging", __FILE__, __LINE__, __func__);
00299 }
00300
00301 if (Mesprt==1){
00302 if (eqothercomp==1){
00303 fprintf (stdout,"\n eqother will be computed and stored");
00304 if (eqotherpos==1) fprintf (stdout,"\n eqother will be computed at integration points");
00305 if (eqotherpos==2) fprintf (stdout,"\n eqother will be copied to nodes from the closest integration point");
00306 if (eqotherpos==3) fprintf (stdout,"\n eqother will be computed at nodes");
00307
00308 if (eqotheraver==0) fprintf (stdout,"\n eqother will not be averaged");
00309 if (eqotheraver==1) fprintf (stdout,"\n eqother will be averaged at nodes");
00310 }
00311 else
00312 fprintf (stdout,"\n eqother will not be computed and stored");
00313 }
00314
00315
00316 xfscanf (in,"%k%m","gravityacceleration",&gravityaccelerationt_kwdset,(int*)&tgravity);
00317
00318 if(tgravity == gr_yes){
00319 xfscanf (in,"%lf %lf %lf",&gr1,&gr2,&gr3);
00320 }
00321
00322
00323
00324
00325 xfscanf (in,"%k%ld","adaptivity",&adaptivityflag);
00326 if (adaptivityflag) {
00327 Adat = new adaptivityt();
00328 Adat->readinit(in);
00329 }
00330
00331
00332
00333
00334
00335
00336
00337
00338 xfscanf (in,"%k%ld","stochasticcalc",&stochasticcalc);
00339
00340
00341
00342
00343
00344
00345
00346 xfscanf (in,"%k%ld","homogenization",&homogt);
00347 if (Mesprt==1){
00348 if (homogt==0)
00349 fprintf (stdout,"\n homogenization will not be computed");
00350 if (homogt!=0)
00351 fprintf (stdout,"\n homogenization will be computed");
00352 }
00353 if (homogt==2){
00354
00355
00356
00357 xfscanf (in,"%k%ld","macmiccorres",&mami);
00358 Gtt->rst=1;
00359 }
00360
00361
00362
00363
00364
00365 xfscanf (in,"%k%m","noderenumber",&noderenumb_kwdset,(int*)&Gtt->nodren);
00366 if (Mesprt==1){
00367 switch (Gtt->nodren){
00368 case no_renumbering:{
00369 fprintf (stdout,"\n nodes will not be renumbered");
00370 break;
00371 }
00372 case rev_cuthill_mckee:{
00373 fprintf (stdout,"\n nodes will be renumbered by reverse Cuthill-McKee algorithm");
00374 break;
00375 }
00376 default:{
00377 print_err("unknown type of node reordering is required",__FILE__,__LINE__,__func__);
00378 }
00379 }
00380 }
00381
00382
00383 switch (tprob){
00384
00385
00386
00387 case stationary_problem:{
00388 if (Mesprt==1) fprintf (stdout,"\n linear stationary problem");
00389
00390
00391 xfscanf (in,"%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm);
00392
00393
00394 ssle->read (Gtt,in,Mesprt);
00395
00396 break;
00397 }
00398
00399
00400
00401
00402 case nonlinear_stationary_problem:{
00403 if (Mesprt==1) fprintf (stdout,"\n nonlinear stationary problem");
00404
00405
00406 nlman.read (in,Mesprt);
00407
00408
00409 xfscanf (in,"%k%m","residuumcomputationtype",&transpresiduumtype_kwdset,(int*)&trestype);
00410
00411
00412 xfscanf (in,"%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm);
00413
00414
00415 ssle->read (Gtt,in,Mesprt);
00416
00417 break;
00418 }
00419
00420
00421
00422
00423 case nonstationary_problem:{
00424 if (Mesprt==1) fprintf (stdout,"\n linear nonstationary problem");
00425
00426
00427 timecont.read (in);
00428
00429 xfscanf (in,"%k%m","timetypeprint", &timetypeprint_kwdset, &tprt);
00430
00431
00432 hdbcont.read(in);
00433 if ((Mesprt==1) && hdbcont.hdbtype)
00434 fprintf(stdout, "\n backup will be performed %d", hdbcont.hdbtype);
00435
00436 xfscanf (in,"%k%lf","alpha_integration", &alpha);
00437
00438 xfscanf (in,"%k%m%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm,"capacmatstor",&storagetype_kwdset,(int*)&tstorcm);
00439
00440
00441 ssle->read (Gtt,in,Mesprt);
00442
00443
00444 xfscanf (in,"%k%ld","diagonalization",&diagcap);
00445
00446 break;
00447 }
00448
00449
00450
00451
00452 case growing_np_problem:{
00453 if (Mesprt==1) fprintf (stdout,"\n nonstationary problem with growing number of elements");
00454
00455
00456 timecont.read (in);
00457
00458 xfscanf (in,"%k%m","timetypeprint", &timetypeprint_kwdset, &tprt);
00459
00460
00461 hdbcont.read(in);
00462 if ((Mesprt==1) && hdbcont.hdbtype)
00463 fprintf(stdout, "\n backup will be performed %d", hdbcont.hdbtype);
00464
00465 xfscanf (in,"%k%lf","alpha_integration", &alpha);
00466
00467 xfscanf (in,"%k%m%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm,"capacmatstor",&storagetype_kwdset,(int*)&tstorcm);
00468
00469
00470 ssle->read (Gtt,in,Mesprt);
00471
00472
00473 xfscanf (in,"%k%ld","diagonalization",&diagcap);
00474
00475
00476 Gtt->dofcontr=1;
00477
00478
00479 nvs=1;
00480
00481 invs=1;
00482
00483 tdnvs=1;
00484
00485 break;
00486 }
00487
00488
00489
00490
00491 case nonlinear_nonstationary_problem:{
00492 if (Mesprt==1) fprintf (stdout,"\n nonlinear nonstationary problem");
00493
00494
00495 timecont.read (in);
00496
00497 xfscanf (in,"%k%m","timetypeprint", &timetypeprint_kwdset, &tprt);
00498 fprintf(stdout, "\n time printing will be in %d", tprt);
00499
00500
00501 hdbcont.read(in);
00502 if ((Mesprt==1) && hdbcont.hdbtype)
00503 fprintf(stdout, "\n backup will be performed %d", hdbcont.hdbtype);
00504 else
00505 fprintf(stdout, "\n backup will not be performed = %d", hdbcont.hdbtype);
00506
00507 errarr = new double [ntm];
00508 threshrhs = new double [ntm];
00509
00510
00511 xfscanf (in,"%k%lf %ld","alpha_integration", &alpha,&nii);
00512
00513 for (i=0;i<ntm;i++){
00514 xfscanf (in,"%lf %lf",errarr+i,threshrhs+i);
00515 }
00516
00517
00518
00519 xfscanf (in,"%k%m","transportsolvertype",&transpsolver_kwdset,(int*)&trsolv);
00520
00521
00522 xfscanf (in,"%k%m","residuumcomputationtype",&transpresiduumtype_kwdset,(int*)&trestype);
00523
00524
00525 xfscanf (in,"%k%m","convergencecontrol",&answertype_kwdset,(int*)&convergcontrolt);
00526
00527
00528 xfscanf (in,"%k%m%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm,"capacmatstor",&storagetype_kwdset,(int*)&tstorcm);
00529
00530
00531 ssle->read (Gtt,in,Mesprt);
00532
00533
00534 xfscanf (in,"%k%ld","diagonalization",&diagcap);
00535
00536
00537 break;
00538 }
00539
00540
00541
00542
00543 case growing_np_problem_nonlin:{
00544 if (Mesprt==1) fprintf (stdout,"\n nonlinear nonstationary problem with growing number of elements");
00545
00546
00547 timecont.read (in);
00548
00549 xfscanf (in,"%k%m","timetypeprint", &timetypeprint_kwdset, &tprt);
00550
00551
00552 hdbcont.read(in);
00553 if ((Mesprt==1) && hdbcont.hdbtype)
00554 fprintf(stdout, "\n backup will be performed %d", hdbcont.hdbtype);
00555
00556 xfscanf (in,"%k%lf %lf %lf %ld","alpha_integration",&alpha,&err,&threshrhs,&nii);
00557
00558
00559 xfscanf (in,"%k%m","transportsolvertype",&transpsolver_kwdset,(int*)&trsolv);
00560
00561
00562 xfscanf (in,"%k%m","residuumcomputationtype",&transpresiduumtype_kwdset,(int*)&trestype);
00563
00564
00565 xfscanf (in,"%k%m","convergencecontrol",&answertype_kwdset,(int*)&convergcontrolt);
00566
00567 xfscanf (in,"%k%m%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm,"capacmatstor",&storagetype_kwdset,(int*)&tstorcm);
00568
00569
00570 ssle->read (Gtt,in,Mesprt);
00571
00572
00573 xfscanf (in,"%k%ld","diagonalization",&diagcap);
00574
00575
00576 Gtt->dofcontr=1;
00577
00578
00579 nvs=1;
00580
00581 invs=1;
00582
00583 tdnvs=1;
00584
00585 break;
00586 }
00587
00588
00589
00590
00591 case discont_nonstat_problem:
00592 case discont_nonlin_nonstat_problem:{
00593 if (Mesprt==1) fprintf (stdout,"\n discontinuous nonlinear_nonstationary problem");
00594
00595
00596 timecont.read (in);
00597
00598 xfscanf (in,"%k%m","timetypeprint", &timetypeprint_kwdset, &tprt);
00599
00600
00601 hdbcont.read(in);
00602 if ((Mesprt==1) && hdbcont.hdbtype)
00603 fprintf(stdout, "\n backup will be performed %d", hdbcont.hdbtype);
00604
00605 errarr = new double [ntm];
00606 threshrhs = new double [ntm];
00607
00608 xfscanf (in,"%k%lf %ld","alpha_integration",&alpha,&nii);
00609
00610 for (i=0;i<ntm;i++){
00611 xfscanf (in,"%lf %lf",errarr+i,threshrhs+i);
00612 }
00613
00614 xfscanf (in,"%k%m%k%m","conductmatstor",&storagetype_kwdset,(int*)&tstorkm,"capacmatstor",&storagetype_kwdset,(int*)&tstorcm);
00615
00616
00617 ssle->read (Gtt,in,Mesprt);
00618
00619
00620 xfscanf (in,"%k%ld","diagonalization",&diagcap);
00621
00622 Gtt->edtype=jumps;
00623
00624 break;
00625 }
00626
00627
00628
00629
00630 case hermes:{
00631
00632 break;
00633 }
00634
00635 default:{
00636 print_err("unknown problem type is required",__FILE__,__LINE__,__func__);
00637 }
00638 }
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673 }
00674
00675
00676
00677
00678
00679
00680 void probdesct::print (FILE *out)
00681 {
00682 long i;
00683
00684
00685 fprintf (out, "%s\n", name);
00686
00687
00688 fprintf (out,"%ld\n", Mesprt);
00689
00690
00691 fprintf (out,"%d", tprob);
00692
00693
00694 fprintf (out," %d", tmatt);
00695
00696
00697 fprintf (out, " %d", mednam);
00698
00699
00700 for (i=0; i<ntm; i++)
00701 fprintf(out, " %e", scale[i]);
00702 fprintf(out, "\n");
00703
00704
00705
00706
00707 fprintf (out,"%ld\n",gradcomp);
00708 if (gradcomp==1) {
00709 fprintf (out,"%ld %ld\n",gradpos,gradaver);
00710 }
00711
00712
00713
00714 fprintf (out,"%ld\n",fluxcomp);
00715 if (fluxcomp==1) {
00716 fprintf (out,"%ld %ld\n",fluxpos,fluxaver);
00717 }
00718
00719
00720
00721 fprintf (out,"%ld\n",othercomp);
00722 if (othercomp==1){
00723 fprintf (out,"%ld %ld\n",otherpos,otheraver);
00724 }
00725
00726
00727
00728 fprintf (out,"%ld\n",eqothercomp);
00729 if (eqothercomp==1){
00730 fprintf (out,"%ld %ld\n",eqotherpos,eqotheraver);
00731 }
00732
00733
00734 fprintf (out,"%d\n",tgravity);
00735 if(tgravity == gr_yes){
00736 fprintf (out,"%le %le %le\n",gr1,gr2,gr3);
00737 }
00738
00739
00740 if (adaptivityflag)
00741 Adat->printinit(out);
00742 else
00743 fprintf (out,"0\n");
00744
00745
00746
00747 fprintf (out,"%ld\n",stochasticcalc);
00748
00749
00750
00751 fprintf (out,"%ld\n",homogt);
00752
00753
00754
00755
00756
00757 fprintf (out,"%d\n",Gtt->nodren);
00758
00759
00760 switch (tprob){
00761
00762
00763
00764 case stationary_problem:{
00765 fprintf (out,"%d\n", tstorkm);
00766
00767 ssle->print (out);
00768
00769 break;
00770 }
00771
00772
00773
00774
00775 case nonlinear_stationary_problem:{
00776
00777 nlman.print (out);
00778
00779 fprintf (out,"%d ", trestype);
00780
00781 fprintf (out,"%d\n", tstorkm);
00782
00783 ssle->print (out);
00784
00785 break;
00786 }
00787
00788
00789
00790
00791 case nonstationary_problem:{
00792
00793 timecont.print (out);
00794
00795 fprintf (out,"%d\n", tprt);
00796
00797 hdbcont.print(out);
00798
00799 fprintf (out, "%le\n",alpha);
00800
00801 fprintf (out,"%d %d ",tstorkm,tstorcm);
00802
00803 ssle->print (out);
00804
00805 fprintf (out,"%ld\n",diagcap);
00806
00807 fprintf (out,"\n");
00808
00809 break;
00810 }
00811
00812
00813
00814
00815 case growing_np_problem:{
00816
00817 timecont.print (out);
00818
00819 fprintf (out,"%d\n", tprt);
00820
00821 hdbcont.print(out);
00822
00823 fprintf (out, "%le\n",alpha);
00824
00825 fprintf (out,"%d %d ",tstorkm,tstorcm);
00826
00827 ssle->print (out);
00828
00829 fprintf (out,"%ld\n",diagcap);
00830
00831 fprintf (out,"\n");
00832
00833 break;
00834 }
00835
00836
00837
00838
00839 case nonlinear_nonstationary_problem:{
00840
00841 timecont.print (out);
00842
00843 fprintf (out,"%d\n", tprt);
00844
00845 hdbcont.print(out);
00846
00847 fprintf (out, "%le %ld\n", alpha,nii);
00848
00849 for (i=0;i<ntm;i++){
00850 fprintf (out, "%le %le\n", errarr[i], threshrhs[i]);
00851 }
00852
00853 fprintf (out,"%d %d %d\n",trsolv,trestype,convergcontrolt);
00854
00855 fprintf (out,"%d %d \n",tstorkm,tstorcm);
00856
00857 ssle->print (out);
00858
00859 fprintf (out,"%ld\n",diagcap);
00860
00861 fprintf (out,"\n");
00862
00863 break;
00864 }
00865
00866
00867
00868
00869 case growing_np_problem_nonlin:{
00870
00871 timecont.print (out);
00872
00873 fprintf (out,"%d\n", tprt);
00874
00875 hdbcont.print(out);
00876
00877 fprintf (out, "%le %ld\n",alpha,nii);
00878 for (i=0;i<ntm;i++){
00879 fprintf (out, "%le %le\n",errarr[i],threshrhs[i]);
00880 }
00881
00882 fprintf (out,"%d %d %d\n",trsolv,trestype,convergcontrolt);
00883
00884 fprintf (out,"%d %d ",tstorkm,tstorcm);
00885
00886 ssle->print (out);
00887
00888 fprintf (out,"%ld\n",diagcap);
00889
00890 fprintf (out,"\n");
00891
00892 break;
00893 }
00894
00895
00896
00897
00898 case discont_nonstat_problem:
00899 case discont_nonlin_nonstat_problem:{
00900
00901
00902 timecont.print (out);
00903
00904
00905 fprintf (out,"%d\n", tprt);
00906
00907 hdbcont.print(out);
00908
00909 fprintf (out,"%le %ld\n",alpha,nii);
00910 for (i=0;i<ntm;i++){
00911 fprintf (out,"%le %le\n",errarr[i],threshrhs[i]);
00912 }
00913
00914 fprintf (out,"%d %d\n",tstorkm,tstorcm);
00915
00916
00917 ssle->print (out);
00918
00919
00920 fprintf (out,"%ld\n",diagcap);
00921
00922 break;
00923 }
00924
00925 default:{
00926 print_err("unknown problem type is required",__FILE__,__LINE__,__func__);
00927 }
00928 }
00929 }
00930
00931
00932
00933 long probdesct::give_var_dofid(namevart var)
00934 {
00935 return var_dofid[int(var)-1];
00936 }