00001 #include "elemswitch.h"
00002 #include "elemswitcht.h"
00003 #include "elemswitchc.h"
00004 #include "globalc.h"
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 void upper_cond_coupl_mat (long eid,long lcid,matrix &vm)
00018 {
00019 elemtypec te;
00020
00021 te=Ct->give_elem_type (eid);
00022
00023 switch (te){
00024 case coupbar:{
00025 Cbar->res_upper_cond_coup_matrix (eid,vm);
00026 break;
00027 }
00028 case coupquad:{
00029 Cquad->res_upper_cond_coup_matrix (eid,vm);
00030 break;
00031 }
00032 case couphex:{
00033 Chex->res_upper_cond_coup_matrix (eid,vm);
00034 break;
00035 }
00036 default:{
00037 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00038 }
00039 }
00040
00041 }
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 void lower_cond_coupl_mat (long eid,long lcid,matrix &vm)
00055 {
00056 elemtypec te;
00057
00058 te=Ct->give_elem_type (eid);
00059
00060 switch (te){
00061 case coupbar:{
00062 Cbar->res_lower_cond_coup_matrix (eid,vm);
00063 break;
00064 }
00065 case coupquad:{
00066 Cquad->res_lower_cond_coup_matrix (eid,vm);
00067 break;
00068 }
00069 case couphex:{
00070 Chex->res_lower_cond_coup_matrix (eid,vm);
00071 break;
00072 }
00073 default:{
00074 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00075 }
00076 }
00077
00078 }
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 void upper_cap_coupl_mat (long eid,long lcid,matrix &vm)
00092 {
00093 elemtypec te;
00094
00095 te=Ct->give_elem_type (eid);
00096
00097 switch (te){
00098 case coupbar:{
00099 Cbar->res_upper_cap_coup_matrix (eid,vm);
00100 break;
00101 }
00102 case coupquad:{
00103 Cquad->res_upper_cap_coup_matrix (eid,vm);
00104 break;
00105 }
00106 case couphex:{
00107 Chex->res_upper_cap_coup_matrix (eid,vm);
00108 break;
00109 }
00110 default:{
00111 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00112 }
00113 }
00114
00115 }
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 void lower_cap_coupl_mat (long eid,long lcid,matrix &vm)
00129 {
00130 elemtypec te;
00131
00132 te=Ct->give_elem_type (eid);
00133
00134 switch (te){
00135 case coupbar:{
00136 Cbar->res_lower_cap_coup_matrix (eid,vm);
00137 break;
00138 }
00139 case coupquad:{
00140 Cquad->res_lower_cap_coup_matrix (eid,vm);
00141 break;
00142 }
00143 case couphex:{
00144 Chex->res_lower_cap_coup_matrix (eid,vm);
00145 break;
00146 }
00147 default:{
00148 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00149 }
00150 }
00151
00152 }
00153
00154
00155
00156
00157
00158
00159
00160
00161 void intpointvaluesc (long eid)
00162 {
00163 elemtypec te;
00164
00165 te=Ct->give_elem_type (eid);
00166
00167 switch (te){
00168 case coupbar:{
00169 Cbar->intpointval (eid);
00170 break;
00171 }
00172 case coupquad:{
00173
00174 break;
00175 }
00176 case couphex:{
00177
00178 break;
00179 }
00180 default:{
00181 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00182 }
00183 }
00184
00185 }
00186
00187
00188
00189
00190
00191
00192
00193
00194 void intpointstrainsc (long eid)
00195 {
00196 elemtypec te;
00197
00198 te=Ct->give_elem_type (eid);
00199
00200 switch (te){
00201 case coupbar:{
00202 Cbar->res_mainip_strains (eid);
00203 break;
00204 }
00205 case coupquad:{
00206
00207 break;
00208 }
00209 case couphex:{
00210
00211 break;
00212 }
00213 default:{
00214 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00215 }
00216 }
00217 }
00218
00219
00220
00221
00222
00223
00224
00225
00226 void intpointgradientsc (long eid)
00227 {
00228 elemtypec te;
00229
00230 te=Ct->give_elem_type (eid);
00231
00232 switch (te){
00233 case coupbar:{
00234 Cbar->intpointgrad (eid);
00235 break;
00236 }
00237 case coupquad:{
00238
00239 break;
00240 }
00241 case couphex:{
00242
00243 break;
00244 }
00245 default:{
00246 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00247 }
00248 }
00249
00250 }
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262 void assemble_coup (long lcid,double *rhs,long n)
00263 {
00264 long i,mndofe,*cn,ne;
00265 vector lv;
00266 elemtypec te;
00267
00268 ne = Ct->ne;
00269
00270 nullv (rhs,n);
00271
00272
00273 for (i=0;i<ne;i++){
00274 te=Ct->give_elem_type (i);
00275 mndofe=Gtm->give_ndofe (i);
00276 allocv (mndofe,lv);
00277 fillv (0.0,lv);
00278
00279 switch (te){
00280 case coupbar:{
00281 Cbar->res_upper_cond_coup_vector (lv,i);
00282 break;
00283 }
00284 case coupquad:{
00285 Cquad->res_upper_cond_coup_vector (lv,i);
00286 break;
00287 }
00288 case couphex:{
00289 Chex->res_upper_cond_coup_vector (lv,i);
00290 break;
00291 }
00292 default:{
00293 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00294 }
00295 }
00296
00297 cn = new long [mndofe];
00298 Mt->give_code_numbers (i,cn);
00299 locglob (rhs,lv.a,cn,mndofe);
00300 destrv (lv);
00301 delete [] cn;
00302 }
00303 }
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316 void volume_rhs_vectorc (vector &lv,long lcid,long eid)
00317 {
00318 elemtypec te;
00319
00320 te=Ct->give_elem_type (eid);
00321
00322 switch (te){
00323 case coupbar:{
00324 Cbar->res_volume_rhs_vector (lv,eid,lcid);
00325 break;
00326 }
00327 case coupquad:{
00328
00329 break;
00330 }
00331 case couphex:{
00332 break;
00333 }
00334 default:{
00335 print_err("unknown element type is required",__FILE__,__LINE__,__func__);
00336 }
00337 }
00338
00339 }