Changeset 12565
- Timestamp:
- 06/27/12 12:10:36 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
r12470 r12565 83 83 iomodel->FetchData(&riftinfo,&numrifts,NULL,RiftsRiftstructEnum); 84 84 for(i=0;i<numrifts;i++){ 85 el1= (int)*(riftinfo+RIFTINFOSIZE*i+2)-1; //matlab indexing to c indexing86 el2= (int)*(riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing85 el1=reCast<int>(*(riftinfo+RIFTINFOSIZE*i+2))-1; //matlab indexing to c indexing 86 el2=reCast<int>(*(riftinfo+RIFTINFOSIZE*i+3))-1; //matlab indexing to c indexing 87 87 epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices; 88 88 } … … 107 107 into the vertices coordinates. If we start plugging 1 into my_vertices for each index[n][i] (i=0:2), then my_vertices 108 108 will hold which vertices belong to this partition*/ 109 my_vertices[ (int)*(elements+elements_width*i+0)-1]=1;110 my_vertices[ (int)*(elements+elements_width*i+1)-1]=1;111 my_vertices[ (int)*(elements+elements_width*i+2)-1]=1;109 my_vertices[reCast<int>(*(elements+elements_width*i+0))-1]=1; 110 my_vertices[reCast<int>(*(elements+elements_width*i+1))-1]=1; 111 my_vertices[reCast<int>(*(elements+elements_width*i+2))-1]=1; 112 112 113 113 if(elements_width==6){ 114 my_vertices[ (int)*(elements+elements_width*i+3)-1]=1;115 my_vertices[ (int)*(elements+elements_width*i+4)-1]=1;116 my_vertices[ (int)*(elements+elements_width*i+5)-1]=1;114 my_vertices[reCast<int>(*(elements+elements_width*i+3))-1]=1; 115 my_vertices[reCast<int>(*(elements+elements_width*i+4))-1]=1; 116 my_vertices[reCast<int>(*(elements+elements_width*i+5))-1]=1; 117 117 } 118 118 } … … 126 126 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,DiagnosticVertexPairingEnum); 127 127 for(i=0;i<numvertex_pairing;i++){ 128 if(my_vertices[ (int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){129 my_vertices[ (int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition128 if(my_vertices[reCast<int>(vertex_pairing[2*i+0])-1] && !my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]){ 129 my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]=2; //to know that these elements are not on the partition 130 130 } 131 131 } … … 133 133 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum); 134 134 for(i=0;i<numvertex_pairing;i++){ 135 if(my_vertices[ (int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){136 my_vertices[ (int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition135 if(my_vertices[reCast<int>(vertex_pairing[2*i+0])-1] && !my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]){ 136 my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]=2; //to know that these elements are not on the partition 137 137 } 138 138 } -
issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
r12495 r12565 50 50 51 51 /*now, compute eps: */ 52 if( nu)eps=ndu/nu;52 if(reCast<bool>(nu))eps=ndu/nu; 53 53 else eps=0; 54 54 }
Note:
See TracChangeset
for help on using the changeset viewer.