Changeset 15787


Ignore:
Timestamp:
08/10/13 07:22:20 (12 years ago)
Author:
Mathieu Morlighem
Message:

BUG: don't delete doflist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15785 r15787  
    10141014
    10151015        /*Assign output pointers:*/
    1016         xDelete<int>(doflist);
    10171016        *pdoflist=doflist;
    10181017}
     
    29742973void  Penta::ResetCoordinateSystem(void){
    29752974
    2976         int    approximation;
    2977         IssmDouble slopex[NUMVERTICES];
    2978         IssmDouble slopey[NUMVERTICES];
     2975        int        approximation;
    29792976        IssmDouble xz_plane[6];
    29802977
     
    29832980        if(IsFloating() || !IsOnBed() || (approximation!=FSApproximationEnum && approximation!=SSAFSApproximationEnum &&  approximation!=HOFSApproximationEnum)) return;
    29842981
     2982        /*Get number of nodes for velocity only and base*/
     2983        int         numnodes = this->NumberofNodesVelocity();
     2984        IssmDouble* slopex   = xNew<IssmDouble>(numnodes);
     2985        IssmDouble* slopey   = xNew<IssmDouble>(numnodes);
     2986
    29852987        /*Get slope on each node*/
    2986         GetInputListOnVertices(&slopex[0],BedSlopeXEnum);
    2987         GetInputListOnVertices(&slopey[0],BedSlopeYEnum);
    2988 
    2989         /*Loop over basal nodes (first 3) and update their CS*/
    2990         for(int i=0;i<NUMVERTICES2D;i++){
     2988        GetInputListOnNodes(slopex,BedSlopeXEnum);
     2989        GetInputListOnNodes(slopey,BedSlopeYEnum);
     2990
     2991        /*Loop over basal nodes and update their CS*/
     2992        for(int i=0;i<3;i++){//FIXME
    29912993
    29922994                /*New X axis             New Z axis*/
     
    29972999                XZvectorsToCoordinateSystem(&this->nodes[i]->coord_system[0][0],&xz_plane[0]);
    29983000        }
     3001
     3002        /*cleanup*/
     3003        xDelete<IssmDouble>(slopex);
     3004        xDelete<IssmDouble>(slopey);
    29993005}
    30003006/*}}}*/
     
    1004810054        xDelete<int>(doflistm);
    1004910055        xDelete<int>(doflists);
     10056        xDelete<int>(doflistpressure);
    1005010057}
    1005110058/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.