00001 #ifndef FETI1_H 00002 #define FETI1_H 00003 00004 #include <stdio.h> 00005 #include "mpi.h" 00006 #include "../GEFEL/gtopology.h" 00007 #include "../GEFEL/gmatrix.h" 00008 00009 /** 00010 00011 ************************************************* 00012 FINITE ELEMENT TEARING AND INTERCONNECTING METHOD 00013 ************************************************* 00014 nproc, myrank, ndom 00015 number of processors, myrank and number of domain are established 00016 after constructor execution 00017 00018 ndof 00019 total number of local unknowns is established after execution 00020 of function schurordering 00021 00022 nbndom (M) 00023 array of numbers of boundary nodes on subdomains is established after 00024 execution of function globcnnum_feti 00025 00026 maxnbn, totmaxndofn 00027 maximum number of boundary nodes and maximum number of degrees of freedom 00028 on node are established after execution of globcnnum_feti 00029 00030 maxinc 00031 maximum number of incidencies is established after execution of globcnnum_feti 00032 00033 ngdof (M) 00034 total number of global unknowns is established after execution of 00035 function globcnnum_feti 00036 00037 nodnum 00038 array of legth nbn containing global node numbers; components correspond 00039 only to boundary nodes, internal nodes are excluded 00040 array is established after execution of function globcnnum_feti 00041 00042 inc, lcngcn 00043 array of numbers of incidencies of nodes to subdomains and 00044 global code numbers in FETI method are established after execution 00045 of function globcnnum_feti 00046 00047 00048 */ 00049 class feti1 00050 { 00051 public: 00052 feti1 (int np,int mr,int nd); 00053 ~feti1(); 00054 void globcnnum_feti (gtopology *top,long *ltg,long *domproc,FILE *out); 00055 void locbuff (double *buff,double *lv); 00056 void buffloc (double *buff,double *lv); 00057 void globbuff (double *buff,double *gv,long nd); 00058 void buffglob (double *buff,double *gv,long nd); 00059 00060 void hmatrixsize (double *rbm,long *domproc,FILE *out); 00061 void hmatrix (double *h,double *rbm); 00062 void qvector (double *q,double *rbm,double *f); 00063 00064 void feti_projection (double *v,double *h,double *h1); 00065 void mpcg (gtopology *top,gmatrix *gm, 00066 double *w,double *rhs,double *q,double *h,double *h1,long *rbmi,FILE *out); 00067 void lagrmultdispl (gtopology *top,gmatrix *gm,long *domproc, 00068 double *w,double *d,double *f,double *rbm,long *rbmi, 00069 double *h,double *h1); 00070 void lumpedprec (gtopology *top,double *v,double *pv); 00071 00072 00073 void solve_system (gtopology *top,gmatrix *gm, 00074 long *domproc,double *lhs,double *rhs,FILE *out); 00075 00076 00077 // number of processors 00078 int nproc; 00079 // rank of processor 00080 int myrank; 00081 // number of subdomain 00082 int ndom; 00083 00084 // number of degrees of freedom on subdomain 00085 long ndof; 00086 // number of boundary nodes 00087 long nbn; 00088 // total number of boundary nodes in problem 00089 long tnbn; 00090 // number of boundary unknowns on subdomain 00091 long nbdof; 00092 00093 // maximum number of components in local-global arrays 00094 long maxlggl; 00095 // number of components in local-global arrays 00096 long nclggl; 00097 // maximum number of RBM 00098 long maxnrbm; 00099 00100 00101 // array containing local code numbers of boundary unknonws 00102 long *lcn; 00103 00104 // array containing global code numbers in FETI method 00105 //long **lcngcn; 00106 // array containing numbers of incidencies of nodes to subdomains 00107 //long *inc; 00108 // array containing global node numbers of boundary nodes 00109 //long *nodnum; 00110 00111 // estimate of number of rigid body motions 00112 long enrbm; 00113 // threshold for linear dependence 00114 double lithr; 00115 // number of ridig body motions 00116 long nrbm; 00117 // size of matrix H 00118 long hsize; 00119 00120 // maximum number of iterations in conjugate gradient method 00121 long nicg; 00122 // number of performed iterations in conjugate gradient method 00123 long anicg; 00124 // required error 00125 double errcg; 00126 // attained error 00127 double aerrcg; 00128 // computer zero 00129 double zero; 00130 00131 //******************************************** 00132 // VARIABLES DEFINED ONLY ON MASTER PROCESSOR 00133 // 00134 // number of global DOFs = total number of boundary DOFs 00135 long ngdof; 00136 00137 // array containing numbers of boundary nodes on subdomains 00138 long *nbndom; 00139 // array containing numbers of RBM on subdomains 00140 long *nrbmdom; 00141 // array containing addresses of first RBM in coarse matrix 00142 long *rbmadr; 00143 00144 }; 00145 00146 00147 #endif