Ignore:
Timestamp:
12/16/14 12:55:53 (10 years ago)
Author:
mhnguyen
Message:

Reorganizing structure of grid

+) Grid doesn't have domain_ref and axis_ref anymore.
All domain and axis of a grid must be inside grid (These domain and axis can be defined or refer to others)
+) Grid contains list of domain and axis
+) Reorder some functions to make sure new functionlities work

Test
+) On Curie
+) Mode attached and detached
+) Only test_new_features
+) Passed

File:
1 edited

Legend:

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

    r537 r540  
    353353   void CContext::closeDefinition(void) 
    354354   { 
     355 
    355356     if (hasClient) 
    356357     { 
     358       std::cout << "Current context " << *this << std::endl; 
    357359       // After xml is parsed, there are some more works with post processing 
    358360       postProcessing(); 
     
    378380       sendEnabledFields(); 
    379381 
     382      // At last, we have all info of domain and axis, then send them 
     383       sendRefDomainsAxis(); 
     384 
    380385      // After that, send all grid (if any) 
    381386       sendRefGrid(); 
    382387 
    383       // At last, we have all info of domain and axis, then send them 
    384        sendRefDomainsAxis(); 
     388 
    385389    } 
    386390 
     
    508512     // Résolution des héritages par référence au niveau des fichiers. 
    509513      const vector<CFile*> allFiles=CFile::getAll() ; 
     514      const vector<CGrid*> allGrids= CGrid::getAll(); 
    510515 
    511516     //if (hasClient && !hasServer) 
    512517      if (hasClient) 
     518      { 
    513519        for (unsigned int i = 0; i < allFiles.size(); i++) 
    514520          allFiles[i]->solveFieldRefInheritance(apply); 
     521      } 
     522 
     523      unsigned int vecSize = allGrids.size(); 
     524      unsigned int i = 0; 
     525      for (i = 0; i < vecSize; ++i) 
     526        allGrids[i]->solveDomainAxisRefInheritance(apply); 
     527 
    515528   } 
    516529 
     
    702715   { 
    703716      postProcessing(); 
     717      std::cout << "server context " << *this << std::endl; 
    704718   } 
    705719 
     
    848862       gridPtr->sendCreateChild(*it); 
    849863       CGrid::get(*it)->sendAllAttributesToServer(); 
     864       CGrid::get(*it)->sendAllDomains(); 
     865       CGrid::get(*it)->sendAllAxis(); 
    850866     } 
    851867   } 
     
    881897     for (itAxis = axisIds.begin(); itAxis != itE; ++itAxis) 
    882898     { 
    883        axisPtr->sendCreateChild(*itAxis); 
    884        CAxis::get(*itAxis)->sendAllAttributesToServer(); 
     899       if (!itAxis->empty()) 
     900       { 
     901         axisPtr->sendCreateChild(*itAxis); 
     902         CAxis::get(*itAxis)->sendAllAttributesToServer(); 
     903       } 
    885904     } 
    886905 
     
    891910     for (itDom = domainIds.begin(); itDom != itE; ++itDom) 
    892911     { 
    893        domPtr->sendCreateChild(*itDom); 
    894        CDomain::get(*itDom)->sendAllAttributesToServer(); 
     912       if (!itDom->empty()) { 
     913          domPtr->sendCreateChild(*itDom); 
     914          CDomain::get(*itDom)->sendAllAttributesToServer(); 
     915       } 
    895916     } 
    896917   } 
Note: See TracChangeset for help on using the changeset viewer.