Changeset 16779


Ignore:
Timestamp:
11/15/13 09:51:26 (11 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/StressbalanceVerticalAnalysis.cpp

    r16700 r16779  
    110110        IssmDouble   rho_ice,g;
    111111
     112        /*Get the approximation and do nothing if the element in FS or None*/
     113        element->GetInputValue(&approximation,ApproximationEnum);
     114        if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
     115                return;
     116        }
     117
     118        /*Get dof list and vertices coordinates: */
     119        element->GetVerticesCoordinates(&xyz_list);
     120        element->GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
    112121        IssmDouble*  values    = xNew<IssmDouble>(numdof);
    113122        IssmDouble*  vx        = xNew<IssmDouble>(numnodes);
     
    120129        IssmDouble*  pressure  = xNew<IssmDouble>(numnodes);
    121130        IssmDouble*  surface   = xNew<IssmDouble>(numnodes);
    122 
    123         /*Get the approximation and do nothing if the element in FS or None*/
    124         element->GetInputValue(&approximation,ApproximationEnum);
    125         if(approximation==FSApproximationEnum || approximation==NoneApproximationEnum){
    126                 return;
    127         }
    128 
    129         /*Get dof list and vertices coordinates: */
    130         element->GetVerticesCoordinates(&xyz_list);
    131         element->GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
    132131
    133132        /*Use the dof list to index into the solution vector vz: */
Note: See TracChangeset for help on using the changeset viewer.