file: include/nektar.h

/*---------------------------------------------------------------------------* * RCS Information * * * * $Source: /c/sjs/TriSpec/include/RCS/trispec.h,v $ * $Revision: 3.1 $ * $Date: 93/08/04 14:51:53 $ * $Author: sjs $ * $State: Exp $ *---------------------------------------------------------------------------*/ #include <hotel.h> #ifdef MPISRC #include <mpi.h> #define exit(a) {MPI_Abort(MPI_COMM_WORLD, -1); exit(a-1);} #endif #ifndef DIM #error Please define DIM to be 2 or 3! #endif /* general include files */ #include <math.h> #include <veclib.h> /* parameters */ #define HP_MAX 128 /* Maximum number of history points */ typedef enum { Splitting, /* Splitting scheme */ StokesSlv /* Stokes solver */ } SLVTYPE; typedef enum { /* ......... ACTION Flags .......... */ //OVERLOAD CALL: ACTION: nekcomp.h(?), nektar.h(?) Rotational, /* N(U) = U x curl U */ Convective, /* N(U) = U . grad U */ Stokes, /* N(U) = 0 [drive force only] */ Alternating, /* N(U^n,T) = U.grad T */ /* N(U^(n+1),T) = div (U T) */ StokesS, /* Steady Stokes Solve */ Oseen, /* Oseen flow */ StokesForce, /* Stokes forcing terms */ Pressure, /* div (U'/dt) */ Viscous, /* (U' - dt grad P) Re / dt */ Prep, /* Run the PREP phase of MakeF() */ Post, /* Run the POST phase of MakeF() */ Transformed, /* Transformed space */ Physical, /* Phyiscal space */ TransVert, /* Take history points from vertices */ TransEdge, /* Take history points from mid edge */ Poisson = 0, Helmholtz = 1, Laplace = 2 } ACTION; typedef struct hpnt { /* ......... HISTORY POINT ......... */ int id ; /* ID number of the element */ int i, j, k ; /* Location in the mesh ... (i,j,k) */ char flags /* The fields to echo. */ [_MAX_FIELDS]; /* (up to maxfields) */ ACTION mode ; /* Physical or Fourier space */ //OVERLOAD CALL: ACTION: nekcomp.h(?), nektar.h(?) struct hpnt *next ; /* Pointer to the next point */ //OVERLOAD CALL: hpnt: nekcomp.h(?), nektar.h(?); point: Coords.c(?), Curvi.c(?) } HisPoint; // Ce107 typedef struct intepts { int npts; Coord X; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?) double **ui; } Intepts; typedef struct gf_ { /* ....... Green's Function ........ */ int order ; /* Time-order of the current field */ Bndry *Gbc ; /* Special boundary condition array */ Element_List *basis ; /* Basis velocity (U or W) */ Element_List *Gv[DIM][_MAX_ORDER]; /* Green's function velocities */ Element_List *Gp [_MAX_ORDER]; /* Green's function pressure */ double Fg [_MAX_ORDER]; /* Green's function "force" */ } GreensF; /* local structure for global number */ typedef struct gmapping { int nvs; int nvg; int nes; int neg; int *vgid; int *egid; int nfs; int nfg; int *fgid; int nsolve; int nglobal; } Gmap; // Ce107 #ifdef MAP typedef struct mppng { /* ......... Mapping ............... */ int NZ ; /* Number of z-planes */ double time ; /* Current time */ double *d ; /* Displacement */ double *z ; /* (z-deriv) */ double *zz ; /* (zz-deriv) */ double *t ; /* Velocity */ double *tt ; /* Acceleration */ double *tz ; /* (tz-deriv) */ double *tzz ; /* (tzz-deriv) */ double *f ; /* Force */ } Map; typedef struct mstatstr { /* Moving Statistics information */ double *x; /* vector holding the x-coordinate */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) double *y; /* vector holding the y-coordinate */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *sgnx; /* vector holding the sign of dx/dt */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *sgny; /* vector holding the sign of dy/dt */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *nstat; /* vector holding the # of samples */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int n; /* number of sampling (x,y) points */ } MStatStr; #endif /* Solution Domain contains global information about solution domain */ //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) typedef struct dom { char *name; /* Name of run */ char **soln; FILE *fld_file; /* field file pointer */ FILE *dat_file; /* field file pointer */ FILE *his_file; /* history file pointer */ #ifdef FORCES FILE *fce_file; /* force file */ #endif #ifdef FLOWRATE FILE *flo_file; /* flow rate file */ #endif HisPoint *his_list; /* link list for history points */ //OVERLOAD CALL: HisPoint: nektar.h(?), nekcomp.h(?) Element_List *U, *V, *W, *P; /* Velocity and Pressure fields */ Element_List *Uf; /* --------------------------------- */ Element_List *Vf; /* Multi-step storage */ Element_List *Wf; /* --------------------------------- */ Element_List *Pf; double **u; /* Field storage */ double **v; /* Field storage */ double **w; /* Field storage */ double **uf; /* Non-linear forcing storage */ double **vf; /* Non-linear forcing storage */ double **wf; /* Non-linear forcing storage */ double **us; double **vs; double **ws; double **ps; double **mu, **mv, **mw, **mx, **my, **mz; Bndry *Ubc,*Vbc,*Wbc; /* Boundary conditons */ Bndry *Pbc; #ifdef ALI Bndry *dUdt, *dVdt; #endif Bsystem *Usys; /* Velocity Helmholtz matrix system */ Bsystem *Vsys; /* Velocity Helmholtz matrix system */ Bsystem *Wsys; /* Velocity Helmholtz matrix system */ Bsystem *Pressure_sys; /* pressure Poisson matrix system */ double **ForceFuncs; /* storage for variable forcing */ char **ForceStrings; /* string definition of forcing */ Metric *kinvis; // ALE structures Element_List **MeshX; Element_List **MeshV; Element_List *MeshVf; Bndry **MeshBCs; Bsystem *Mesh_sys; Element_List *Psegs; Element_List *PsegsF; Bsystem *Psegs_sys; Element_List *Msegs; Element_List *MsegsUF; Element_List *MsegsVF; Bsystem *Msegs_sys; int *update_list; #if 1 // MHD structures Element_List **Bi; // Induced magnetic fields Element_List **Bif; // Multistep storage Bsystem **Bibsys; // Matrix system for induced magnetic fields Bndry **Bibc; // Bndry conditions for induced magnetic fields double ***bi; double ***bis; double ***bif; double **ba; #endif #if 1 // 2d MHD structures Element_List *MagPot; Element_List *MagPotF; Bsystem *MagPot_sys; Bndry *MagPotbc; Element_List *Magx; Element_List *Magy; double **magpot; double **magpots; double **magpotf; #endif #ifdef MAP // Ce107 FILE *int_file; /* interpolation file pointer */ Map *mapx, *mapy; /* Mapping in x and y */ //OVERLOAD CALL: Map: nektar.h(?), nektar.h(?) MStatStr *mstat; /* Moving Statistics information */ //OVERLOAD CALL: MStatStr: nektar.h(?), nektar.h(?) Intepts *int_list; /* link list for interpolation points*/ #endif } Domain; /* function in drive.c */ void solve(Element_List *U, Element_List *Uf,Bndry *Ubc,Bsystem *Ubsys,SolveType Stype,int step); /* functions in prepost.c */ void parse_args (int argc, char **argv); void PostProcess(Domain *omega, int, double); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) Domain *PreProcess (int argc, char **argv); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void set_vertex_links(Element_List *UL); void LocalNumScheme (Element_List *E, Bsystem *Bsys, Gmap *gmap); //OVERLOAD CALL: Gmap: nekcomp.h(?), nektar.h(?) Gmap *GlobalNumScheme(Element_List *E, Bndry *Ebc); //OVERLOAD CALL: Gmap: nekcomp.h(?), nektar.h(?) void free_gmap(Gmap *gmap); //OVERLOAD CALL: Gmap: nekcomp.h(?), nektar.h(?) void free_Global_info(Element_List *Mesh, Bndry *Meshbc, Gmap *gmap, int lnel); //OVERLOAD CALL: Gmap: nekcomp.h(?), nektar.h(?) /* functions in io.c */ void ReadParams (FILE *rea); void ReadPscals (FILE *rea); void ReadLogics (FILE *rea); Element_List *ReadMesh (FILE *rea,char *); void ReadKinvis (Domain *); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadICs (FILE *, Domain *); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadICs_P (FILE *, Domain *, Element_List *Mesh); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadDF (FILE *fp, int nforces, ...); void summary (void); void ReadSetLink (FILE *fp, Element_List U[]); void ReadSetLink (FILE *fp, Element *U); Bndry *ReadBCs (FILE *fp, Element U[]); Bndry *ReadMeshBCs (FILE *fp, Element_List *Mesh); Bndry *bsort (Bndry *, int ); void read_connect (FILE *name, Element_List *); void ReadOrderFile (char *name,Element_List *E); void ReadHisData (FILE *fp, Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadSoln (FILE* fp, Domain* omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadDFunc (FILE *fp, Domain *Omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadDFunc (FILE *fp, Domain *Omega, Element_List *U); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadWave (FILE *fp, double **wave, Element_List *U); /* structure specific to bwoptim and recurSC */ typedef struct facet{ int id; struct facet *next; //OVERLOAD CALL: facet: nekcomp.h(?), nektar.h(?) } Facet; typedef struct fctcon{ int ncon; Facet *f; //OVERLOAD CALL: Facet: nektar.h(?), nekcomp.h(?) } Fctcon; /* function in bwoptim.c */ void bandwidthopt (Element *E, Bsystem *Bsys); void MinOrdering (int nsols, Fctcon *ptcon, int *newmap); //OVERLOAD CALL: Fctcon: nektar.h(?), nekcomp.h(?) void addfct(Fctcon *con, int *pts, int n); //OVERLOAD CALL: Fctcon: nektar.h(?), nekcomp.h(?) void free_Fctcon (Fctcon *con, int n); //OVERLOAD CALL: Fctcon: nektar.h(?), nekcomp.h(?) /* functions in recurrSC.c */ void Recursive_SC_decom(Element *E, Bsystem *B); /* functions in convective.c */ void VdgradV (Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) /* functions in rotational.c */ void VxOmega (Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) /* functions in pressure.c */ Bndry *BuildPBCs (Element_List *P, Bndry *temp); void SetPBCs (Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void Set_Global_Pressure(Element_List *Mesh, Bndry *Meshbcs); void Replace_Numbering(Element_List *UL, Element_List *GUL); /* function in stokes.c */ void StokesBC (Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) /* functions in analyser.c */ void Analyser (Domain *omega, int step, double time); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) #ifdef FORCES /* functions in forces */ void forces (Domain *omega, double time); //OVERLOAD CALL: forces: forces.c(?), forces.c(?); Domain: nekcomp.h(?), nektar.h(?) #endif // Functions in ALE Bndry *BuildMeshBCs(Element_List *M, Bndry *Ubc); void Update_Mesh(Domain *Omega, int Je, double dt); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) //void Update_Mesh (Domain *Omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void setup_ALE (Domain *Omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void setup_ALE (Domain *Omega, Element_List *, Bndry *); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void Update_Mesh_Velocity(Domain *Omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void Set_Mesh(Domain *Omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void set_ALE_ICs(Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void set_soliton_ICs(Element_List *U, Element_List *V); void set_soliton_BCs(Bndry *Ubc, Bndry *Vbc, char ch); void update_paddle(Element_List *, Bndry *); // Functions in smoother Element_List *setup_seglist(Bndry *Ubc, char type); Bsystem *setup_segbsystem(Element_List *seg_list); void fill_seglist(Element_List *seg_list, Bndry *Ubc); void fill_bcs(Element_List *seg_list, Bndry *Ubc); void update_seg_vertices(Element_List *, Bndry *); void update_surface(Element_List *EL, Element_List *EL_F, Bsystem *Bsys, Bndry *BCs); //void smooth_surface(Element_List *EL, Element_List *EL_F, // Bsystem *Bsys, Bndry *BCs); void smooth_surface(Domain *, Element_List *segs, Bsystem *Bsys, Bndry *BCs); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void test_surface(Bndry *Ubc, char type); // functions in magnetic void Set_Global_Magnetic(Element_List *Mesh, Bndry *Meshbcs); void ReadAppliedMag(FILE* fp, Domain* omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) double cfl_checker(Domain *omega, double dt); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) // functions in mpinektar.C void init_mpi(int*, char **); void end_mpi(); /* functions in mlevel.C */ void Mlevel_SC_decom(Element_List *E, Bsystem *B); #ifdef MAP typedef struct mppng { /* ......... Mapping ............... */ int NZ ; /* Number of z-planes */ double time ; /* Current time */ double *d ; /* Displacement */ double *z ; /* (z-deriv) */ double *zz ; /* (zz-deriv) */ double *t ; /* Velocity */ double *tt ; /* Acceleration */ double *tz ; /* (tz-deriv) */ double *tzz ; /* (tzz-deriv) */ double *f ; /* Force */ } Map; typedef struct mstatstr { /* Moving Statistics information */ double *x; /* vector holding the x-coordinate */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) double *y; /* vector holding the y-coordinate */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *sgnx; /* vector holding the sign of dx/dt */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *sgny; /* vector holding the sign of dy/dt */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int *nstat; /* vector holding the # of samples */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?) int n; /* number of sampling (x,y) points */ } MStatStr; #endif /* ce107 changes begin */ int backup (char *path1); void ReadIntData (FILE *fp, Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadSoln (FILE *fp, Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void ReadMStatPoints(FILE* fp, Domain* omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void averagefields (Domain *omega, int nsteps, double time); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) double VolInt (Element_List *U, double shift); double VolInt (Element_List *U); double L2norm (Element_List *V); void average_u2_avg(Domain *omega, int step, double time); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) void init_avg(Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) /* functions in interp */ void interp(Domain *omega); //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) /* ce107 changes end */


Back to Source File Index


C++ to HTML Conversion by ctoohtml