file: include/nekstruct.h
/*---------------------------------------------------------------------------*
* RCS Information *
* *
* $Source: /users/sjs/Nektar/lib/include/RCS/nekstruct.h,v $
* $Revision: 2.0 $
* $Date: 1994/11/01 22:44:13 $
* $Author: sjs $
* $State: Exp $
*---------------------------------------------------------------------------*/
/*
* This file contains all structures used by the Nektar source code
*/
#ifndef NEKSTRUCT_H
#define NEKSTRUCT_H
#define MAXFIELDS 15
class Vert;
class Edge;
class Face;
class Element;
class Bsystem;
class Dorp;
class Metric;
class Coord; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
class Geom;
class C_Arc;
class C_Naca4;
class C_Cylinder;
class C_Cone;
class C_Sheet;
class C_Spiral;
class C_Taurus;
class C_Ellipse;
//class CurveInfo;
union CurveInfo;
class Curve;
class Cmodes;
class Element;
class Bndry;
class MatSys;
class MatPre; //OVERLOAD CALL: MatPre: nekstruct.h(?), nekstruct.h(?)
class P_Diag;
class P_Block;
union PreInfo;
union Precond; //OVERLOAD CALL: Precond: nekstruct.h(?), nekstruct.h(?)
class Recur;
class Rsolver;
class Bsystem;
class Field;
class Element_List;
class Fourier_List;
class Membrane;
enum Nek_Facet_Type{
Nek_Vert,
Nek_Edge,
Nek_Face,
Nek_Tri,
Nek_Quad,
Nek_Nodal_Quad,
Nek_Nodal_Tri,
Nek_Tet,
Nek_Pyr,
Nek_Prism,
Nek_Hex,
Nek_Element,
Nek_Seg,
Nek_Quad_red
};
// J == Jacobii coefficients
// Q == quadrature values
// F == Fourier coefficients
// P == Physical coefficients
enum Nek_State{
JF,
JP,
QF,
QP,
J,
Q
};
// Ce107
enum Nek_Trans_Type{
J_to_Q, // Jacobi basis -> Quadrature basis
Q_to_J, // Quadrature basis -> Jacobi basis
F_to_P, // Fourier basis -> Physical basis
P_to_F, // Physical basis -> Fourier basis
O_to_Q, // Orthogonal basis -> Quadrature basis
Q_to_O, // Quadrature basis -> Orthogonal basis
F_to_P32, // Fourier basis -> Physical basis (dealiased)
P_to_F32 // Physical basis -> Fourier basis (dealiased)
};
class Dorp{
public:
double d; /* double value for straigth sided elements */
double *p; /* pointer for curved side elements */
};
/* Vertex Structure on triangle/tetrahedral */
class Vert { /* ........... VERTEX definition ............. */
public:
int id; /* vertex id */
int gid; /* Global vertex id */
int eid; /* Element id */
int solve; /* solution values to be solved for */
double x, y, z; /* x,y and z coordinates of vertex */
double *hj; /* value of solution at vertex */
Vert *base; /* pointer to base edge in connected group */
Vert *link; /* Pointer to linked edge in connected group */
};
/* Edge Structure on triangle/tetrahedral */
class Edge { /* ........... EDGE definition ............... */
public:
int id; /* edge id */
int gid; /* Global edge id */
int eid; /* Element id */
int l; /* Number of modes along this edge */
int con; /* connectivity trip */
double *hj; /* modal value of solution along boundary */
Edge *base; /* pointer to base edge in connected group */
Edge *link; /* Pointer to linked edge in connected group */
int qedg; /* number of gauss quadrature points in edge */
double *h; /* physical space storage for edge information */
double *jac; /* edge jacobean/element jacobian at gauss pts */
double weight; /* area weighting for viscous terms */
Coord *norm; /* edge normals at gauss points */ //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
};
/* Face Structure on triangle/tetrahedral */
class Face { /* ........... FACE definition ............... */
public:
int id; /* face id */
int gid; /* Global face id */
int eid; /* Element id */
int l; /* Number of modes along this face */
int con; /* connectivity trip for dsum */
double **hj; /* modal values along faces */
Face *link; /* Pointer to the linked face if any */
int qface; /* number of gauss quadrature points in edge */
double *h; /* physical space storage for edge information */
double *jac; /* edge jacobean/element jacobian at gauss pts */
double weight; /* area weighting for viscous terms */
Coord *n; /* face normals at gauss points */ //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
Coord *t; /* face tangents at gauss points */ //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
Coord *b; /* edge binormal at gauss points */ //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
};
class Coord{
public:
double *x;
double *y;
double *z;
};
/* geometric information */
class Geom{
public:
int id; /* geom structure id */
double dx[Max_Nverts]; /* dx between vertices */
double dy[Max_Nverts]; /* dy between vertices */
double dz[Max_Nverts]; /* dz between vertices */
Dorp rx,ry,rz; /* r geometric factors (3D) */
Dorp sx,sy,sz; /* s geometric factors (3D) */
Dorp tx,ty,tz; /* t geometric factors (3D) */
Dorp jac; /* Jacobian */
Element *elmt; /* generating element */
Geom *next; /* next structure in list */
int singular; /* flag to show if mapping is singular */
};
/* -------- C U R V E D S I D E T Y P E S ---------- */
class C_Arc { /* .............. Arc .............. */
public:
double xc, yc; /* Coordinates of the center */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?)
double radius; /* Radius of the curve */
}; /* --------------------------------- */
class C_Naca4 { /* .............. Arc .............. */
public:
double xl, yl; /* Leading edge coordinates */
double xt, yt; /* Trailing edge coordinates */
double thickness; /* Thickness */
}; /* --------------------------------- */
class C_Sin {
public:
double xo, yo;
double amp;
double wavelength;
};
class C_File { /* ............. File .............. */
public:
char * name; /* The name of the file to read */
double xoffset; /* Possible offsets of the */
double yoffset; /* geometry for the current edge */
int vert[Max_Nverts]; /* Possible offsets of the */
}; /* --------------------------------- */
class C_Ellipse {
public:
double xo, yo;
double rmin, rmaj;
};
// new for 3d
class C_Cylinder {/* .......... Cylinder ............. */
public:
double xc, yc, zc; /* Point on cylinder axis */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?); Point: Coords.c(?), Curvi.c(?)
double ax, ay, az; /* Direction vector of axis */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
double radius; /* Radius of the cylinder */
}; /* --------------------------------- */
class C_Cone { /* ............ Cone ............. */
public:
double xc, yc, zc; /* Point at cone apex */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?); Point: Coords.c(?), Curvi.c(?)
double ax, ay, az; /* Direction vector of axis */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
double alpha; /* Expansion factor (rad = alpha z) */
};
class C_Sphere { /* ............ Cone ............. */
public:
double xc, yc, zc; /* center of sphere */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?)
double radius; /* radius of sphere */
}; /* --------------------------------- */
class C_Sheet {/* .......... Sheet ......................... */
public:
double xc, yc, zc; /* Point on sheet axis */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?); Point: Coords.c(?), Curvi.c(?)
double ax, ay, az; /* Direction vector of axis */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
double twist; /* Twist of sheet rate/z unit */
double zerotwistz; /* Twist of the sheet in at zero 'z' */
}; /* --------------------------------------- */
class C_Spiral {/* .......... Spiral ....................... */
public:
double xc, yc, zc; /* Point on spiral axis */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?); Point: Coords.c(?), Curvi.c(?)
double ax, ay, az; /* Direction vector of axis */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
double axialradius; /* axial radius */
double piperadius; /* pipe radius */
double pitch; /* Twist of spiral rate/z unit */
double zerotwistz; /* Twist of the sheet in at zero 'z' */
};
class C_Taurus {/* .......... Taurus ....................... */
public:
double xc, yc, zc; /* Point on taurus axis */ //OVERLOAD CALL: xc: Coords.c(?), Curvi.c(?); Point: Coords.c(?), Curvi.c(?)
double ax, ay, az; /* Direction vector of axis */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
double axialradius; /* axial radius */
double piperadius; /* pipe radius */
};
class C_Naca3d {/* .......... Naca3d ....................... */
public:
Coord *origin; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
Coord *axis; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
Coord *lead; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
Coord *locz; //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
double length; /* length of foil */
double thickness; /* % of length */
};
class C_Naca2d {/* .......... Naca3d ....................... */
public:
double length; /* length of foil */
double thickness; /* % of length */
double xo;
double yo;
};
union CurveInfo { /* ....... Curved Side Infos ....... */
C_Arc arc; /* an arc with specified curvature */
C_Naca4 nac; /* Naca4 digit aerofoil */
C_File file; /* Spline fit from file data */
C_Sin sin;
C_Naca2d nac2d; /* Symmetric naca */
C_Ellipse ellipse;
C_Cylinder cyl; /* cylinder specification */
C_Cone cone; /* cone specification */
C_Sphere sph; /* sphere specification */
C_Sheet she; /* sheet specification */
C_Spiral spi; /* spiral specification */
C_Taurus tau;
C_Naca3d nac3d; /* 3d Naca 00%% specification */
}; /* --------------------------------- */
enum CurveType{ /* ....... Curved Side Types ....... */
T_Straight, /* straight edge */
T_Arc, /* arc */
T_Naca4, /* Naca 4 digit aerofoil */
T_File, /* Spline fit from file data */
T_Sin, /* Sin curve */
T_Naca2d, /* Symmetric Naca foil */
T_Ellipse, /* Ellipse */
T_Cylinder, /* cylinder */
T_Cone, /* cone */
T_Sphere, /* sphere */
T_Sheet, /* sheet */
T_Spiral, /* spiral */
T_Taurus, /* taurus */
T_Naca3d, /* 2d naca 00%% foil with hom. direction */
T_Curved /* straight edge */
};
class Curve { /* .... CURVED SIDE Definition ..... */
public:
int id; /* curve id */
int face; /* face id of curved side */
CurveType type; /* curve types */
CurveInfo info; /* curve defs */
Curve *next;
}; /* --------------------------------- */
// Warning
#define MAXFACETS 12
class Cmodes{
public:
double *Cedge[MAXFACETS]; /* Modes of curved co-ordinates along edge */
double **Cface[Max_Nfaces]; /* Modes of curved co-ordinates along face */
};
/* Element Structure on triangle/tetrahedral */
class Element{
public:
int id; /* Element number */
char type; /* Element type */
char state; /* transformed state: 'p'=physical, */
/* 't'=transformed */
int Nverts; /* Number of vertices */
int Nedges; /* Number of vertices */
int Nfaces; /* Number of edges */
int interior_l; /* number of a modes in interior */
int lmax; /* maximum l order in element */
int Nmodes; /* number of expansion modes in element */
int Nbmodes; /* number of boundary expansion modes */
int qa; /* number of quadrature points for a dir. */
int qb; /* number of quadrature points for b dir. */
int qc; /* number of quadrature points for c dir. */
int qtot; /* total number of quadrature points */
Vert *vert; /* start of vert structure for element */
Edge *edge; /* start of edge structure for element */
Face *face; /* start of face structure for element */
double **h; /* h(x,y) physical */
double ***h_3d; // 3d field storage
double ***hj_3d; // 3d interior modes storage
Curve *curve; /* curve structure for this element */
Cmodes *curvX; /* curved surface modal co-ordinates */
Geom *geom; /* Geometric factors for element */
Element *next; /* link list to next element */
int dgL; /* order to use in discontinuous galerkin code */
Element(); // default constructor //OVERLOAD CALL: Element: Element.c(Element), Element.c(Element), Element.c(Element)
Element(const Element&); // copy constructor //OVERLOAD CALL: Element: Element.c(Element), Element.c(Element), Element.c(Element)
Element(Element*); // copy constructor //OVERLOAD CALL: Element: Element.c(Element), Element.c(Element), Element.c(Element)
// Local Matrix builders
virtual void MassMat (LocMat *); // return mass-matri(ces) //OVERLOAD CALL: MassMat: Matrix.c(Tri), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex)
virtual void MassMatC(LocMat *); //OVERLOAD CALL: MassMatC: Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element)
virtual void HelmMatC(LocMat *, Metric *lambda); // return Helmholtz op. //OVERLOAD CALL: HelmMatC: Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element)
virtual void LapMat (LocMat *); // return Laplacian op. //OVERLOAD CALL: LapMat: Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex)
virtual void mat_free(LocMat *m); //OVERLOAD CALL: mat_free: Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element), Memory.c(Tri), Memory.c(Quad), Memory.c(Tet)
virtual LocMat *mat_mem(); //OVERLOAD CALL: mat_mem: Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element), Memory.c(Tri), Memory.c(Quad), Memory.c(Tet)
virtual void fill_diag_massmat(); // fill modes with mass diagonal //OVERLOAD CALL: fill_diag_massmat: Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element)
virtual void fill_diag_helmmat(Metric *lambda); // fill modes with helm diagonal //OVERLOAD CALL: fill_diag_helmmat: Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet), Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element)
// Memory storage functions
virtual void Mem_J(int *, char); //OVERLOAD CALL: Mem_J: Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
virtual void Mem_Q(); //OVERLOAD CALL: Mem_Q: Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
virtual void Mem_shift(double *, double *, char); // updates storage pters //OVERLOAD CALL: Mem_shift: Element_List.c(Element_List), Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
virtual void Mem_free(); // frees existing storage //OVERLOAD CALL: Mem_free: Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
// Inner Product routines
virtual double iprod(Mode *x, Mode *y); //OVERLOAD CALL: iprod: InnerProd.c(Hex), InnerProd.c(Element), InnerProd.c(Tri), InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism)
virtual double iprodlap(Mode *x, Mode *y, Mode *fac); //OVERLOAD CALL: iprodlap: InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex), InnerProd.c(Element), InnerProd.c(Tri)
// Helmholtz
virtual void HelmHoltz(Metric *lambda); //OVERLOAD CALL: HelmHoltz: InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex), InnerProd.c(Element), Element_List.c(Element_List), InnerProd.c(Tri)
virtual void form_diprod(double *u1, double *u2, double *u3, Mode *m); //OVERLOAD CALL: form_diprod: InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex), InnerProd.c(Element), InnerProd.c(Tri), InnerProd.c(Quad), InnerProd.c(Tet)
// Global matrix routines
virtual void condense(LocMat *m, Bsystem *Ubsys); //OVERLOAD CALL: condense: Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element), Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet)
virtual void project(LocMat *m, Bsystem *Ubsys); //OVERLOAD CALL: project: Matrix.c(Pyr), Matrix.c(Prism), Matrix.c(Hex), Matrix.c(Element), Matrix.c(Tri), Matrix.c(Quad), Matrix.c(Tet)
// Bndry routines
virtual Bndry *gen_bndry(char bc, int face, ...); //OVERLOAD CALL: gen_bndry: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void update_bndry(Bndry *); //OVERLOAD CALL: update_bndry: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void MemBndry(Bndry *B, int face, int Je); //OVERLOAD CALL: MemBndry: Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
virtual void JtransEdge(Bndry *B, int id, int loc, double *f); //OVERLOAD CALL: JtransEdge: Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element)
virtual void JtransFace(Bndry *, double *); //OVERLOAD CALL: JtransFace: Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element), Transforms.c(Tri)
virtual void MakeFlux(Bndry *B, int iface, double *f); //OVERLOAD CALL: MakeFlux: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
// Element Identifier
virtual Nek_Facet_Type identify(){ return Nek_Element;} // identify
// Transformation routines
virtual void Trans (Element *, Nek_Trans_Type); // Transform to Element //OVERLOAD CALL: Trans: Element_List.c(Element_List), Transforms.c(Element), Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex)
virtual void Iprod (Element *); // Inner product to Elmt //OVERLOAD CALL: Iprod: InnerProd.c(Element), Element_List.c(Element_List), InnerProd.c(Tri), InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex)
virtual void Jbwd (Element*, Basis*); //OVERLOAD CALL: Jbwd: Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element)
virtual void Jfwd (Element*); //OVERLOAD CALL: Jfwd: Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element)
void EdgeJbwd(double *, int); // Edge J_to_Q //OVERLOAD CALL: EdgeJbwd: Element.c(Element), Transforms.c(Element)
// orthogonal transform routines
virtual void Obwd (double *, double *, int); //OVERLOAD CALL: Obwd: Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element)
virtual void Ofwd (double *, double *, int); //OVERLOAD CALL: Ofwd: Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex), Transforms.c(Element)
virtual void Add_Surface_Contrib(Element *, double *in, char dir); //OVERLOAD CALL: Add_Surface_Contrib: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void fill_edges(double *ux, double *uy, double *uz); //OVERLOAD CALL: fill_edges: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void Sign_Change(); // correct mode signs //OVERLOAD CALL: Sign_Change: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
// Derivatives routines
virtual void Grad (Element *, Element *, Element *, char Trip); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad)
virtual void Grad_d (double *, double *, double *, char Trip); //OVERLOAD CALL: Grad_d: Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex)
virtual void Grad_h (double *, double *, double *, double *, char Trip); //OVERLOAD CALL: Grad_h: Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex)
//Get differential matrix
virtual void getD(double ***da, double ***dat,double ***db,double ***dbt, //OVERLOAD CALL: getD: Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Gradient.c(Element)
double ***dc, double ***dct);
virtual void fillElmt(Mode *v); //OVERLOAD CALL: fillElmt: Basis.c(Tri), Basis.c(Quad), Basis.c(Tet), Basis.c(Pyr), Basis.c(Prism), Basis.c(Hex), Basis.c(Element)
virtual void fill_gradbase(Mode *gb, Mode *m, Mode *mb, Mode *fac); //OVERLOAD CALL: fill_gradbase: Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Gradient.c(Element)
virtual Basis *getbasis(); //OVERLOAD CALL: getbasis: Basis.c(Tri), Basis.c(Quad), Basis.c(Tet), Basis.c(Pyr), Basis.c(Prism), Basis.c(Hex), Basis.c(Element)
virtual Basis *derbasis(); //OVERLOAD CALL: derbasis: Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Gradient.c(Element)
// Co-ordinate functions
virtual void set_curved(Curve*); // fix curve sides //OVERLOAD CALL: set_curved: Pyr.h(?), Quad.h(?), Tet.h(?), Tri.h(?), Hex.h(?), Prism.h(?)
virtual void coord(Coord *X); // get quadrature coords //OVERLOAD CALL: coord: Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element), Coords.c(Tri), Coords.c(Quad); Coord: nekstruct.h(?), hotel.h(?)
virtual void fillvec(Mode *v, double *f); //OVERLOAD CALL: fillvec: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual void straight_elmt(Coord *X); //OVERLOAD CALL: straight_elmt: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element); Coord: nekstruct.h(?), hotel.h(?)
virtual void curved_elmt(Coord *X); //OVERLOAD CALL: curved_elmt: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element); Coord: nekstruct.h(?), hotel.h(?)
virtual void straight_edge(Coord *X, int edge); //OVERLOAD CALL: straight_edge: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element); Coord: nekstruct.h(?), hotel.h(?)
virtual void GetFaceCoord(int face, Coord *X); //OVERLOAD CALL: GetFaceCoord: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element); Coord: nekstruct.h(?), hotel.h(?)
// Error functions
virtual void Set_field(char *string); // set field to function //OVERLOAD CALL: Set_field: Element_List.c(Element_List), Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual void Error(char *string); // compare with function //OVERLOAD CALL: Error: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double L2_error_elmt(char *string); //OVERLOAD CALL: L2_error_elmt: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double H1_error_elmt(char *string); //OVERLOAD CALL: H1_error_elmt: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual void Verror(double *u, char *string); //OVERLOAD CALL: Verror: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double Int_error( char *string); //OVERLOAD CALL: Int_error: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double Norm_li(); //OVERLOAD CALL: Norm_li: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double Norm_l2(); //OVERLOAD CALL: Norm_l2: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual void Norm_l2m(double *l2, double *area); //OVERLOAD CALL: Norm_l2m: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual double Norm_h1(); //OVERLOAD CALL: Norm_h1: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
virtual void Norm_h1m(double *h1, double *area); //OVERLOAD CALL: Norm_h1m: Norms.c(Tri), Norms.c(Quad), Norms.c(Tet), Norms.c(Pyr), Norms.c(Prism), Norms.c(Hex), Norms.c(Element)
// Curved sides
virtual void set_curved_elmt(Element_List*); //OVERLOAD CALL: set_curved_elmt: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element)
virtual void CoordTransEdge(double *f, double *fhat, int edge); //OVERLOAD CALL: CoordTransEdge: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element)
virtual void get_mmat1d(double **mat, int L); //OVERLOAD CALL: get_mmat1d: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
// Geometric factors
virtual void set_geofac(); //OVERLOAD CALL: set_geofac: Geofac.c(Tri), Geofac.c(Quad), Geofac.c(Tet), Geofac.c(Pyr), Geofac.c(Prism), Geofac.c(Hex), Geofac.c(Element)
virtual void free_geofac(); //OVERLOAD CALL: free_geofac: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element)
virtual void move_vertices(Coord *X); //OVERLOAD CALL: Coord: nekstruct.h(?), hotel.h(?)
virtual void Surface_geofac(Bndry *B); //OVERLOAD CALL: Surface_geofac: Coords.c(Tri), Coords.c(Quad), Coords.c(Tet), Coords.c(Pyr), Coords.c(Prism), Coords.c(Hex), Coords.c(Element)
virtual void InterpToFace1(int from_face, double *f, double *fi); //OVERLOAD CALL: InterpToFace1: Interp.c(Tri), Interp.c(Quad), Interp.c(Tet), Interp.c(Pyr), Interp.c(Prism), Interp.c(Hex), Interp.c(Element)
virtual void InterpToGaussFace(int from_face, double *f, //OVERLOAD CALL: InterpToGaussFace: Interp.c(Pyr), Interp.c(Prism), Interp.c(Hex), Interp.c(Element), Interp.c(Tri), Interp.c(Quad), Interp.c(Tet)
int qaf, int qbf, double *fi);
virtual void GetFace(double *, int, double*); //OVERLOAD CALL: GetFace: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual void dump_mesh(FILE *); //OVERLOAD CALL: dump_mesh: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
// B.C. functions
virtual void set_solve(int fac, int mask); //OVERLOAD CALL: set_solve: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void Add_flux_terms(Bndry *Ebc); //OVERLOAD CALL: Add_flux_terms: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual void setbcs(Bndry *Ubc,double *bc); //OVERLOAD CALL: setbcs: Boundary.c(Tri), Boundary.c(Quad), Boundary.c(Tet), Boundary.c(Pyr), Boundary.c(Prism), Boundary.c(Hex), Boundary.c(Element)
virtual int Nfmodes(void); //OVERLOAD CALL: Nfmodes: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual int vnum(int,int); //OVERLOAD CALL: vnum: Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element), Nums.c(Tri)
virtual int fnum(int,int); //OVERLOAD CALL: fnum: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual int fnum1(int,int); //OVERLOAD CALL: fnum1: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual int ednum(int,int); //OVERLOAD CALL: ednum: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual int ednum1(int,int); //OVERLOAD CALL: ednum1: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual int dim(); //OVERLOAD CALL: dim: Pyr.h(?), Quad.h(?), Tet.h(?), Tri.h(?), Hex.h(?), Prism.h(?)
virtual int Nfverts(int); //OVERLOAD CALL: Nfverts: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
// Eigenvalue routines
virtual void fill_column(double **Mat, int loc, Bsystem *B, //OVERLOAD CALL: fill_column: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
int nm, int offset);
virtual void WeakDiff(Mode *m, double *ux, double *uy,double *uz, int con); //OVERLOAD CALL: WeakDiff: Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Gradient.c(Element)
// field file routines
virtual int data_len(int *size);
virtual void Copy_field(double *, int *); //OVERLOAD CALL: Copy_field: Fieldfiles.c(Tri), Fieldfiles.c(Quad), Fieldfiles.c(Tet), Fieldfiles.c(Pyr), Fieldfiles.c(Prism), Fieldfiles.c(Hex), Fieldfiles.c(Element)
virtual void close_split(Element_List *EL, Bndry **, int, int *&flag); //OVERLOAD CALL: close_split: Refine.c(Tri), Refine.c(Quad), Refine.c(Tet), Refine.c(Pyr), Refine.c(Prism), Refine.c(Hex)
virtual void split_element(Element_List *EL, Bndry **, int, int *&flag); //OVERLOAD CALL: split_element: Refine.c(Tri), Refine.c(Quad), Refine.c(Tet), Refine.c(Pyr), Refine.c(Prism), Refine.c(Hex), Refine.c(Element)
virtual void split_edge(int edg, Element_List *EL, Bndry **Ubc, int nfields,int *flag); //OVERLOAD CALL: split_edge: Refine.c(Tri), Refine.c(Quad), Refine.c(Tet), Refine.c(Pyr), Refine.c(Prism), Refine.c(Hex), Refine.c(Element)
virtual void delete_element(Element_List *EL, Bndry **, int, int *flag); //OVERLOAD CALL: delete_element: Refine.c(Tri), Refine.c(Quad), Refine.c(Tet), Refine.c(Pyr), Refine.c(Prism), Refine.c(Hex), Refine.c(Element)
virtual void set_edge_geofac(); //OVERLOAD CALL: set_edge_geofac: Geofac.c(Tri), Geofac.c(Quad), Geofac.c(Tet), Geofac.c(Pyr), Geofac.c(Prism), Geofac.c(Hex), Geofac.c(Element)
virtual void PutFace(double*, int); //OVERLOAD CALL: PutFace: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual void GetZW(double **za, double **wa, double **zb, double **wb, double **zc, double **wc); //OVERLOAD CALL: GetZW: Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual int edvnum(int,int); //OVERLOAD CALL: edvnum: Nums.c(Tri), Nums.c(Quad), Nums.c(Tet), Nums.c(Pyr), Nums.c(Prism), Nums.c(Hex), Nums.c(Element)
virtual void DivMat (LocMatDiv *, Element *P); // return Divergence op. //OVERLOAD CALL: DivMat: Matrix_Stokes.c(Tri), Matrix_Stokes.c(Quad)
virtual void divmat_free(LocMatDiv *m); //OVERLOAD CALL: divmat_free: Memory.c(Tri), Memory.c(Quad), Memory.c(Element)
virtual LocMatDiv *divmat_mem(Element *P); //OVERLOAD CALL: divmat_mem: Memory.c(Tri), Memory.c(Quad), Memory.c(Element)
virtual double get_1diag_massmat(int id); /* get diagional component of //OVERLOAD CALL: get_1diag_massmat: Misc.c(Tri), Misc.c(Quad), Misc.c(Element)
mass matrix corres. to id */
virtual void condense_stokes(LocMat *m, LocMatDiv *d, Bsystem *Ubsys, //OVERLOAD CALL: condense_stokes: Matrix_Stokes.c(Tri), Matrix_Stokes.c(Quad), Matrix_Stokes.c(Element)
Bsystem *Pbsys, Element *P);
virtual void project_stokes(Bsystem *Pbsys, int asize, int geom_id); //OVERLOAD CALL: project_stokes: Matrix_Stokes.c(Tri), Matrix_Stokes.c(Quad), Matrix_Stokes.c(Element)
};
#if 0
class Multi_RHS{
public:
int Nrhs;
int step;
int nsolve;
double *alpha;
double **bt;
double **xt;
};
#endif
class Multi_RHS {
public:
char type;
int Nrhs;
int step;
int nsolve;
double *alpha;
double **bt;
double **xt;
Multi_RHS *next; //OVERLOAD CALL: Multi_RHS: nekstruct.h(?), nekstruct.h(?)
};
class Element_List{
public:
Element *fhead;
Element **flist;
int nel;
int htot; // quadrature points in one level
int hjtot; // sum of Nmodes over elements in one level
double *base_h;
double *base_hj;
// Fourier information
Element_List **flevels; // Fourier lists
int nz;
int nztot;
Element_List();
Element_List(Element **hea, int n);
virtual Element *operator()(int i);
virtual Element *operator[](int i);
virtual void Cat_mem();
virtual void Mem_shift(double *, double *); //OVERLOAD CALL: Mem_shift: Element_List.c(Element_List), Memory.c(Tri), Memory.c(Quad), Memory.c(Tet), Memory.c(Pyr), Memory.c(Prism), Memory.c(Hex), Memory.c(Element)
virtual Element_List *gen_aux_field(char ty);
virtual void Terror(char *string);
virtual void Trans(Element_List *EL, Nek_Trans_Type ntt); //OVERLOAD CALL: Trans: Element_List.c(Element_List), Transforms.c(Element), Transforms.c(Tri), Transforms.c(Quad), Transforms.c(Tet), Transforms.c(Pyr), Transforms.c(Prism), Transforms.c(Hex)
virtual void Iprod(Element_List *EL); //OVERLOAD CALL: Iprod: InnerProd.c(Element), Element_List.c(Element_List), InnerProd.c(Tri), InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex)
virtual void Grad(Element_List *AL, Element_List *BL, Element_List *CL, char Trip); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad)
virtual void Grad_d (double *, double *, double *, char Trip); //OVERLOAD CALL: Grad_d: Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex)
virtual void Grad_h (double *HL, double *AL, double *BL, double *CL, char Trip); //OVERLOAD CALL: Grad_h: Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad), Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex)
virtual void HelmHoltz(Metric *lambda); //OVERLOAD CALL: HelmHoltz: InnerProd.c(Quad), InnerProd.c(Tet), InnerProd.c(Pyr), InnerProd.c(Prism), InnerProd.c(Hex), InnerProd.c(Element), Element_List.c(Element_List), InnerProd.c(Tri)
virtual void Set_field(char *string); //OVERLOAD CALL: Set_field: Element_List.c(Element_List), Misc.c(Tri), Misc.c(Quad), Misc.c(Tet), Misc.c(Pyr), Misc.c(Prism), Misc.c(Hex), Misc.c(Element)
virtual void zerofield();
virtual void FFT(Element_List *EL, Nek_Trans_Type ntt);
virtual void Grad_z(Element_List *EL);
virtual void Set_state(char type);
virtual void H_Refine(int * to_split, int nfields, Bndry **Ubc, int *flag);
};
/* structure for each face on boundary */
class Bndry{
public:
int id; /* bndry number */
char type; /* type of boundary used by library */
char usrtype; /* type of boundary used by src */
int face; /* face/edge boundary conditions are for */
double *bvert; /* vertex boundary information */
// new for 3d
double *bedge[4]; /* edge information */
double **bface; /* face information */
double *DirRHS; /* RHS vector of fixed time Dirichlet */ //OVERLOAD CALL: vector: Coords.c(?), Curvi.c(?)
/* values (not used if not initialised */
char *bstring; /* String read in from .rea file */
Dorp nx; /* x component of surface normal */
Dorp ny; /* y component of surface normal */
Dorp nz; /* z component of surface normal */
Dorp sjac; /* surface jacobean */
Dorp K; /* Curvature of the surface */
Element *elmt; /* element that boundary side is on */
Bndry *next;
// new for Compressible
double *phys_val; /* physical values for Dirichlet b.c. */
double *phys_val_g; /* physical values for Dirichlet b.c. */
};
/* Direct solve matrix system */
class MatSys{
public:
double **inva; /* inverse of global elemental boundary matrix */
double **a; /* local a matrix used in iterative solver */
double **binvc; /* b * inv(c) */
double **invc; /* inverse of interior-interior matrix */
double **invcd; /* inv(c) * d for non-symetric solver */
int **cipiv; /* pivot for inv(c) in non-symmetric solve */
double **d; /* interior-boundary for non-symmetric system */
int bwidth_a; /* bandwidth of boundary-boundary matrix */
int *bwidth_c;/* bandwidth of interior-interior matrix */
double ***dbinvc;/* dib *inv(c) where i = x,y or z */
int *pivota; /* pivot for inverse if system is not positive def. */
};
class P_Diag{
public:
int ndiag; /* number of entries */
double *idiag; /* inverse of diagonal */
};
class P_Diag_Stokes{
public:
int ndiag; /* number of entries */
double *idiag; /* inverse of diagonal */
int nbcb; /* size of b inv(c) b */
double *binvcb; /* b^T inv(c) b */
};
class P_Block{
public:
int nvert; /* number of vertices */
double *ivert; /* vertex preconditioner */
int *Ledge; /* list of L values */
int nedge; /* number of edges */
double **iedge; /* edge preconditioner */
int nface; /* number of faces */
int *Lface; /* list of L values */
double **iface; /* face preconditioner */
};
class P_Block_Stokes{
public:
int nvert; /* number of vertices */
double *ivert; /* vertex preconditioner */
int *Ledge; /* list of L values */
int nedge; /* number of edges */
double **iedge; /* edge preconditioner */
int nface; /* number of faces */
int *Lface; /* list of L values */
double **iface; /* face preconditioner */
int nbcb; /* size of b inv(c) b */
double *binvcb; /* b^T inv(c) b */
};
class P_Overlap{
public:
int ndiag; /* number of entries */
double *idiag; /* inverse of diagonal */
int npatches;
int **maskflags;
int **solveflags;
};
enum OverlapType{
NoOverlap,
File,
VertexPatch,
ElementPatch,
Coarse
};
class Overlap{
public:
OverlapType type; // type of patch to use
int coarse; // switch for coarse space
int npatches; // # of patches to use in the overlapping precon.
int Ntotal; // total # of d.o.f
int **maskflags; // npatchesxnel matrix of solve flags 1=solve, 0=mask
double **solveflags; // npatchesxnglobal matrix of solve flags 1=solve, 0=mask
int **patchmaps;
int *patchlengths;
double **patchinvA;
double *patchex;
int *patchbw;
};
union PreInfo{
P_Diag diag;
P_Block block;
P_Diag_Stokes diagst;
P_Block_Stokes blockst;
P_Overlap overlap;
};
enum PreType{
Pre_Diag,
Pre_Block,
Pre_None,
Pre_Diag_Stokes,
Pre_Block_Stokes,
Pre_Overlap
};
class MatPre{
public:
PreInfo info;
};
#if 0
class MatPre{
public:
int *Ledge; /* list of L values */
double *ivert; /* vertex preconditioner */
double **iedge; /* edge preconditioner */
int *Lface; /* list of L values */
double **iface; /* face preconditioner */
};
#endif
typedef enum{
direct, /* direct solver */
iterative /* iterative solver */
} SolMeth;
class Recur{
public:
int id; /* recursion level */
int cstart;
int npatch; /* number of patches in level */
int *patchlen_a; /* length of boundary of patch */
int *patchlen_c; /* length of interior of patch */
int **map; /* local to global mapping of patch boundary */
int *bwidth_c; /* bandwidth of interior matrices */
int *pmap; /* old to new patch mapping (necess. for L=2) */
double **invc; /* inverted interior system */
double **binvc; /* boundary coupling by inverted interior sy */
int **pivotc; /* pivot for c inverse if a is not positive def. */
};
#if 0
class Blockp{ /* info required to set up recursive block precon */
public:
int *ngv; /* number of global vertices in bndy structure */
int *nle; /* number of local edges/verts in bndy structure */
int **edglen; /* edgelen of local bndy edges */
int nlgid;
int **lgid; /* global id of local contributions */
};
typedef union precond{
Blockp blk; //OVERLOAD CALL: Blockp: nekstruct.h(?), nekstruct.h(?)
} Precond;
#else
class Blockp { /* info required to set up recursive block precon */
public:
int nge; /* number of global edges in innner solve */
int *ngv; /* number of global vertices in each patch */
int *nle; /* number of local edges in each patch */
int **edglen; /* edgelen of local bndy edges */
int **edgid; /* global id of local contributions */
int ngf; /* number of global faces in innner solve */
int *nlf; /* number of local faces in each patch */
int **faclen; /* edgelen of local bndy faces */
int **facgid; /* global id of local contributions */
int nlgid; /* number of global vertices in interior patches */
int **lgid; /* global id of local contributions */
};
union Precond{
Blockp blk; //OVERLOAD CALL: Blockp: nekstruct.h(?), nekstruct.h(?)
};
#endif
class Rsolver{
public:
int nrecur; /* number of recurrsive solves of the boundary system */
Recur *rdata; /* recurrsive info about solver */
int max_asize; /* maximum value of asize in recursions */
union{
int bwidth_a; /* bandwidth of inva if it is used */
int nv_solve; /* number of vertices in A (required for iter. solve) */
} Ainfo;
#if 0
union{
double *inva;
double **a;
} A;
#endif
struct{
double *inva;
double **a;
int *pivota;
} A;
/* final boundary system */
Precond *precon; /* preconditioner for iterative solver if required */ //OVERLOAD CALL: Precond: nekstruct.h(?), nekstruct.h(?)
};
/* mapping information for parallel solver */
class Pllmap{
public:
int nsolve; /* global nsolve */
int nglobal; /* global unkowns */
int *solvemap; /* local to global map of solved variables */
int *knownmap; /* local to global map of known variables */
struct gather_scatter_id *solve; /* solve map for 'gs' routine */
struct gather_scatter_id *known; /* known map for 'gs' routine */
double *mult; /* multiplicity of data over processors */
};
class Metric{
public:
double d; /* double value for straigth sided elements */
double *p; /* pointer for curved side elements */
double **wave; /* wave speed for oseen solver */
};
class Bsystem{
public:
SolMeth smeth; /* solution method -- direct or iterative */
int nel; /* number of elements */
int nv_solve; /* number of vertices to solve for */
int ne_solve; /* number of edges to solve for */
int nf_solve; /* number of faces to solve for */
int nsolve; /* number of solution points in boundary system */
int nglobal; /* number of global boundary points */
int *edge; /* cumulative list of global edge start position */
int *face; /* cumulative list of global face start position */
int **bmap; /* list of bmaps in each element for scat/gath ops */
int singular; /* If activated then have singular poisson case */
int families; /* number of families */
Metric *lambda; /* Helmholtz constant */ // list of NEL Metric.s
MatSys *Gmat; /* Global Matrix System */
PreType Precon; /* preconditioner type */
#if 0
int Precon; /* preconditioner type */
#endif
MatPre *Pmat; /* Proconditioning Matrix System */ //OVERLOAD CALL: MatPre: nekstruct.h(?), nekstruct.h(?)
Rsolver *rslv; /* Recursive solver information */
Pllmap *pll; /* mapping information for parallel solver */
double *signchange; /* connectivity Z matrix */
int ***nmap; /* nodal face map */
// Multiple RHS storage
Multi_RHS *mrhs; //OVERLOAD CALL: Multi_RHS: nekstruct.h(?), nekstruct.h(?)
// Overlapping info.
Overlap *overlap;
};
class Field { /* ..... Field FILE structure ...... */
public:
char* name; /* session name */
char* created; /* date and time created */
char state; /* transformed state of data */
int dim; /* Dimension of run */
int nel; /* number of elements */
int lmax; /* maximum l in fields */
int step; /* time step number */
int nz; /* number of fourier planes */
double lz; /* periodic length */
double time; /* time */
double time_step; /* time step */
double kinvis; /* kinematic viscosity */
char* format; /* file format string */
char type[MAXFIELDS]; /* list of variable types */
double* data[MAXFIELDS]; /* array of data values */
int* size; /* array giving size of data */
int* emap; /* local to global mapping of elements */
}; /* --------------------------------- */
class Membrane{
public:
Membrane(); //constructor
Membrane(double tension, double mass_density, int lbc, int rbc);
Membrane(Membrane &M); //copy constructor
~Membrane(); //destuctor
void Setup(Element_List *EL, Bndry *UBc);
void CalcMeshVelocity(Element_List *EL, Bndry *UBc, Bndry *VBc, int nstep, double dt);
//---------------------------------------------------------------
int nelmt; //number of elements across top
int norder; //num quad points per element
double * xpts; //x coords from left to right
double * netp; //net pressure at xpts
double * deform; //deformation of the membrane
double * velmem; //velocity of the membrane
int ** top_elmts; //[][0] = elmt number; [][1] = face num;
int ** bottom_elmts;
int * BCflags;
double *physdata; /*Physical data of the membrane ([0] = tension: [1] = mass density)*/
double phead;
int pvert;
int pelmt;
};
#include "Tri.h"
#include "Quad.h"
#include "Prism.h"
#include "Pyr.h"
#include "Tet.h"
#include "Hex.h"
#endif
C++ to HTML Conversion by ctoohtml