xref: /phasta/phSolver/common/common_c.h (revision 08d2ac07b0519855627ebfd43221a09a84cee7bb)
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   extern struct {
274     double epsilon_ls;
275     double epsilon_lsd;
276     double dtlset;
277     int iLSet;
278     int ivconstraint;
279     int iExpLSSclr1;
280     int iExpLSSclr2;
281   } levlset;
282 
283   extern struct {
284     int nshape;
285     int nshapeb;
286     int maxshb;
287     int nshl;
288     int nshlb;
289     int nfath;
290     int ntopsh;
291     int nsonmax;
292   } shpdat ;
293 
294   extern struct {
295     int mshp;
296     int mshgl;
297     int mwght;
298     int mshpb;
299     int mshglb;
300     int mwghtb;
301     int mmut;
302     int mrhot;
303     int mxst;
304   } datpnt ;
305 
306   extern struct {
307     int lelCat;
308     int lcsyst;
309     int iorder;
310     int nenb;
311     int nelblk;
312     int nelblb;
313     int ndofl;
314     int nsymdl;
315     int nenl;
316     int nfacel;
317     int nenbl;
318     int intind;
319     int mattyp;
320   } elmpar ;
321 
322   extern struct {
323     double E3nsd;
324     int I3nsd;
325     int nsymdf;
326     int ndofBC;
327     int ndiBCB;
328     int ndBCB;
329     int Jactyp;
330     int jump;
331     int ires;
332     int iprec;
333     int iprev;
334     int ibound;
335     int idiff;
336     int lhs;
337     int itau;
338     int ipord;
339     int ipred;
340     int lstres;
341     int iepstm;
342     double dtsfct;
343     double taucfct;
344     int ibksiz;
345     int iabc;
346     int isurf;
347     int idflx;
348     double Bo;
349     int EntropyPressure;
350     int irampViscOutlet;
351     int istretchOutlet;
352     int iremoveStabTimeTerm;
353   } genpar ;
354 
355   extern struct {
356     double epstol[6];  /* 1+ max number of scalars  (beginning of the
357                           end of time sequences) */
358     double Delt[MAXTS];
359     double CFLfl[MAXTS];
360     double CFLsl[MAXTS];
361     int nstep[MAXTS];
362     int niter[MAXTS];
363     int impl[MAXTS];
364     double rhoinf[MAXTS];
365     int LHSupd[6];
366     int loctim[MAXTS];
367     double deltol[2][MAXTS];
368   } inpdat ;
369 
370   extern struct {
371     int iin;
372     int igeom;
373     int ipar;
374     int ibndc;
375     int imat;
376     int iecho;
377     int iout;
378     int ichmou;
379     int irstin;
380     int irstou;
381     int ihist;
382     int iflux;
383     int ierror;
384     int itable;
385     int iforce;
386     int igraph;
387     int itime;
388   } mio ;
389 
390   extern struct {
391     double fin;
392     double fgeom;
393     double fpar;
394     double fbndc;
395     double fmat;
396     double fecho;
397     double frstin;
398     double frstou;
399     double fhist;
400     double ferror;
401     double ftable;
402     double fforce;
403     double fgraph;
404     double ftime;
405   } mioname ;
406 
407   extern struct {
408     double eGMRES;
409     int lGMRES;
410     int iKs;
411     int ntotGM;
412   } itrpar ;
413 
414   extern struct {
415     int mHBrg;
416     int meBrg;
417     int myBrg;
418     int mRcos;
419     int mRsin;
420   } itrpnt ;
421 
422   extern struct {
423     double datmat[MAXTS][7][3];
424     int matflg[MAXTS][6];
425     int nummat;
426     int mexist;
427   } matdat ;
428 
429   extern struct {
430     double pr, Planck, Stephan, Nh, Rh, Rgas;
431     double gamma, gamma1, s0;
432     /*, const, xN2, xO2;*/
433     /*double yN2,    yO2,    Msh[5], cpsh[5],s0sh[5],h0sh[5];*/
434     /*double Rs[5],  cps[5], cvs[5], h0s[5], Trot[5],sigs[5];*/
435     /*double Tvib[5],g0s[5], dofs[5],ithm;*/
436   } mmatpar ;
437 
438   extern struct {
439     double ro;
440     double vel;
441     double temper;
442     double press;
443     double entrop;
444     int ntout;
445     int ioform;
446     int iowflux;
447     int iofieldv;
448     char iotype[80];
449     int ioybar;
450     int nstepsincycle;
451     int nphasesincycle;
452     int ncycles_startphaseavg;
453     int ivort;
454     int icomputevort;
455     int nsynciofiles;
456     int nsynciofieldswriterestart;
457     int iv_rankpercore;
458     int iv_corepernode;
459     /*  int iostats; */
460 /*      int ipresref; */
461   } outpar ;
462 
463   extern struct {
464     int mbeg;
465     int mend;
466     int mprec;
467   } point ;
468 
469   extern struct {
470     double epsM;
471     int iabres;
472   } precis ;
473 
474   extern struct {
475     int npro;
476   } propar ;
477 
478   extern struct {
479     double resfrt;
480   } resdat ;
481 
482   extern struct {
483     int imap;
484     int ivart;
485     int iDC;
486     int iPcond;
487     int Kspace;
488     int nGMRES;
489     int iconvflow;
490     int iconvsclr;
491     int idcsclr[2];
492   } solpar ;
493 
494   extern struct {
495     double time;
496     double CFLfld;
497     double CFLsld;
498     double Dtgl;
499     double Dtmax;
500     double alpha;
501     double etol;
502     int lstep;
503     int ifunc;
504     int itseq;
505     int istep;
506     int iter;
507     int nitr;
508     double almi;
509     double alfi;
510     double gami;
511     double flmpl;
512     double flmpr;
513     double dtol[2];
514     int iCFLworst;
515     int lskeep;
516   } timdat ;
517 
518   extern struct {
519     int LCtime;
520     int ntseq;
521   } timpar ;
522 
523   extern struct {
524     int numeqns[100];
525     int minIters;
526     int maxIters;
527     int iprjFlag;
528     int nPrjs;
529     int ipresPrjFlag;
530     int nPresPrjs;
531     double prestol;
532     double statsflow[6];
533     double statssclr[6];
534     int iverbose;
535   } incomp ;
536 
537   extern struct {
538     double ccode[13];
539   } mtimer1 ;
540 
541   extern struct {
542     double flops;
543     double gbytes;
544     double sbytes;
545     int iclock;
546     int icd;
547     int icode;
548     int icode2;
549     int icode3;
550   } mtimer2 ;
551 
552   extern struct {
553     double cpu[11];
554     double cpu0[11];
555     int nacess[11];
556   } timer3 ;
557 
558   extern struct {
559     double title;
560     int ititle;
561   } title ;
562 
563   extern struct {
564     int intg[MAXTS][2];
565   }intdat;
566 
567   extern struct {
568     double bcttimescale;
569     double ValueListResist[MAXSURF+1];
570     double rhovw;
571     double thicknessvw;
572     double evw;
573     double rnuvw;
574     double rshearconstantvw;
575     double betai;
576     int icardio;
577     int itvn;
578     int ipvsq;
579     int numResistSrfs;
580     int nsrflistResist[MAXSURF+1];
581     int numImpSrfs;
582     int nsrflistImp[MAXSURF+1];
583     int impfile;
584     int numRCRSrfs;
585     int nsrflistRCR[MAXSURF+1];
586     int ircrfile;
587     int ideformwall;
588     int iwallmassfactor;
589     int iwallstiffactor;
590     int iviscflux;
591  } nomodule;
592 
593   extern struct {
594     int seqsize;
595     int stepseq[100];
596   } sequence;
597 
598   extern struct {
599     double strong_eps;      /* strong criterion Stuben factor    */
600     double ramg_eps;        /* AMG convergence eps               */
601     double ramg_relax;       /* relaxation factor Gauss-Seidel/Jac*/
602     double ramg_trunc;      /* truncation select */
603     double ramg_chebyratio; /* Eigen ratio for chebyshev smoothing */
604  } amgvarr ;
605 
606   extern struct {
607     int irun_amg;           /* Employ AMG feature solfar.f      */
608     int irun_amg_prec;      /* Run AMG as preconditioner to CG */
609     int iamg_verb;          /* amg verbosity flag                */
610     int iamg_neg_sten;      /* neg only stencil or neg and pos   */
611     int iamg_nlevel;        /* number of levels 2-V etc.         */
612     int iamg_c_solver;     /* solve fine level iter. method     */
613     int iamg_init;           /* setup flag */
614     int iamg_setup_frez;    /* how many solfars to re setup amg */
615     int iamg_interp;        /* interpolation select */
616     int maxnev;             /* total eigenvectors used for ggb*/
617     int maxncv;             /* total iterative vectors for ggb*/
618     int iamg_smoother;      /* Smoother type */
619     int mlsdeg;             /* Polynomial Smoothing (MLS) degree */
620     int iamg_reduce;        /* Run a reduced case */
621  } amgvari ;
622 
623 #ifdef __cplusplus
624 }
625 #endif
626