00001 /************************************************************************ 00002 File aph_std_lin.h - internal information for standard linear 00003 approximation module for tetrahedral and 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 00012 ------------------------------ 00013 History: 00014 02.2002 - Krzysztof Banas, initial version 00015 *************************************************************************/ 00016 00017 #ifndef _aph_std_lin_ 00018 #define _aph_std_lin_ 00019 00020 00021 #ifdef __cplusplus 00022 extern "C"{ 00023 #endif 00024 00025 /*** CONSTANTS ***/ 00026 // grab defines from aph interface 00027 // KM 06.2011 00028 #include "aph_intf.h" 00029 00030 00039 #define APC_MAX_NUM_FIELD 10 /* maximal number of fields */ 00040 #define APC_MAXEQ 30 /* maximal number of solution vector components */ 00041 #define APC_TRUE 1 00042 #define APC_FALSE 0 00043 00044 /*** DATA TYPES ***/ 00045 00046 /* solution degrees of freedom structure (parallel to vertex structure) */ 00047 typedef struct { 00048 double *vec_dof_1; /* pointer to array of field dofs */ 00049 double *vec_dof_2; /* pointer to array of field dofs */ 00050 double *vec_dof_3; /* pointer to array of field dofs */ 00051 int *constr; 00052 /* for future extensions (for all mesh entities): 00053 int mesh_ent_type; 00054 int mesh_ent_id; 00055 int pdeg; 00056 */ 00057 } apt_dof_ent; 00058 00059 /* discretization structure, including time and space discretization */ 00060 typedef struct { 00061 int mesh_id; /* identifier of the mesh associated with the field */ 00062 int nreq; /* number of components in solution vector */ 00063 int nr_sol; /* number of solution vectors for each element */ 00064 int uniform; /* indicator whether the approximation field is uniform */ 00065 int constr; /* indicator whether there are constrained nodes */ 00066 int nr_dof_ents; /* number of dof entities */ 00067 int capacity_dof_ents; /* max numer of dof ent. with this malloc*/ 00068 apt_dof_ent *dof_ents; /* pointer to structure with the vectors of dofs */ 00069 } apt_field; 00070 00071 /*** GLOBAL VARIABLES for the whole module ***/ 00072 00073 extern int apv_nr_fields; /* the number of fields in the problem */ 00074 extern int apv_cur_field_id; /* ID of the current field */ 00075 extern apt_field apv_fields[APC_MAX_NUM_FIELD]; /* array of fields */ 00076 00077 00078 /*** FUNCTIONS DECLARATIONS - headers for internal functions ***/ 00082 extern apt_field* apr_select_field( /* returns: pointer to the selected field */ 00083 int Field_id /* in: field ID */ 00084 ); 00085 00086 /* 00087 In file aps_gauss_util.c - utility routines for Gauss-Legendre integration 00088 */ 00089 00093 extern void apr_gauss_init(); 00094 00098 extern void apr_gauss_select( 00099 int Type, /* in: type of integration considered */ 00100 /* 1 - LINE INTEGRATION over [-1,1] */ 00101 /* 2 - GAUSSIAN QUADRATURES FOR TRIANGLES */ 00102 int Order, /* in: order of integration == degree */ 00103 /* of polynomials integrated exactly */ 00104 int *Ng, /* out: number of gauss points */ 00105 double **Xg_p, /* out: gauss points */ 00106 double **Wg_p /* out: gauss weights */ 00107 ); 00108 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 00115 #endif