Changeset 1927 for XIOS


Ignore:
Timestamp:
09/07/20 16:40:49 (4 years ago)
Author:
ymipsl
Message:

Bug fix : Grid elements (domain axis, scalar) was not sent to server in the same order as it was defined in client side.

YM

Location:
XIOS/trunk/src/node
Files:
3 edited

Legend:

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

    r1639 r1927  
    18841884     { 
    18851885       gridPtr->sendCreateChild(*it); 
    1886        CGrid::get(*it)->sendAllAttributesToServer(); 
    1887        CGrid::get(*it)->sendAllDomains(); 
    1888        CGrid::get(*it)->sendAllAxis(); 
    1889        CGrid::get(*it)->sendAllScalars(); 
     1886       CGrid::get(*it)->sendGrid() ; 
    18901887     } 
    18911888   } 
  • XIOS/trunk/src/node/grid.cpp

    r1639 r1927  
    26492649 
    26502650  /*! 
    2651     Send all attributes of domains from client to server 
     2651    Send all attributes of grid and all domain, axis, scalar from client to server 
    26522652  */ 
    2653   void CGrid::sendAllDomains() 
    2654   TRY 
    2655   { 
    2656     std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); 
    2657     int dSize = domList.size(); 
    2658     for (int i = 0; i < dSize; ++i) 
    2659     { 
    2660       sendAddDomain(domList[i]->getId()); 
    2661       domList[i]->sendAllAttributesToServer(); 
    2662     } 
    2663   } 
    2664   CATCH_DUMP_ATTR 
    2665  
    2666   /*! 
    2667     Send all attributes of axis from client to server 
    2668   */ 
    2669   void CGrid::sendAllAxis() 
    2670   TRY 
    2671   { 
    2672     std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); 
    2673     int aSize = aList.size(); 
    2674  
    2675     for (int i = 0; i < aSize; ++i) 
    2676     { 
    2677       sendAddAxis(aList[i]->getId()); 
    2678       aList[i]->sendAllAttributesToServer(); 
    2679     } 
    2680   } 
    2681   CATCH_DUMP_ATTR 
    2682  
    2683   /*! 
    2684     Send all attributes of scalars from client to server 
    2685   */ 
    2686   void CGrid::sendAllScalars() 
    2687   TRY 
    2688   { 
    2689     std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); 
    2690     int sSize = sList.size(); 
    2691  
    2692     for (int i = 0; i < sSize; ++i) 
    2693     { 
    2694       sendAddScalar(sList[i]->getId()); 
    2695       sList[i]->sendAllAttributesToServer(); 
     2653 
     2654  void CGrid::sendGrid(void) 
     2655  TRY 
     2656  { 
     2657    this->sendAllAttributesToServer(); 
     2658    auto domainList=getDomains() ; 
     2659    auto axisList=getAxis() ; 
     2660    auto scalarList=getScalars() ; 
     2661    int domainIdx = 0, axisIdx = 0, scalarIdx = 0; 
     2662     
     2663    for (int idx = 0; idx < axis_domain_order.numElements(); ++idx) 
     2664    { 
     2665      if (2 == axis_domain_order(idx)) // This is domain 
     2666      { 
     2667        sendAddDomain(domainList[domainIdx]->getId()) ; 
     2668        domainList[domainIdx]->sendAllAttributesToServer(); 
     2669        domainIdx++ ; 
     2670      } 
     2671      else if (1 == axis_domain_order(idx))  // This is axis 
     2672      { 
     2673        sendAddAxis(axisList[axisIdx]->getId()) ; 
     2674        axisList[axisIdx]->sendAllAttributesToServer(); 
     2675        axisIdx++ ; 
     2676      } 
     2677      else  // Of course, this is scalar 
     2678      { 
     2679        sendAddScalar(scalarList[scalarIdx]->getId()) ; 
     2680        scalarList[scalarIdx]->sendAllAttributesToServer(); 
     2681        scalarIdx++ ; 
     2682      } 
    26962683    } 
    26972684  } 
  • XIOS/trunk/src/node/grid.hpp

    r1637 r1927  
    147147         void sendAddAxis(const std::string& id=""); 
    148148         void sendAddScalar(const std::string& id=""); 
    149          void sendAllDomains(); 
    150          void sendAllAxis(); 
    151          void sendAllScalars(); 
     149         void sendGrid(void) ; 
    152150 
    153151         static void recvAddDomain(CEventServer& event); 
Note: See TracChangeset for help on using the changeset viewer.