Ignore:
Timestamp:
10/21/15 11:50:10 (9 years ago)
Author:
rlacroix
Message:

Grid: Don't recreate a temporary grid if an existing temporary grid can be reused.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.cpp

    r744 r745  
    790790        } 
    791791 
    792         this->grid = CGrid::createGrid(vecDom, vecAxis); 
     792        // Warning: the gridId shouldn't be set as the grid_ref since it could be inherited 
     793        StdString gridId = CGrid::generateId(vecDom, vecAxis); 
     794        if (CGrid::has(gridId)) 
     795          this->grid = CGrid::get(gridId); 
     796        else 
     797          this->grid = CGrid::createGrid(gridId, vecDom, vecAxis); 
    793798      } 
    794799      else 
Note: See TracChangeset for help on using the changeset viewer.