Changeset 5452
- Timestamp:
- 08/20/10 12:27:58 (15 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/objects/Hook.cpp ¶
r5353 r5452 79 79 printf(" num=%i\n",this->num); 80 80 printf(" ids: "); 81 for (i=0;i<this->num;i++){ 82 printf("%i ",this->ids[i]); 83 } 81 for (i=0;i<this->num;i++) printf("%i ",this->ids[i]); 84 82 printf("\n"); 85 83 printf(" offsets: "); 86 for (i=0;i<this->num;i++){ 87 printf("%i ",this->offsets[i]); 88 } 84 for (i=0;i<this->num;i++) printf("%i ",this->offsets[i]); 89 85 printf("\n"); 90 86 } … … 102 98 printf(" num=%i\n",this->num); 103 99 printf(" ids: "); 104 for (i=0;i<this->num;i++){ 105 printf("%i ",this->ids[i]); 106 } 100 for (i=0;i<this->num;i++) printf("%i ",this->ids[i]); 107 101 printf("\n"); 108 102 printf(" offsets: "); 109 for (i=0;i<this->num;i++){ 110 printf("%i ",this->offsets[i]); 111 } 103 for (i=0;i<this->num;i++) printf("%i ",this->offsets[i]); 112 104 printf("\n"); 113 105 if (!objects) printf(" warning: object not hooked yet\n"); … … 116 108 for (i=0;i<this->num;i++){ 117 109 printf(" object %i\n",i); 118 objects[i]->DeepEcho(); 110 if(objects[i]) objects[i]->DeepEcho(); 111 else printf(" no object hooked yet (not configured)\n"); 119 112 } 120 113 } -
TabularUnified issm/trunk/src/c/objects/Loads/Numericalflux.cpp ¶
r5322 r5452 34 34 int i1,i2; 35 35 int j; 36 int pos1,pos2 ;36 int pos1,pos2,pos3,pos4; 37 37 int num_nodes; 38 38 int num_elems; … … 77 77 78 78 /*2: Get the column where these ids are located in the index*/ 79 pos1=pos2=pos3=pos4=UNDEF; 80 for(j=0;j<3;j++){ 81 if (iomodel->elements[3*(e1-1)+j]==i1) pos1=j+1; 82 if (iomodel->elements[3*(e1-1)+j]==i2) pos2=j+1; 83 if (iomodel->elements[3*(e2-1)+j]==i1) pos3=j+1; 84 if (iomodel->elements[3*(e2-1)+j]==i2) pos4=j+1; 85 } 86 ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF && pos3!=UNDEF && pos4!=UNDEF); 87 88 /*3: We have the id of the elements and the position of the vertices in the index 89 * we can compute their dofs!*/ 90 numericalflux_node_ids[0]=iomodel->nodecounter+3*(e1-1)+pos1; 91 numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+pos2; 92 numericalflux_node_ids[2]=iomodel->nodecounter+3*(e2-1)+pos3; 93 numericalflux_node_ids[3]=iomodel->nodecounter+3*(e2-1)+pos4; 94 } 95 else{ 96 97 /*2: Get the column where these ids are located in the index*/ 79 98 pos1=pos2=UNDEF; 80 99 for(j=0;j<3;j++){ 81 100 if (iomodel->elements[3*(e1-1)+j]==i1) pos1=j+1; 82 if (iomodel->elements[3*(e 2-1)+j]==i1) pos2=j+1;101 if (iomodel->elements[3*(e1-1)+j]==i2) pos2=j+1; 83 102 } 84 103 ISSMASSERT(pos1!=UNDEF && pos2!=UNDEF); 85 86 /*3: We have the id of the elements and the position of the vertices in the index87 * we can compute their dofs!*/88 numericalflux_node_ids[0]=iomodel->nodecounter+3*(e1-1)+pos1; //ex: 1 2 389 numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+(pos1%3)+1; //ex: 2 3 190 numericalflux_node_ids[2]=iomodel->nodecounter+3*(e2-1)+pos2; //ex: 1 2 391 numericalflux_node_ids[3]=iomodel->nodecounter+3*(e2-1)+((pos2+1)%3)+1; //ex: 3 1 292 }93 else{94 95 /*2: Get the column where these ids are located in the index*/96 pos1==UNDEF;97 for(j=0;j<3;j++){98 if (iomodel->elements[3*(e1-1)+j]==i1) pos1=j+1;99 }100 ISSMASSERT(pos1!=UNDEF);101 104 102 105 /*3: We have the id of the elements and the position of the vertices in the index 103 106 * we can compute their dofs!*/ 104 107 numericalflux_node_ids[0]=iomodel->nodecounter+3*(e1-1)+pos1; 105 numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+ (pos1%3)+1;108 numericalflux_node_ids[1]=iomodel->nodecounter+3*(e1-1)+pos2; 106 109 } 107 110 … … 134 137 /*FUNCTION Numericalflux::Echo {{{1*/ 135 138 void Numericalflux::Echo(void){ 136 this->DeepEcho(); 139 printf("Numericalflux:\n"); 140 printf(" id: %i\n",id); 141 printf(" analysis_type: %s\n",EnumToString(analysis_type)); 142 hnodes->Echo(); 143 helement->Echo(); 144 printf(" parameters: %p\n",parameters); 145 printf(" inputs: %p\n",inputs); 137 146 } 138 147 /*}}}*/ … … 146 155 helement->DeepEcho(); 147 156 printf(" parameters\n"); 148 parameters->DeepEcho(); 157 if(parameters) 158 parameters->DeepEcho(); 159 else 160 printf(" NULL\n"); 149 161 printf(" inputs\n"); 150 162 inputs->DeepEcho(); … … 395 407 396 408 /*dynamic objects pointed to by hooks: */ 397 Node ** nodes=NULL;398 Tria * tria=NULL;399 Input * vxaverage_input=NULL;400 Input * vyaverage_input=NULL;409 Node **nodes = NULL; 410 Tria *tria = NULL; 411 Input *vxaverage_input = NULL; 412 Input *vyaverage_input = NULL; 401 413 402 414 /*Retrieve parameters: */
Note:
See TracChangeset
for help on using the changeset viewer.