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