Ignore:
Timestamp:
12/07/21 12:00:23 (3 years ago)
Author:
ymipsl
Message:
  • Solve memory leak from remapper.
  • shared_ptr add add for manage nodes.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/extern/remap/src/intersection_ym.cpp

    r1588 r2269  
    186186       if (dx*dx+dy*dy>fusion_vertex*fusion_vertex) 
    187187       { 
    188           intersectPolygon[nv]=intersectPolygon[n] ; 
    189  
    190           vect_points.push_back( array<double, 2>() ); 
    191           vect_points[nv][0] = intersectPolygon[n].x; 
    192           vect_points[nv][1] = intersectPolygon[n].y; 
    193  
    194           nv++ ; 
     188         intersectPolygon[nv]=intersectPolygon[n] ; 
     189         vect_points.push_back( array<double, 2>() ); 
     190         vect_points[nv][0] = intersectPolygon[n].x; 
     191         vect_points[nv][1] = intersectPolygon[n].y; 
     192         nv++ ; 
    195193       } 
    196        
    197  
    198194    } 
    199195 
     
    209205      for(int i=0;i<indices.size()/3;++i) 
    210206      { 
    211           Coord x0 = Ox * polyline[0][indices[3*i]][0] + Oy* polyline[0][indices[3*i]][1] + Oz ; 
    212           Coord x1 = Ox * polyline[0][indices[3*i+1]][0] + Oy* polyline[0][indices[3*i+1]][1] + Oz ; 
    213           Coord x2 = Ox * polyline[0][indices[3*i+2]][0] + Oy* polyline[0][indices[3*i+2]][1] + Oz ; 
    214           area2+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ; 
     207        Coord x0 = Ox * polyline[0][indices[3*i]][0] + Oy* polyline[0][indices[3*i]][1] + Oz ; 
     208        Coord x1 = Ox * polyline[0][indices[3*i+1]][0] + Oy* polyline[0][indices[3*i+1]][1] + Oz ; 
     209        Coord x2 = Ox * polyline[0][indices[3*i+2]][0] + Oy* polyline[0][indices[3*i+2]][1] + Oz ; 
     210        area2+=triarea(x0 * (1./norm(x0)),x1* (1./norm(x1)), x2* (1./norm(x2))) ; 
    215211      } 
    216212 
Note: See TracChangeset for help on using the changeset viewer.