Changeset 9406


Ignore:
Timestamp:
08/24/11 13:24:41 (14 years ago)
Author:
Mathieu Morlighem
Message:

Fixed rift Error

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r9405 r9406  
    2828        int numberofvertices;
    2929        bool ismacayealpattyn,isstokes;
    30         int  numpenalties,numberofpressureloads,numrifts;
     30        int  numpenalties,numberofpressureloads,numrifts,numriftsegments;
    3131        double *pressureload   = NULL;
    3232        double *elements_type  = NULL;
    3333        double *nodeoniceshelf = NULL;
    3434        double *riftinfo       = NULL;
    35         double *surface        = NULL;
    3635        double *nodeonbed      = NULL;
    3736        double *nodeonstokes   = NULL;
     
    3938        double *vertices_type  = NULL;
    4039        double *penalties      = NULL;
    41 
    4240
    4341        /*Fetch parameters: */
     
    175173        /*Create Riffront loads for rifts: */
    176174        if(numrifts){
     175                iomodel->FetchData(&riftinfo,&numriftsegments,NULL,RiftinfoEnum);
    177176                iomodel->FetchData(5,RiftinfoEnum,ThicknessEnum,BedEnum,SurfaceEnum,NodeOnIceShelfEnum);
    178                 for(i=0;i<numrifts;i++){
    179                         if(iomodel->my_elements[(int)*(iomodel->Data(RiftinfoEnum)+RIFTINFOSIZE*i+2)-1]){
     177                for(i=0;i<numriftsegments;i++){
     178                        if(iomodel->my_elements[(int)*(riftinfo+RIFTINFOSIZE*i+2)-1]){
    180179                                loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
    181180                                count++;
     
    183182                }
    184183                iomodel->DeleteData(5,RiftinfoEnum,ThicknessEnum,BedEnum,SurfaceEnum,NodeOnIceShelfEnum);
     184                xfree((void**)&riftfront);
    185185        }
    186186
  • issm/trunk/src/c/solutions/diagnostic_core.cpp

    r9112 r9406  
    2424        bool   control_analysis;
    2525        int    solution_type;
    26 
    2726
    2827        /* recover parameters:*/
Note: See TracChangeset for help on using the changeset viewer.