00001 #ifndef SEQSELNODES_H 00002 #define SEQSELNODES_H 00003 00004 #include <stdio.h> 00005 #include "galias.h" 00006 #include "gtopology.h" 00007 00008 /** 00009 class deals with selected nodes on subdomains 00010 the class is sequential version of the class selnodes 00011 nodes could be selected for Schur complement method, 00012 FETI method, etc. 00013 00014 JK, 14.9.2007 00015 */ 00016 class seqselnodes 00017 { 00018 public: 00019 seqselnodes(long nd,long *nnsd,long **jj, 00020 long **nodmultip,long **ggnbn,long **icnbnmas, 00021 long itnbn,long *iicmultip,long **ilnbncn,long **iggnbncn,long **isid, 00022 meshdescription d,FILE *out,long mespr); 00023 ~seqselnodes (); 00024 00025 void node_coarse_numbers (FILE *out); 00026 void number_all_dofs (gtopology *top,FILE *out); 00027 void ndofn_on_master (gtopology *top,FILE *out); 00028 void dof_indicators (gtopology *top,FILE *out); 00029 00030 /* 00031 void nodes_on_master (long tnnp,FILE *out); 00032 void node_multiplicity (FILE *out); 00033 void group_local_nodes (FILE *out); 00034 void dof_feti (FILE *out); 00035 00036 void number_contrib (FILE *out); 00037 void contrib_dofs (gtopology *top,FILE *out); 00038 */ 00039 //void dof_multiplicity (FILE *out); 00040 00041 00042 void schur_ordering (long **dofind,FILE *out); 00043 //void schur_ordering_old (long **dofind,FILE *out); 00044 //void schur_ordering_old_old (FILE *out); 00045 void prepare_schur (gtopology *top,FILE *out); 00046 00047 00048 00049 /// function defines the type of implementation of the FETI method 00050 void define_feti_implementation (fetiimplem fi); 00051 /// variable fetiimpl is determined 00052 00053 /// function determines the number of contributions to the coarse problem from particular subdomains 00054 void number_contrib_dofs (gtopology *top,FILE *out); 00055 /// function assembles array snndofmas 00056 00057 void dof_feti (gtopology *top,FILE *out); 00058 00059 void contrib_dofs_ln (gtopology *top,FILE *out); 00060 void contrib_dofs_cn (FILE *out); 00061 00062 long prepare_feti (fetiimplem fi,gtopology *top,FILE *out); 00063 00064 00065 00066 00067 00068 00069 00070 00071 /// type of mesh description 00072 /// defined in the constructor 00073 meshdescription md; 00074 00075 /// type of FETI implementation 00076 /// defined in the function define_feti_implementation 00077 fetiimplem fetiimpl; 00078 00079 /// number of subdomains 00080 /// defined in the constructor 00081 long ns; 00082 00083 /// total number of boundary/interface nodes 00084 /// defined in the constructor 00085 long tnbn; 00086 00087 /// total number of selected nodes 00088 /// defined in the function node_coarse_numbers 00089 long tnsn; 00090 00091 00092 /// numbers of selected nodes on subdomains 00093 /// it contains ns components 00094 /// nsnmas[i]=j - there are j selected nodes on the i-th subdomain 00095 /// array is assembled in the constructor 00096 long *nsnmas; 00097 00098 /// local numbers of selected nodes 00099 /// lnsn contains ns,nsnmas[i] components 00100 /// lnsn[i][j]=k - the j-th selected node on the i-th subdomain has local number k 00101 /// array is allocated in the constructor 00102 long **lnsn; 00103 00104 /// global glued numbers of selected nodes 00105 /// ggnsn contains ns,nsnmas[i] components 00106 /// ggnsn[i][j]=k - the j-th selected node on the i-th subdomain has global glued number k 00107 /// array is allocated in the constructor 00108 long **ggnsn; 00109 00110 /// coarse numbers of selected nodes 00111 /// cnsnmas contains ns, nsnmas[i] components 00112 /// cnsnmas[i][j]=k - the j-th selected node on the i-th subdomain has coarse number k 00113 /// array is allocated in the constructor 00114 long **cnsnmas; 00115 00116 /// number of multiplicity of all boundary/interface nodes 00117 /// it contains tnbn components 00118 /// icmultip[i]=j - the i-th boundary/interface node shares j nodes (it belongs to j subdomains) 00119 /// array is allocated in the constructor 00120 long *icmultip; 00121 00122 /// local numbers of boundary/interface nodes appropriate to all coarse nodes 00123 /// it contains local numbers of boundary/interafce nodes of each coarse node 00124 /// it contains tnbn rows and icmultip[i] columns 00125 /// lnbncn[i][j]=k - the j-th node shared by the i-th coarse node has local number k 00126 /// aray is allocated in the constructor 00127 long **lnbncn; 00128 00129 /// global glued numbers of boundary/interface nodes appropriate to all coarse nodes 00130 /// it contains global glued numbers of boundary/interafce nodes of each coarse node 00131 /// it contains tnbn rows and icmultip[i] columns 00132 /// ggnbncn[i][j]=k - the j-th node shared by the i-th coarse node has global glued number k 00133 /// aray is allocated in the constructor 00134 long **ggnbncn; 00135 00136 /// subdomain id of interface/boundary nodes appropriate to all coarse nodes 00137 /// it contains tnbn rows and icmultip[i] columns 00138 /// sid[i][j]=k - the j-th node shared by the i-th coarse node belongs to the k-th subdomain 00139 /// array is allocated in the constructor 00140 long **sid; 00141 00142 00143 00144 /// number of multiplicity of selected boundary/interface nodes 00145 /// it contains tnsn components 00146 /// snicmultip[i]=j - the i-th selected boundary/interface node shares j nodes (it belongs to j subdomains) 00147 /// array is alloctaed in the function node_coarse_numbers 00148 long *snicmultip; 00149 00150 /// global glued numbers of selected boundary/interface nodes appropriate to coarse node 00151 /// it contains tnsn rows and snicmultip[i] columns 00152 /// snggnbncn[i][j]=k - the j-th node shared by the i-th coarse node has global glued number k 00153 /// aray is allocated in the function node_coarse_numbers 00154 long **snggnbncn; 00155 00156 /// local numbers of selected boundary/interface nodes appropriate to coarse node 00157 /// it contains tnsn rows and snicmultip[i] columns 00158 /// snlnbncn[i][j]=k - the j-th node shared by the i-th coarse node has local number k 00159 /// aray is allocated in the function coarse_local_nodes 00160 long **snlnbncn; 00161 00162 /// subdomain id of selected interface/boundary nodes of the coarse node 00163 /// it contains tnsn rows and snicmultip[i] columns 00164 /// snsid[i][j]=k - the j-th node shared by the i-th coarse node belongs to the k-th subdomain 00165 /// array is allocated in the function node_coarse_numbers 00166 long **snsid; 00167 00168 /// array of numbers of DOFs on subdomains at selected nodes 00169 /// it contains prescribed values before code number generation 00170 /// it contains ns components 00171 /// after code number generation, only unknown (unconstrained DOFs) are taken into account 00172 /// snndofmas[i]=j - selected nodes on the i-th subdomain contain j DOFs 00173 /// array is allocated in the function number_all_dofs 00174 long *snndofmas; 00175 00176 /// array of numbers of DOF at selected nodes 00177 /// it contains ns, nsnmas[i] components 00178 /// snndofnmas[i][j]=k - the selected j-th node on the i-th subdomain contains k DOFs 00179 /// array is allocated in the function ndofn_on_master 00180 long **snndofnmas; 00181 00182 /// array of DOFs or indicators at selected nodes 00183 /// it contains ns, nsnmas[i], snndofnmas[i][j] components 00184 /// sndofmas[i][j][k]=l - the k-th DOF at the j-th selected node on the i-th subdomain has value l 00185 /// array is allocated in the function dof_indicators 00186 long ***sndofmas; 00187 00188 00189 00190 /// array of numbers of DOFs for selected nodes 00191 /// it contains tnsn components 00192 /// ndofnsn[i]=j - the i-th selected node (in group ordering) has j DOFs 00193 /// array is allocated in the function schur_ordering or in the function dof_feti 00194 /// in the case of Schur complement method, it contains ndofn for each boundary/interface node 00195 /// in the case of FETI, it contains (nmultip-1)*ndofn 00196 long *ndofnsn; 00197 00198 /// code numbers at selected nodes on master 00199 /// it contains tnsn, ndofnsn[i] components 00200 /// cnm[i][j]=k - the j-th DOF at the i-th selected node has code number / indicator k 00201 /// array is allocated in the function schur_ordering 00202 long **codensn; 00203 00204 /// total number of DOFs on selected nodes 00205 /// defined in the function schur_ordering 00206 long tndofsn; 00207 00208 /// code numbers / indicators for FETI method 00209 /// it contains tnsn, snicmultip[i], snicmultip[i], ndofnsn[i] components 00210 /// doffeti[i][j][k][l]=m - the l-th DOF in the couple j-th, k-th node shared by the i-th coarse node has code number / indicator m 00211 /// array is allocated in the function dof_feti 00212 long ****doffeti; 00213 00214 /// coarse code numbers of subdomains considered as superelements 00215 /// it contains ns, snndofmas[i] components 00216 /// cndofmas[i][j]=k - the j-th DOF on the i-th subdomain has coarse code number k 00217 /// array is allocated in the function schur_ordering or contrib_dofs_cn 00218 long **cndofmas; 00219 00220 /// list of local code numbers which contribute to the coarse problem 00221 /// it contains ns, snndofmas[i] components 00222 /// lndofmas[i][j]=k - the j-th DOF which contributes to the coarse problem on the i-th subdomain has local code number k 00223 /// array is allocated in the function contrib_dofs_ln 00224 long **lndofmas; 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 // nasleduji neoverene promenne a pole 00247 00248 /// node multiplicity 00249 /// nodmultip[i]=j - the i-th selected node is shared by j subdomains 00250 /// it contains tnsn components 00251 //long *nodmultip; 00252 00253 // long *dofmultip; 00254 //long **ldofmultip; 00255 00256 //long tndof; 00257 00258 00259 00260 00261 00262 /// code numbers at selected nodes on master 00263 /// cnm[i][j]=k - the j-th DOF at the i-th selected node has code number / indicator k 00264 //long **cnm; 00265 00266 // FETI ORDERING 00267 00268 /// list of joint nodes to selected nodes assumed as coarse nodes 00269 /// ljn[i][j]=k - the j-th node connected to the i-th coarse node has local number k 00270 /// ljn contains tnsn rows and nodmultip columns 00271 //long **ljn; 00272 00273 /// list of subdomain numbers which contain connected nodes to coarse nodes 00274 /// lsn[i][j]=k - the j-th node connected to the i-th coarse node belongs to the k-th subdomain 00275 /// lsn contains tnsn rows and nodmultip columns 00276 //long **lsn; 00277 00278 /// code numbers / indicators for FETI method 00279 /// doffeti[i][j][k]=l - the k-th DOF on the j-th connected node to the i-th coarse node has code number / indicator l 00280 //long ***doffeti; 00281 00282 /// number of contributing nodes in the FETI method 00283 /// ncndom[i]=j - the i-th subdomain contributes to the coarse problem by j nodes 00284 //long *ncndom; 00285 00286 00287 // ncdofd[ns]; 00288 //edofs[ns][ncdofd]; 00289 //ccn[ns][ncdofd]; 00290 }; 00291 00292 #endif 00293