Changeset 12565


Ignore:
Timestamp:
06/27/12 12:10:36 (13 years ago)
Author:
utke
Message:

reCast

Location:
issm/trunk-jpl/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp

    r12470 r12565  
    8383                iomodel->FetchData(&riftinfo,&numrifts,NULL,RiftsRiftstructEnum);
    8484                for(i=0;i<numrifts;i++){
    85                         el1=(int)*(riftinfo+RIFTINFOSIZE*i+2)-1; //matlab indexing to c indexing
    86                         el2=(int)*(riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing
     85                        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
    8787                        epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices;
    8888                }
     
    107107                         into the vertices coordinates. If we start plugging 1 into my_vertices for each index[n][i] (i=0:2), then my_vertices
    108108                         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;
    112112                       
    113113                        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;
    117117                        }
    118118                }
     
    126126        iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,DiagnosticVertexPairingEnum);
    127127        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 partition
     128                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
    130130                }
    131131        }
     
    133133        iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
    134134        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 partition
     135                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
    137137                }
    138138        }
  • issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp

    r12495 r12565  
    5050
    5151                /*now, compute eps: */
    52                 if(nu)eps=ndu/nu;
     52                if(reCast<bool>(nu))eps=ndu/nu;
    5353                else eps=0;
    5454        }
Note: See TracChangeset for help on using the changeset viewer.