00001 /************************************************************************ 00002 File apph_std_lin.h - internal information for parallel overlap for 00003 approximation module for std_lin approximation and prismatic elements 00004 00005 Contains: 00006 - constants 00007 - data types 00008 - global variables (for the whole module) 00009 - function headers 00010 00011 ------------------------------ 00012 History: 00013 08.2011 - Krzysztof Banas, initial version 00014 *************************************************************************/ 00015 00016 #ifndef _apph_std_lin_ 00017 #define _apph_std_lin_ 00018 00019 #include "mmh_intf.h" 00020 00021 #include "mmph_intf.h" 00022 00023 #include "aph_intf.h" 00024 00025 #include "apph_intf.h" 00026 00027 00028 #define APPC_MAX_NUM_SUB MMPC_MAX_NUM_SUB // maximal number of subdomains 00029 #define APPC_MAX_NUM_TABLES 10 // several subsystems 00030 00031 /* 00032 * data structure to handle exchange of dofs between processors 00033 * for multi-problem multi-grid solvers 00034 */ 00035 00036 /* definition of type appt_levels - data structure for mesh levels */ 00037 typedef struct { 00038 00039 /* parameters and arrays for exchanging data on interface dof structures */ 00040 /* 00041 1. data received, updated and send - dof structures owned by the processor, 00042 updated also by others 00043 */ 00044 //int numexch1[APPC_MAX_NUM_SUB], *dofentexch1[APPC_MAX_NUM_SUB]; 00045 //int *posexch1[APPC_MAX_NUM_SUB], *nrdofexch1[APPC_MAX_NUM_SUB]; 00046 /* 00047 2. data send and received (after update) - dof structures owned by others, 00048 updated also by the processor 00049 */ 00050 //int numexch2[APPC_MAX_NUM_SUB], *dofentexch2[APPC_MAX_NUM_SUB]; 00051 //int *posexch2[APPC_MAX_NUM_SUB], *nrdofexch2[APPC_MAX_NUM_SUB]; 00052 /* 00053 3. data updated and send - dof structures owned by the processor, 00054 not updated by others (sometimes equivalent to 00055 being on the boundary of others' subdoamins) 00056 */ 00057 int numsend[APPC_MAX_NUM_SUB], *dofentsend[APPC_MAX_NUM_SUB]; 00058 int *possend[APPC_MAX_NUM_SUB], *nrdofsend[APPC_MAX_NUM_SUB]; 00059 /* 00060 4. data received (after update) - dof structures owned by others, 00061 not updated by the processor, 00062 (sometimes equivalent to the list 00063 of the subdomain's boundary dof structures) 00064 */ 00065 int numrecv[APPC_MAX_NUM_SUB], *dofentrecv[APPC_MAX_NUM_SUB]; 00066 int *posrecv[APPC_MAX_NUM_SUB], *nrdofrecv[APPC_MAX_NUM_SUB]; 00067 00068 int nrdof_int; 00069 00070 } appt_levels; 00071 00072 typedef struct { 00073 int field_id; 00074 int nreq_offset; // we select certain DOFs (nreq_offset..nreq_offset+nreq) 00075 int nreq; 00076 int nr_levels; /* number of levels */ 00077 appt_levels *level; /* array of data structures for levels */ 00078 } appt_exchange_tables; 00079 00080 00081 /* GLOBAL VARIABLES */ 00082 extern int appv_nr_proc; // number of process(or)s = number of subdomains 00083 extern int appv_my_proc_id; // executing process(or)s ID 00084 extern int appv_nr_exchange_tables; 00085 extern int appv_cur_exchange_table_id; 00086 extern appt_exchange_tables appv_exchange_table[APPC_MAX_NUM_TABLES]; 00087 00088 #endif