Ignore:
Timestamp:
04/08/10 08:32:04 (15 years ago)
Author:
seroussi
Message:

more cleaning on ModelProcessor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp

    r3452 r3456  
    1818        Spc*    spc  = NULL;
    1919
    20         /*spc intermediary data: */
    21         double* spcthickness=NULL;
    22        
    2320        /*Create constraints: */
    2421        constraints = new DataSet(ConstraintsEnum());
    2522
    2623        /*Fetch data: */
    27         IoModelFetchData(&spcthickness,NULL,NULL,iomodel_handle,"spcthickness");
     24        IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,"spcthickness");
    2825
    2926        count=1;//matlab indexing
     
    3330                if((iomodel->my_vertices[i]==1)){
    3431
    35                         if ((int)spcthickness[2*i]){
     32                        if ((int)iomodel->spcthickness[2*i]){
    3633
    37                                 constraints->AddObject(new Spc(count,i+1,1,*(spcthickness+2*i+1)));
     34                                constraints->AddObject(new Spc(count,i+1,1,*(iomodel->spcthickness+2*i+1)));
    3835                                count++;
    3936                        }
    40 
    4137                } //if((my_vertices[i]==1))
    4238        }
    4339
     40        /*Free data: */
     41        xfree((void**)&iomodel->spcthickness);
     42       
    4443        /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these
    4544         * datasets, it will not be redone: */
    4645        constraints->Presort();
    4746
    48         /*Free data: */
    49         xfree((void**)&spcthickness);
    50        
    5147        cleanup_and_return:
    5248       
Note: See TracChangeset for help on using the changeset viewer.