Changeset 3483
- Timestamp:
- 04/09/10 08:23:31 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp
r3446 r3483 21 21 /*First, get elements and loads configured: */ 22 22 elements->Configure(elements,loads, nodes,vertices, materials,parameters); 23 nodes->Configure(elements,loads, nodes,vertices, materials,parameters); 23 24 loads->Configure(elements, loads, nodes,vertices, materials,parameters); 24 25 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); -
issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp
r3446 r3483 27 27 /*First, get elements and loads configured: */ 28 28 elements->Configure(elements,loads, nodes,vertices, materials,parameters); 29 nodes->Configure(elements,loads, nodes,vertices, materials,parameters); 29 30 loads->Configure(elements, loads, nodes,vertices, materials,parameters); 30 31 parameters->Configure(elements,loads, nodes,vertices, materials,parameters); -
issm/trunk/src/c/objects/DofIndexing.cpp
r3470 r3483 79 79 printf("\n"); 80 80 81 printf(" doflist: |");81 printf(" doflist: |"); 82 82 for(i=0;i<numberofdofs;i++){ 83 83 if(i>MAXDOFSPERNODE)break; 84 printf(" %i|",doflist[i]);84 printf(" %i |",doflist[i]); 85 85 } 86 printf("\n"); 86 87 87 88 } -
issm/trunk/src/c/objects/ElementProperties.cpp
r3479 r3483 429 429 int i; 430 430 431 if (h) {printf(" h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");} 432 if (s) {printf(" s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");} 433 if (b) {printf(" b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");} 434 if (k) {printf(" k=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->k[i]);printf("]\n");} 435 if (melting) {printf(" melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");} 436 if (accumulation) {printf(" accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");} 437 if (geothermalflux) {printf(" geothermalflux=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");} 431 printf("Element properties:\n"); 432 if (h) {printf(" h=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");} 433 if (s) {printf(" s=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");} 434 if (b) {printf(" b=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");} 435 if (k) {printf(" k=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->k[i]);printf("]\n");} 436 if (melting) {printf(" melting=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");} 437 if (accumulation) {printf(" accumulation=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");} 438 if (geothermalflux) {printf(" geothermalflux=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");} 438 439 printf(" friction_type: %i\n",friction_type); 439 440 printf(" p: %g\n",p); -
issm/trunk/src/c/objects/Hook.cpp
r3468 r3483 226 226 int i; 227 227 if (num){ 228 printf(" Hook: \n");229 printf(" num=%i\n",this->num);230 printf(" ids:\n");228 printf(" Hook: \n"); 229 printf(" num=%i\n",this->num); 230 printf(" ids: "); 231 231 for (i=0;i<this->num;i++){ 232 232 printf("%i ",this->ids[i]); 233 233 } 234 printf("\n offsets:\n "); 234 printf("\n"); 235 printf(" offsets: "); 235 236 for (i=0;i<this->num;i++){ 236 237 printf("%i ",this->offsets[i]); 237 238 } 239 printf("\n"); 238 240 } 239 241 else{ 240 printf(" Hook: num=0 \n");242 printf(" Hook: num=0 \n"); 241 243 } 242 244 } … … 247 249 int i; 248 250 if (num){ 249 printf(" Hook: \n");250 printf(" num=%i\n",this->num);251 printf(" ids:\n");251 printf(" Hook: \n"); 252 printf(" num=%i\n",this->num); 253 printf(" ids: "); 252 254 for (i=0;i<this->num;i++){ 253 255 printf("%i ",this->ids[i]); 254 256 } 255 printf("\n offsets:\n "); 257 printf("\n"); 258 printf(" offsets: "); 256 259 for (i=0;i<this->num;i++){ 257 260 printf("%i ",this->offsets[i]); 258 261 } 259 printf("\n objects:\n "); 260 for (i=0;i<this->num;i++){ 261 printf(" object %i\n",i); 262 objects[i]->Echo(); 262 printf("\n"); 263 if (!objects) printf(" warning: object not hooked yet\n"); 264 else{ 265 printf(" objects:\n "); 266 for (i=0;i<this->num;i++){ 267 printf(" object %i\n",i); 268 objects[i]->DeepEcho(); 269 } 263 270 } 264 271 } 265 272 else{ 266 printf(" Hook: num=0 \n");273 printf(" Hook: num=0 \n"); 267 274 } 268 275 } -
issm/trunk/src/c/objects/Node.cpp
r3479 r3483 242 242 indexing.DeepEcho(); 243 243 properties.DeepEcho(); 244 printf("Vertex:\n"); 244 245 hvertex.DeepEcho(); 246 printf("Upper node:\n"); 245 247 hupper_node.DeepEcho(); 246 248 -
issm/trunk/src/c/objects/NodeProperties.cpp
r3468 r3483 130 130 void NodeProperties::Echo(void){ 131 131 132 printf("Node Properties echo:\n");132 printf("Node properties:\n"); 133 133 printf(" onbed: %i\n",onbed); 134 134 printf(" onsurface: %i\n",onsurface); -
issm/trunk/src/c/objects/Tria.cpp
r3479 r3483 983 983 /*}}}*/ 984 984 /*FUNCTION Tria::CreateKMatrixDiagnosticHoriz {{{1*/ 985 986 985 void Tria::CreateKMatrixDiagnosticHoriz(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){ 987 988 986 989 987 /* local declarations */ … … 1042 1040 1043 1041 /*First, if we are on water, return empty matrix: */ 1044 if(this->properties.onwater) return;1042 if(this->properties.onwater) return; 1045 1043 1046 1044 /*recover pointers: */ … … 1048 1046 1049 1047 /*recover objects from hooks: */ 1050 nodes =(Node**)hnodes.deliverp();1048 nodes =(Node**) hnodes.deliverp(); 1051 1049 matpar=(Matpar*)hmatpar.delivers(); 1052 1050 matice=(Matice*)hmatice.delivers(); … … 1064 1062 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke_gg[i][j]=0.0; 1065 1063 1066 #ifdef _DEBUGELEMENTS_1067 if(my_rank==RANK && id==ELID){1068 printf("El id %i Rank %i TriaElemnet input list before gaussian loop: \n",ELID,RANK);1069 printf(" rho_ice: %g \n",matpar->GetRhoIce());1070 printf(" gravity: %g \n",matpar->GetG())1071 printf(" rho_water: %g \n",matpar->GetRhoWater());1072 printf(" Velocity: \n");1073 for (i=0;i<numgrids;i++){1074 printf(" node %i [%g,%g]\n",i,vxvy_list[i][0],vxvy_list[i][1]);1075 }1076 printf(" flow_law_parameter [%g ]\n",matice->GetB());1077 printf(" drag [%g %g %g ]\n",k[0],k[1],k[2]);1078 printf(" thickness [%g %g %g]\n",h[0],h[1],h[2]);1079 printf(" surface [%g %g %g ]\n",s[0],s[1],s[2]);1080 printf(" bed [%g %g %g]\n",b[0],b[1],b[2]);1081 }1082 #endif1083 1084 1085 1064 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 1086 1065 GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2); 1087 1088 #ifdef _DEBUGELEMENTS_1089 if(my_rank==RANK && id==ELID){1090 printf(" gaussian points: \n");1091 for(i=0;i<num_gauss;i++){1092 printf(" %g %g %g : %g\n",first_gauss_area_coord[i],second_gauss_area_coord[i],third_gauss_area_coord[i],gauss_weights[i]);1093 }1094 }1095 #endif1096 1066 1097 1067 /* Start looping on the number of gaussian points: */ … … 1127 1097 } 1128 1098 1129 #ifdef _DEBUGELEMENTS_1130 if(my_rank==RANK && id==ELID){1131 printf(" gaussian loop %i\n",ig);1132 printf(" thickness %g\n",thickness);1133 printf(" slope [%g,%g]\n",slope[0],slope[1]);1134 printf(" alpha2_list [%g,%g,%g]\n",alpha2_list[0],alpha2_list[1],alpha2_list[2]);1135 printf(" epsilon [%g,%g,%g]\n",epsilon[0],epsilon[1],epsilon[2]);1136 printf(" Matice: \n");1137 matice->Echo();1138 printf(" Matpar: \n");1139 matpar->Echo();1140 printf("\n viscosity: %g \n",viscosity);1141 printf(" jacobian: %g \n",Jdet);1142 printf(" gauss_weight: %g \n",gauss_weight);1143 }1144 #endif1145 1146 1099 /*Get B and Bprime matrices: */ 1147 1100 GetB(&B[0][0], &xyz_list[0][0], gauss_l1l2l3); … … 1157 1110 for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j]; 1158 1111 1159 #ifdef _DEBUGELEMENTS_1160 if(my_rank==RANK && id==ELID){1161 printf(" B:\n");1162 for(i=0;i<3;i++){1163 for(j=0;j<numdof;j++){1164 printf("%g ",B[i][j]);1165 }1166 printf("\n");1167 }1168 printf(" Bprime:\n");1169 for(i=0;i<3;i++){1170 for(j=0;j<numdof;j++){1171 printf("%g ",Bprime[i][j]);1172 }1173 printf("\n");1174 }1175 }1176 #endif1177 1112 } // for (ig=0; ig<num_gauss; ig++) 1178 1113 1179 1114 /*Add Ke_gg to global matrix Kgg: */ 1180 1115 MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES); 1181 1182 1116 1183 1117 /*Do not forget to include friction: */ … … 1185 1119 CreateKMatrixDiagnosticHorizFriction(Kgg,inputs,analysis_type,sub_analysis_type); 1186 1120 } 1187 1188 #ifdef _DEBUGELEMENTS_1189 if(my_rank==RANK && id==ELID){1190 printf(" Ke_gg erms:\n");1191 for( i=0; i<numdof; i++){1192 for (j=0;j<numdof;j++){1193 printf("%g ",Ke_gg[i][j]);1194 }1195 printf("\n");1196 }1197 printf(" Ke_gg row_indices:\n");1198 for( i=0; i<numdof; i++){1199 printf("%i ",doflist[i]);1200 }1201 1202 }1203 #endif1204 1121 1205 1122 cleanup_and_return:
Note:
See TracChangeset
for help on using the changeset viewer.