Changeset 12580


Ignore:
Timestamp:
06/29/12 07:53:52 (13 years ago)
Author:
utke
Message:

recast

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  
    4747
    4848                        /*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]
    5050
    5151                        /*Now, if this element is not in the partition, pass: */
     
    6868        for(i=0;i<numvertex_pairing;i++){
    6969
    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]){
    7171
    7272                        /*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]);
    7474
    7575                        /*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;
    7777
    7878                        /*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]);
    8181
    8282                        /*Create Load*/
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r12493 r12580  
    7272
    7373                                        //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)
    7575                                        io_index=vertex_id-1;                      //(C indexing)
    7676                                        _assert_(vertex_id>0 && vertex_id<=numberofvertices);
Note: See TracChangeset for help on using the changeset viewer.