Changeset 12580
- Timestamp:
- 06/29/12 07:53:52 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r12470 r12580 47 47 48 48 /*Get left and right elements*/ 49 element= (int)(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]49 element=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2] 50 50 51 51 /*Now, if this element is not in the partition, pass: */ … … 68 68 for(i=0;i<numvertex_pairing;i++){ 69 69 70 if(iomodel->my_vertices[ (int)vertex_pairing[2*i+0]-1]){70 if(iomodel->my_vertices[reCast<int>(vertex_pairing[2*i+0])-1]){ 71 71 72 72 /*In debugging mode, check that the second node is in the same cpu*/ 73 _assert_(iomodel->my_vertices[ (int)vertex_pairing[2*i+1]-1]);73 _assert_(iomodel->my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]); 74 74 75 75 /*Skip if one of the two is not on the bed*/ 76 if(! nodeonbed[(int)vertex_pairing[2*i+0]-1] || !nodeonbed[(int)vertex_pairing[2*i+1]-1]) continue;76 if(!(reCast<bool>(nodeonbed[reCast<int>(vertex_pairing[2*i+0])-1])) || !(reCast<bool>(nodeonbed[reCast<int>(vertex_pairing[2*i+1])-1]))) continue; 77 77 78 78 /*Get node ids*/ 79 penpair_ids[0]=iomodel->nodecounter+ (int)vertex_pairing[2*i+0];80 penpair_ids[1]=iomodel->nodecounter+ (int)vertex_pairing[2*i+1];79 penpair_ids[0]=iomodel->nodecounter+reCast<int>(vertex_pairing[2*i+0]); 80 penpair_ids[1]=iomodel->nodecounter+reCast<int>(vertex_pairing[2*i+1]); 81 81 82 82 /*Create Load*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
r12493 r12580 72 72 73 73 //Get index of the vertex on which the current node is located 74 vertex_id= (int)*(iomodel->Data(MeshElementsEnum)+3*i+j); //(Matlab indexing)74 vertex_id=reCast<int>(*(iomodel->Data(MeshElementsEnum)+3*i+j)); //(Matlab indexing) 75 75 io_index=vertex_id-1; //(C indexing) 76 76 _assert_(vertex_id>0 && vertex_id<=numberofvertices);
Note:
See TracChangeset
for help on using the changeset viewer.