00001 /************************************************************************ 00002 File aph_dg_prism.h - internal information for discontinuous Galerkin 00003 approximation module for prismatic elements 00004 00005 Contains: 00006 - constants 00007 - data types 00008 - global variables (for the whole module) 00009 - headers for internal functions: 00010 apr_select_field - to select the proper field 00011 apr_loc_loc - to compute local coordinates within an element, 00012 given local coordinates within an element of the same family 00013 apr_sol_xglob - to return the solution at a point with global 00014 coordinates specified 00015 00016 ------------------------------ 00017 History: 00018 02.2002 - Krzysztof Banas, initial version 00019 *************************************************************************/ 00020 00021 #ifndef _aph_dg_prism_ 00022 #define _aph_dg_prism_ 00023 00024 00025 /*** CONSTANTS ***/ 00026 /* maximal number of equations */ 00027 #define APC_MAXEQ 1 00028 00029 #define APC_MAX_NUM_FIELD 10 /* maximal number of fields */ 00030 00031 /*** DATA TYPES ***/ 00032 00033 /* solution degrees of freedom structure (parallel to element structure) */ 00034 typedef struct { 00035 int pdeg; /* indicator of polynomial degrees */ 00036 /* for different types of elements: */ 00037 /* TETRA - pdeg = pdegxyz one for all directions */ 00038 /* PRISM - pdeg = 100*pdegz + pdegxy */ 00039 /* BRICK - pdeg = 100*pdegz + pdegy*10 + pdegx */ 00040 /* (pdeg = -1 - sol_* vectors not allocated) */ 00041 double *vec_dof_1; /* pointer to array of field dofs */ 00042 double *vec_dof_2; /* pointer to array of field dofs */ 00043 double *vec_dof_3; /* pointer to array of field dofs */ 00044 } apt_dof_ent; 00045 00046 00047 /* discretization structure, including time and space discretization */ 00048 typedef struct { 00049 int mesh_id; /* identifier of the mesh associated with field */ 00050 int nreq; /* number of components in solution vector */ 00051 int nr_sol; /* number of solution vectors for each element */ 00052 int base; /* type of shape functions: */ 00053 /* 1 (APC_TENSOR) - tensor product */ 00054 /* 2 (APC_COMPLETE) - complete polynomials */ 00055 /* ! for both types the order of the first four dofs */ 00056 /* ! as returned from apr_shape_fun_3D is: 1,x,y,z ! */ 00057 int uniform; /* 0 - non-uniform field */ 00058 /* 1 - uniform field (all pdeg equal) */ 00059 // int nr_dof_ent; /* number of dof entities */ 00060 apt_dof_ent *dof_ents; /* pointer to structure with the vectors of dofs */ 00061 } apt_field; 00062 00063 /*** GLOBAL VARIABLES for the whole module ***/ 00064 00065 extern int apv_nr_fields; /* the number of fields in the problem */ 00066 extern int apv_cur_field_id; /* ID of the current field */ 00067 extern apt_field apv_fields[APC_MAX_NUM_FIELD]; /* array of fields */ 00068 00069 00070 /*** FUNCTIONS DECLARATIONS - headers for internal functions ***/ 00074 extern apt_field* apr_select_field( /* returns: pointer to the selected field */ 00075 int Field_id /* in: field ID */ 00076 ); 00077 00078 00079 00080 00081 00082 /* 00083 In file aps_gauss_util.c - utility routines for Gauss-Legendre integration 00084 */ 00085 00089 extern void apr_gauss_init(); 00090 00094 extern void apr_gauss_select( 00095 int Type, /* in: type of integration considered */ 00096 /* 1 - LINE INTEGRATION over [-1,1] */ 00097 /* 2 - GAUSSIAN QUADRATURES FOR TRIANGLES */ 00098 int Order, /* in: order of integration == degree */ 00099 /* of polynomials integrated exactly */ 00100 int *Ng, /* out: number of gauss points */ 00101 double **Xg_p, /* out: gauss points */ 00102 double **Wg_p /* out: gauss weights */ 00103 ); 00104 00105 00106 00107 #endif