xref: /phasta/phSolver/common/common_c.h (revision 96040df829d9dc51fd7a97d28ea5d8fb6af07398)
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 astore FortranCInterface_GLOBAL_(astore,ASTORE)
23 #define conpar FortranCInterface_GLOBAL_(conpar,CONPAR)
24 #define ctrlvari FortranCInterface_GLOBAL_(ctrlvari,CTRLVARI)
25 #define ctrlvar  FortranCInterface_GLOBAL_(ctrlvar,CTRLVAR)
26 #define shpdat FortranCInterface_GLOBAL_(shpdat,SHPDAT)
27 #define datpnt FortranCInterface_GLOBAL_(datpnt,DATPNT)
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  30
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     int numper;
103     int nshgt;
104     int nshg0;
105   } newdim ;
106 
107   extern struct {
108     double birth;
109     double death;
110     double comtim;
111   } timer4 ;
112 
113   extern struct {
114     double ttim[100];
115   } extrat ;
116 
117   extern struct {
118     double zoutsponge, radsponge, zinsponge, grthosponge, grthisponge;
119     double betamax;
120     int spongecontinuity, spongemomentum1, spongemomentum2;
121     int spongeenergy, spongemomentum3;
122   } spongevar ;
123 
124   extern struct {
125     double eles;
126     double ylimit[9][3]; /* 9 = 5 + 4 = puvwT + 4Scalars */
127     double rampmdot[3][2];
128     double rmutarget;
129     double pzero;
130     double wtavei;
131     double dtavei;
132     double dke;
133     double fwr1;
134     double flump;
135     double DES_SA_hmin;
136     int ierrcalc;
137     int ihessian;
138     int itwmod;
139     int ngaussf;
140     int idim;
141     int nlist;
142     int nintf[MAXTOP];
143   } turbvar ;
144 
145   extern struct {
146     int irans, iles, idistcalc, isubmod;
147     int ifproj;
148     int i2filt;
149     int modlstats;
150     int idis;
151     int nohomog;
152     int ierrsmooth;
153     int iramp;
154 
155 /*      int itwmod; */
156 /*      double rtavei; */
157 /*      int ierrcalc; */
158   } turbvari ;
159 
160   extern struct {
161     int iISend;
162     int iISendScal;
163     int iIRecv;
164     int iIRecvScal;
165     int iWaitAll;
166     int iWaitAllScal;
167     int iAllR;
168     int iAllRScal;
169     int impistat;
170     int impistat2;
171     double rmpitmr;
172     double rISend;
173     double rISendScal;
174     double rIRecv;
175     double rIRecvScal;
176     double rWaitAll;
177     double rWaitAllScal;
178     double rAllR;
179     double rAllRScal;
180     double rCommu;
181     double rCommuScal;
182   } mpistats ;
183 
184   extern struct {
185     double rheap;
186     double rheapavail;
187     double rstack;
188     double rstackavail;
189     double rshared;
190     double rpersist;
191     double rguard;
192     double rmmap;
193   } memstats ;
194 
195 
196   extern struct {
197     int irscale;
198     int intpres;
199     double plandist;
200     double thetag;
201     double ds;
202     double tolerence;
203     double radcyl;
204     double rbltin;
205     double rvscal;
206   } spebcvr ;
207 
208   extern struct {
209     double scdiff[5];
210     double tdecay;
211     int nsclr, isclr,nsolt, nosource;
212     int consrv_sclr_conv_vel;
213   } sclrs;
214 
215   extern struct {
216     double flxID[MAXSURF+1][10] ;
217     double Force[3];
218     double HFlux;
219     int nsrflist[MAXSURF+1];
220     int isrfIM;
221     double flxIDsclr[MAXSURF][4];
222     int irankfilesforce[MAXSURF+1];
223   } aerfrc ;
224 
225   extern struct {
226     double a[100000];
227   } astore ;
228 
229   extern struct {
230     int numnp;
231     int numel;
232     int numelb;
233     int numpbc;
234     int nen;
235     int nfaces;
236     int numflx;
237     int ndof;
238     int iALE;
239     int icoord;
240     int navier;
241     int irs;
242     int iexec;
243     int necho;
244     int ichem;
245     int iRK;
246     int nedof;
247     int nshg;
248     int nnz;
249     int istop;
250     int nflow;
251     int nnz_tot;
252     int idtn;
253   } conpar ;
254 
255 /*chen Sep 25 2009  Flow Control Parameters*/
256   extern struct{
257     int iI2Binlet;
258     int isetOutPres;
259     int isetInitial;
260   } ctrlvari;
261 
262   extern struct{
263     double inletVelX;
264     double outPres1;
265     double xvel_ini;
266     double yvel_ini;
267     double zvel_ini;
268     double temp_ini;
269     double pres_ini;
270     double evis_ini;
271   } ctrlvar;
272 //////////////////////////////////////////
273 
274 
275   extern struct {
276     double epsilon_ls;
277     double epsilon_lsd;
278     double dtlset;
279     int iLSet;
280     int ivconstraint;
281     int iExpLSSclr1;
282     int iExpLSSclr2;
283   } levlset;
284 
285   extern struct {
286     int nshape;
287     int nshapeb;
288     int maxshb;
289     int nshl;
290     int nshlb;
291     int nfath;
292     int ntopsh;
293     int nsonmax;
294   } shpdat ;
295 
296   extern struct {
297     int mshp;
298     int mshgl;
299     int mwght;
300     int mshpb;
301     int mshglb;
302     int mwghtb;
303     int mmut;
304     int mrhot;
305     int mxst;
306   } datpnt ;
307 
308   extern struct {
309     int lelCat;
310     int lcsyst;
311     int iorder;
312     int nenb;
313     int nelblk;
314     int nelblb;
315     int ndofl;
316     int nsymdl;
317     int nenl;
318     int nfacel;
319     int nenbl;
320     int intind;
321     int mattyp;
322   } elmpar ;
323 
324   extern struct {
325     double E3nsd;
326     int I3nsd;
327     int nsymdf;
328     int ndofBC;
329     int ndiBCB;
330     int ndBCB;
331     int Jactyp;
332     int jump;
333     int ires;
334     int iprec;
335     int iprev;
336     int ibound;
337     int idiff;
338     int lhs;
339     int itau;
340     int ipord;
341     int ipred;
342     int lstres;
343     int iepstm;
344     double dtsfct;
345     double taucfct;
346     int ibksiz;
347     int iabc;
348     int isurf;
349     int idflx;
350     double Bo;
351     int EntropyPressure;
352     int irampViscOutlet;
353     int istretchOutlet;
354     int iremoveStabTimeTerm;
355   } genpar ;
356 
357   extern struct {
358     double epstol[6];  /* 1+ max number of scalars  (beginning of the
359                           end of time sequences) */
360     double Delt[MAXTS];
361     double CFLfl[MAXTS];
362     double CFLsl[MAXTS];
363     int nstep[MAXTS];
364     int niter[MAXTS];
365     int impl[MAXTS];
366     double rhoinf[MAXTS];
367     int LHSupd[6];
368     int loctim[MAXTS];
369     double deltol[2][MAXTS];
370   } inpdat ;
371 
372   extern struct {
373     int iin;
374     int igeom;
375     int ipar;
376     int ibndc;
377     int imat;
378     int iecho;
379     int iout;
380     int ichmou;
381     int irstin;
382     int irstou;
383     int ihist;
384     int iflux;
385     int ierror;
386     int itable;
387     int iforce;
388     int igraph;
389     int itime;
390   } mio ;
391 
392   extern struct {
393     double fin;
394     double fgeom;
395     double fpar;
396     double fbndc;
397     double fmat;
398     double fecho;
399     double frstin;
400     double frstou;
401     double fhist;
402     double ferror;
403     double ftable;
404     double fforce;
405     double fgraph;
406     double ftime;
407   } mioname ;
408 
409   extern struct {
410     double eGMRES;
411     int lGMRES;
412     int iKs;
413     int ntotGM;
414   } itrpar ;
415 
416   extern struct {
417     int mHBrg;
418     int meBrg;
419     int myBrg;
420     int mRcos;
421     int mRsin;
422   } itrpnt ;
423 
424   extern struct {
425     double datmat[MAXTS][7][3];
426     int matflg[MAXTS][6];
427     int nummat;
428     int mexist;
429   } matdat ;
430 
431   extern struct {
432     double pr, Planck, Stephan, Nh, Rh, Rgas;
433     double gamma, gamma1, s0;
434     //, const, xN2, xO2;
435     //double yN2,    yO2,    Msh[5], cpsh[5],s0sh[5],h0sh[5];
436     //double Rs[5],  cps[5], cvs[5], h0s[5], Trot[5],sigs[5];
437     //double Tvib[5],g0s[5], dofs[5],ithm;
438   } mmatpar ;
439 
440   extern struct {
441     double ro;
442     double vel;
443     double temper;
444     double press;
445     double entrop;
446     int ntout;
447     int ioform;
448     int iowflux;
449     int iofieldv;
450     char iotype[80];
451     int ioybar;
452     int nstepsincycle;
453     int nphasesincycle;
454     int ncycles_startphaseavg;
455 //MR CHANGE
456     int ivort;
457     int icomputevort;
458     int nsynciofiles;
459     int nsynciofieldswriterestart;
460     int iv_rankpercore;
461     int iv_corepernode;
462 //MR CHANGE END
463     /*  int iostats; */
464 /*      int ipresref; */
465   } outpar ;
466 
467   extern struct {
468     int mbeg;
469     int mend;
470     int mprec;
471   } point ;
472 
473   extern struct {
474     double epsM;
475     int iabres;
476   } precis ;
477 
478   extern struct {
479     int npro;
480   } propar ;
481 
482   extern struct {
483     double resfrt;
484   } resdat ;
485 
486   extern struct {
487     int imap;
488     int ivart;
489     int iDC;
490     int iPcond;
491     int Kspace;
492     int nGMRES;
493     int iconvflow;
494     int iconvsclr;
495     int idcsclr[2];
496   } solpar ;
497 
498   extern struct {
499     double time;
500     double CFLfld;
501     double CFLsld;
502     double Dtgl;
503     double Dtmax;
504     double alpha;
505     double etol;
506     int lstep;
507     int ifunc;
508     int itseq;
509     int istep;
510     int iter;
511     int nitr;
512     double almi;
513     double alfi;
514     double gami;
515     double flmpl;
516     double flmpr;
517     double dtol[2];
518     int iCFLworst;
519     int lskeep;
520   } timdat ;
521 
522   extern struct {
523     int LCtime;
524     int ntseq;
525   } timpar ;
526 
527   extern struct {
528     int numeqns[100];
529     int minIters;
530     int maxIters;
531     int iprjFlag;
532     int nPrjs;
533     int ipresPrjFlag;
534     int nPresPrjs;
535     double prestol;
536     double statsflow[6];
537     double statssclr[6];
538     int iverbose;
539   } incomp ;
540 
541   extern struct {
542     double ccode[13];
543   } mtimer1 ;
544 
545   extern struct {
546     double flops;
547     double gbytes;
548     double sbytes;
549     int iclock;
550     int icd;
551     int icode;
552     int icode2;
553     int icode3;
554   } mtimer2 ;
555 
556   extern struct {
557     double cpu[11];
558     double cpu0[11];
559     int nacess[11];
560   } timer3 ;
561 
562   extern struct {
563     double title;
564     int ititle;
565   } title ;
566 
567   extern struct {
568     int intg[MAXTS][2];
569   }intdat;
570 
571   extern struct {
572     double bcttimescale;
573     double ValueListResist[MAXSURF+1];
574     double rhovw;
575     double thicknessvw;
576     double evw;
577     double rnuvw;
578     double rshearconstantvw;
579     double betai;
580     int icardio;
581     int itvn;
582     int ipvsq;
583     int numResistSrfs;
584     int nsrflistResist[MAXSURF+1];
585     int numImpSrfs;
586     int nsrflistImp[MAXSURF+1];
587     int impfile;
588     int numRCRSrfs;
589     int nsrflistRCR[MAXSURF+1];
590     int ircrfile;
591     int ideformwall;
592     int iwallmassfactor;
593     int iwallstiffactor;
594     int iviscflux;
595  } nomodule;
596 
597   extern struct {
598     int seqsize;
599     int stepseq[100];
600   } sequence;
601 
602   extern struct {
603     double strong_eps;      /* strong criterion Stuben factor    */
604     double ramg_eps;        /* AMG convergence eps               */
605     double ramg_relax;       /* relaxation factor Gauss-Seidel/Jac*/
606     double ramg_trunc;      /* truncation select */
607     double ramg_chebyratio; /* Eigen ratio for chebyshev smoothing */
608  } amgvarr ;
609 
610   extern struct {
611     int irun_amg;           /* Employ AMG feature solfar.f      */
612     int irun_amg_prec;      /* Run AMG as preconditioner to CG */
613     int iamg_verb;          /* amg verbosity flag                */
614     int iamg_neg_sten;      /* neg only stencil or neg and pos   */
615     int iamg_nlevel;        /* number of levels 2-V etc.         */
616     int iamg_c_solver;     /* solve fine level iter. method     */
617     int iamg_init;           /* setup flag */
618     int iamg_setup_frez;    /* how many solfars to re setup amg */
619     int iamg_interp;        /* interpolation select */
620     int maxnev;             /* total eigenvectors used for ggb*/
621     int maxncv;             /* total iterative vectors for ggb*/
622     int iamg_smoother;      /* Smoother type */
623     int mlsdeg;             /* Polynomial Smoothing (MLS) degree */
624     int iamg_reduce;        /* Run a reduced case */
625  } amgvari ;
626 
627 #ifdef __cplusplus
628 }
629 #endif
630