1 /* Routine contains the structures for reading the user input through 2 input_fform.cpp. The default values for all these variables are defined in 3 input.config. 4 5 Input variables that have been previously declared in common.h have to be 6 re-declared here, in a consistant structure.*/ 7 8 #include <FCMangle.h> 9 10 #define workfc FortranCInterface_GLOBAL_(workfc,WORKFC) 11 #define fronts FortranCInterface_GLOBAL_(fronts,FRONTS) 12 #define newdim FortranCInterface_GLOBAL_(newdim,NEWDIM) 13 #define timer4 FortranCInterface_GLOBAL_(timer4,TIMER4) 14 #define extrat FortranCInterface_GLOBAL_(extrat,EXTRAT) 15 #define spongevar FortranCInterface_GLOBAL_(spongevar,SPONGEVAR) 16 #define turbvar FortranCInterface_GLOBAL_(turbvar,TURBVAR) 17 #define turbvari FortranCInterface_GLOBAL_(turbvari,TURBVARI) 18 #define mpistats FortranCInterface_GLOBAL_(mpistats,MPISTATS) 19 #define memstats FortranCInterface_GLOBAL_(memstats,MEMSTATS) 20 #define spebcvr FortranCInterface_GLOBAL_(spebcvr,SPEBCVR) 21 #define aerfrc FortranCInterface_GLOBAL_(aerfrc,AERFRC) 22 #define conpar FortranCInterface_GLOBAL_(conpar,CONPAR) 23 #define ctrlvari FortranCInterface_GLOBAL_(ctrlvari,CTRLVARI) 24 #define ductvari FortranCInterface_GLOBAL_(ductvari,DUCTVARI) 25 #define ctrlvar FortranCInterface_GLOBAL_(ctrlvar,CTRLVAR) 26 #define ductvar FortranCInterface_GLOBAL_(ductvar,DUCTVAR) 27 #define shpdat FortranCInterface_GLOBAL_(shpdat,SHPDAT) 28 #define elmpar FortranCInterface_GLOBAL_(elmpar,ELMPAR) 29 #define genpar FortranCInterface_GLOBAL_(genpar,GENPAR) 30 #define inpdat FortranCInterface_GLOBAL_(inpdat,INPDAT) 31 #define intdat FortranCInterface_GLOBAL_(intdat,INTDAT) 32 #define mio FortranCInterface_GLOBAL_(mio,MIO) 33 #define mioname FortranCInterface_GLOBAL_(mioname,MIONAME) 34 #define itrpar FortranCInterface_GLOBAL_(itrpar,ITRPAR) 35 #define itrpnt FortranCInterface_GLOBAL_(itrpnt,ITRPNT) 36 #define matdat FortranCInterface_GLOBAL_(matdat,MATDAT) 37 #define mmatpar FortranCInterface_GLOBAL_(mmatpar,MMATPAR) 38 #define outpar FortranCInterface_GLOBAL_(outpar,OUTPAR) 39 #define point FortranCInterface_GLOBAL_(point,POINT) 40 #define precis FortranCInterface_GLOBAL_(precis,PRECIS) 41 #define propar FortranCInterface_GLOBAL_(propar,PROPAR) 42 #define resdat FortranCInterface_GLOBAL_(resdat,RESDAT) 43 #define solpar FortranCInterface_GLOBAL_(solpar,SOLPAR) 44 #define timdat FortranCInterface_GLOBAL_(timdat,TIMDAT) 45 #define timpar FortranCInterface_GLOBAL_(timpar,TIMPAR) 46 #define incomp FortranCInterface_GLOBAL_(incomp,INCOMP) 47 #define mtimer1 FortranCInterface_GLOBAL_(mtimer1,MTIMER1) 48 #define mtimer2 FortranCInterface_GLOBAL_(mtimer2,MTIMER2) 49 #define timer3 FortranCInterface_GLOBAL_(timer3,TIMER3) 50 #define title FortranCInterface_GLOBAL_(title,TITLE) 51 #define sclrs FortranCInterface_GLOBAL_(sclrs,SCLRS) 52 #define levlset FortranCInterface_GLOBAL_(levlset,LEVLSET) 53 #define nomodule FortranCInterface_GLOBAL_(nomodule,NOMODULE) 54 #define sequence FortranCInterface_GLOBAL_(sequence,SEQUENCE) 55 #define amgvarr FortranCInterface_GLOBAL_(amgvarr,AMGVARR) 56 #define amgvari FortranCInterface_GLOBAL_(amgvari,AMGVARI) 57 58 #define MAXBLK 50000 59 #define MAXSURF 1000 60 #define MAXTS 100 61 #define MAXTOP 6 62 #define MAXQPT 125 63 #define MAXSH 32 64 #define NSD 3 65 #define NSDSQ 9 66 #define machin 'RS/6000' 67 #define machfl 4 68 #define zero 0.0000000000000000000000000000000d0 69 #define pt125 0.1250000000000000000000000000000d0 70 #define pt25 0.2500000000000000000000000000000d0 71 #define pt33 0.3333333333333333333333333333333d0 72 #define pt39 0.3968502629920498686879264098181d0 73 #define pt5 0.5000000000000000000000000000000d0 74 #define pt57 0.5773502691896257645091487805020d0 75 #define pt66 0.6666666666666666666666666666667d0 76 #define pt75 0.7500000000000000000000000000000d0 77 #define one 1.0000000000000000000000000000000d0 78 #define sqt2 1.4142135623730950488016887242097d0 79 #define onept5 1.5000000000000000000000000000000d0 80 #define two 2.0000000000000000000000000000000d0 81 #define three 3.0000000000000000000000000000000d0 82 #define four 4.0000000000000000000000000000000d0 83 #define five 5.0000000000000000000000000000000d0 84 #define pi 3.1415926535897932384626433832795d0 85 #define inv1024sq 9.5367431640625e-7 86 87 #ifdef __cplusplus 88 extern "C" { 89 #endif 90 extern struct { 91 int master; 92 int numpe; 93 int myrank; 94 } workfc ; 95 96 extern struct { 97 int maxfront; 98 int nlwork; 99 } fronts ; 100 101 extern struct { 102 long long int nshgt; 103 long long int minowned; 104 long long int maxowned; 105 int numper; 106 //int nshgt; 107 int nshg0; 108 } newdim ; 109 110 extern struct { 111 double birth; 112 double death; 113 double comtim; 114 } timer4 ; 115 116 extern struct { 117 double ttim[100]; 118 } extrat ; 119 120 extern struct { 121 double zoutsponge, radsponge, zinsponge, grthosponge, grthisponge; 122 double betamax; 123 int spongecontinuity, spongemomentum1, spongemomentum2; 124 int spongeenergy, spongemomentum3; 125 } spongevar ; 126 127 extern struct { 128 double eles; 129 double ylimit[9][3]; /* 9 = 5 + 4 = puvwT + 4Scalars */ 130 double rampmdot[3][2]; 131 double rmutarget; 132 double pzero; 133 double wtavei; 134 double dtavei; 135 double dke; 136 double fwr1; 137 double flump; 138 double DES_SA_hmin; 139 int ierrcalc; 140 int ihessian; 141 int itwmod; 142 int ngaussf; 143 int idim; 144 int nlist; 145 int nintf[MAXTOP]; 146 } turbvar ; 147 148 extern struct { 149 int irans, iles, idistcalc, isubmod; 150 int ifproj; 151 int i2filt; 152 int modlstats; 153 int idis; 154 int nohomog; 155 int ierrsmooth; 156 int iramp; 157 158 /* int itwmod; */ 159 /* double rtavei; */ 160 /* int ierrcalc; */ 161 } turbvari ; 162 163 extern struct { 164 int iISend; 165 int iISendScal; 166 int iIRecv; 167 int iIRecvScal; 168 int iWaitAll; 169 int iWaitAllScal; 170 int iAllR; 171 int iAllRScal; 172 int impistat; 173 int impistat2; 174 double rmpitmr; 175 double rISend; 176 double rISendScal; 177 double rIRecv; 178 double rIRecvScal; 179 double rWaitAll; 180 double rWaitAllScal; 181 double rAllR; 182 double rAllRScal; 183 double rCommu; 184 double rCommuScal; 185 } mpistats ; 186 187 extern struct { 188 double rheap; 189 double rheapavail; 190 double rstack; 191 double rstackavail; 192 double rshared; 193 double rpersist; 194 double rguard; 195 double rmmap; 196 } memstats ; 197 198 199 extern struct { 200 int irscale; 201 int intpres; 202 double plandist; 203 double thetag; 204 double ds; 205 double tolerence; 206 double radcyl; 207 double rbltin; 208 double rvscal; 209 } spebcvr ; 210 211 extern struct { 212 double scdiff[5]; 213 double tdecay; 214 int nsclr, isclr,nsolt, nosource; 215 int consrv_sclr_conv_vel; 216 } sclrs; 217 218 extern struct { 219 double flxID[MAXSURF+1][10] ; 220 double Force[3]; 221 double HFlux; 222 int nsrflist[MAXSURF+1]; 223 int isrfIM; 224 double flxIDsclr[MAXSURF][4]; 225 int irankfilesforce[MAXSURF+1]; 226 } aerfrc ; 227 228 extern struct { 229 int numnp; 230 int numel; 231 int numelb; 232 int numpbc; 233 int nen; 234 int nfaces; 235 int numflx; 236 int ndof; 237 int iALE; 238 int icoord; 239 int navier; 240 int irs; 241 int iexec; 242 int necho; 243 int ichem; 244 int iRK; 245 int nedof; 246 int nshg; 247 int nnz; 248 int istop; 249 int nflow; 250 int nnz_tot; 251 int idtn; 252 int ncorpsize; 253 int iownnodes; 254 int usingpetsc; 255 } conpar ; 256 257 /*Woolwine June 4 2014 NASA Inlet*/ 258 extern struct{ 259 int BCdtKW; 260 int tsBase; 261 } nasavari; 262 263 extern struct{ 264 double PresFreq; 265 double PresAmp; 266 double AlphaFreq; 267 double AlphaAmp; 268 } nasavar; 269 270 /*chen Sep 25 2009 Flow Control Parameters*/ 271 extern struct{ 272 int iI2Binlet; 273 int isetOutPres; 274 int isetInitial; 275 } ctrlvari; 276 277 extern struct{ 278 double BlowingVelDuct; 279 double BlowingIniMdotDuct; 280 double BlowingFnlMdotDuct; 281 double suctionVbottom; 282 double suctionVside_lower; 283 double suctionVside_upper; 284 double suctionVtop; 285 double blowerVelocity; 286 double blowerTemperature; 287 double blowerEV; 288 int isetOutletID; 289 int isetInitial_Duct; 290 int isetInlet_Duct; 291 int isetSuctionID_Duct; 292 int isetBlowerID_Duct; 293 int iDuctgeometryType; 294 int iStraigtPrint; 295 int isetEV_IC_BC; 296 int isetEVramp; 297 int isetBlowing_Duct; 298 int ifixBlowingVel_Duct; 299 int nBlowingStepsDuct; 300 }ductvari; 301 302 extern struct{ 303 double inletVelX; 304 double outPres1; 305 double xvel_ini; 306 double yvel_ini; 307 double zvel_ini; 308 double temp_ini; 309 double pres_ini; 310 double evis_ini; 311 } ctrlvar; 312 313 extern struct{ 314 double evis_IC_BC; 315 double EVrampXmin; 316 double EVrampXmax; 317 double EVrampMin; 318 double EVrampMax; 319 } ductvar; 320 ////////////////////////////////////////// 321 322 323 extern struct { 324 double epsilon_ls; 325 double epsilon_lsd; 326 double dtlset; 327 int iLSet; 328 int ivconstraint; 329 int iExpLSSclr1; 330 int iExpLSSclr2; 331 } levlset; 332 333 extern struct { 334 int nshape; 335 int nshapeb; 336 int maxshb; 337 int nshl; 338 int nshlb; 339 int nfath; 340 int ntopsh; 341 int nsonmax; 342 } shpdat ; 343 344 extern struct { 345 int lelCat; 346 int lcsyst; 347 int iorder; 348 int nenb; 349 int nelblk; 350 int nelblb; 351 int ndofl; 352 int nsymdl; 353 int nenl; 354 int nfacel; 355 int nenbl; 356 int intind; 357 int mattyp; 358 } elmpar ; 359 360 extern struct { 361 double E3nsd; 362 int I3nsd; 363 int nsymdf; 364 int ndofBC; 365 int ndiBCB; 366 int ndBCB; 367 int Jactyp; 368 int jump; 369 int ires; 370 int iprec; 371 int iprev; 372 int ibound; 373 int idiff; 374 int lhs; 375 int itau; 376 int ipord; 377 int ipred; 378 int lstres; 379 int iepstm; 380 double dtsfct; 381 double taucfct; 382 int ibksiz; 383 int iabc; 384 int isurf; 385 int idflx; 386 double Bo; 387 int EntropyPressure; 388 int irampViscOutlet; 389 int istretchOutlet; 390 int iremoveStabTimeTerm; 391 int iLHScond; 392 } genpar ; 393 394 extern struct { 395 double epstol[6]; /* 1+ max number of scalars (beginning of the 396 end of time sequences) */ 397 double Delt[MAXTS]; 398 double CFLfl[MAXTS]; 399 double CFLsl[MAXTS]; 400 int nstep[MAXTS]; 401 int niter[MAXTS]; 402 int impl[MAXTS]; 403 double rhoinf[MAXTS]; 404 int LHSupd[6]; 405 int loctim[MAXTS]; 406 double deltol[2][MAXTS]; 407 int leslib; 408 int svLSFlag; 409 int svLSType; 410 } inpdat ; 411 412 extern struct { 413 int iin; 414 int igeom; 415 int ipar; 416 int ibndc; 417 int imat; 418 int iecho; 419 int iout; 420 int ichmou; 421 int irstin; 422 int irstou; 423 int ihist; 424 int iflux; 425 int ierror; 426 int itable; 427 int iforce; 428 int igraph; 429 int itime; 430 } mio ; 431 432 extern struct { 433 double fin; 434 double fgeom; 435 double fpar; 436 double fbndc; 437 double fmat; 438 double fecho; 439 double frstin; 440 double frstou; 441 double fhist; 442 double ferror; 443 double ftable; 444 double fforce; 445 double fgraph; 446 double ftime; 447 } mioname ; 448 449 extern struct { 450 double eGMRES; 451 int lGMRES; 452 int lGMRESs; 453 int iKs; 454 int iKss; 455 int ntotGM; 456 int ntotGMs; 457 } itrpar ; 458 459 extern struct { 460 double datmat[MAXTS][7][3]; 461 int matflg[MAXTS][6]; 462 int nummat; 463 int mexist; 464 } matdat ; 465 466 extern struct { 467 double pr, Planck, Stephan, Nh, Rh, Rgas; 468 double gamma, gamma1, s0; 469 /*, const, xN2, xO2;*/ 470 /*double yN2, yO2, Msh[5], cpsh[5],s0sh[5],h0sh[5];*/ 471 /*double Rs[5], cps[5], cvs[5], h0s[5], Trot[5],sigs[5];*/ 472 /*double Tvib[5],g0s[5], dofs[5],ithm;*/ 473 } mmatpar ; 474 475 extern struct { 476 double ro; 477 double vel; 478 double temper; 479 double press; 480 double entrop; 481 int ntout; 482 int ioform; 483 int iowflux; 484 int iofieldv; 485 char iotype[80]; 486 int ioybar; 487 int nstepsincycle; 488 int nphasesincycle; 489 int ncycles_startphaseavg; 490 int ivort; 491 int icomputevort; 492 int nsynciofiles; 493 int nsynciofieldswriterestart; 494 int iv_rankpercore; 495 int iv_corepernode; 496 int input_mode; //FIXME -1:streams, 0:posix, >0:syncio 497 int output_mode; //FIXME -1:streams, 0:posix, >0:syncio 498 /* int iostats; */ 499 /* int ipresref; */ 500 } outpar ; 501 502 extern struct { 503 int mbeg; 504 int mend; 505 int mprec; 506 } point ; 507 508 extern struct { 509 double epsM; 510 int iabres; 511 } precis ; 512 513 extern struct { 514 int npro; 515 } propar ; 516 517 extern struct { 518 double resfrt; 519 double resfrts; 520 } resdat ; 521 522 extern struct { 523 int imap; 524 int ivart; 525 int iDC; 526 int iPcond; 527 int Kspace; 528 int nGMRES; 529 int iconvflow; 530 int iconvsclr; 531 int idcsclr[2]; 532 } solpar ; 533 534 extern struct { 535 double time; 536 double CFLfld; 537 double CFLsld; 538 double Dtgl; 539 double Dtmax; 540 double alpha; 541 double etol; 542 int lstep; // read from numstart.dat and incremented every time step 543 int ifunc; 544 int itseq; 545 int istep; // how many steps (starting from 0 each run) 546 int iter; 547 int nitr; 548 double almi; 549 double alfi; 550 double gami; 551 double flmpl; 552 double flmpr; 553 double dtol[2]; 554 int iCFLworst; 555 int lskeep; 556 } timdat ; 557 558 extern struct { 559 int LCtime; 560 int ntseq; 561 } timpar ; 562 563 extern struct { 564 int numeqns[100]; 565 int minIters; 566 int maxIters; 567 int iprjFlag; 568 int nPrjs; 569 int ipresPrjFlag; 570 int nPresPrjs; 571 double prestol; 572 double statsflow[6]; 573 double statssclr[6]; 574 int iverbose; 575 } incomp ; 576 577 extern struct { 578 double ccode[13]; 579 } mtimer1 ; 580 581 extern struct { 582 double flops; 583 double gbytes; 584 double sbytes; 585 int iclock; 586 int icd; 587 int icode; 588 int icode2; 589 int icode3; 590 } mtimer2 ; 591 592 extern struct { 593 double cpu[11]; 594 double cpu0[11]; 595 int nacess[11]; 596 } timer3 ; 597 598 extern struct { 599 double title; 600 int ititle; 601 } title ; 602 603 extern struct { 604 int intg[MAXTS][2]; 605 }intdat; 606 607 extern struct { 608 double bcttimescale; 609 double ValueListResist[MAXSURF+1]; 610 double rhovw; 611 double thicknessvw; 612 double evw; 613 double rnuvw; 614 double rshearconstantvw; 615 double betai; 616 int icardio; 617 int itvn; 618 int ipvsq; 619 int numResistSrfs; 620 int nsrflistResist[MAXSURF+1]; 621 int numImpSrfs; 622 int nsrflistImp[MAXSURF+1]; 623 int impfile; 624 int numRCRSrfs; 625 int nsrflistRCR[MAXSURF+1]; 626 int ircrfile; 627 int ideformwall; 628 int iwallmassfactor; 629 int iwallstiffactor; 630 int iviscflux; 631 } nomodule; 632 633 extern struct { 634 int seqsize; 635 int stepseq[100]; 636 } sequence; 637 638 extern struct { 639 double strong_eps; /* strong criterion Stuben factor */ 640 double ramg_eps; /* AMG convergence eps */ 641 double ramg_relax; /* relaxation factor Gauss-Seidel/Jac*/ 642 double ramg_trunc; /* truncation select */ 643 double ramg_chebyratio; /* Eigen ratio for chebyshev smoothing */ 644 } amgvarr ; 645 646 extern struct { 647 int irun_amg; /* Employ AMG feature solfar.f */ 648 int irun_amg_prec; /* Run AMG as preconditioner to CG */ 649 int iamg_verb; /* amg verbosity flag */ 650 int iamg_neg_sten; /* neg only stencil or neg and pos */ 651 int iamg_nlevel; /* number of levels 2-V etc. */ 652 int iamg_c_solver; /* solve fine level iter. method */ 653 int iamg_init; /* setup flag */ 654 int iamg_setup_frez; /* how many solfars to re setup amg */ 655 int iamg_interp; /* interpolation select */ 656 int maxnev; /* total eigenvectors used for ggb*/ 657 int maxncv; /* total iterative vectors for ggb*/ 658 int iamg_smoother; /* Smoother type */ 659 int mlsdeg; /* Polynomial Smoothing (MLS) degree */ 660 int iamg_reduce; /* Run a reduced case */ 661 } amgvari ; 662 663 #ifdef __cplusplus 664 } 665 #endif 666