Ignore:
Timestamp:
05/12/20 11:52:13 (4 years ago)
Author:
ymipsl
Message:

XIOS coupling branch
Some updates.

First coupling test is beginning to work...

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/coupler_in.cpp

    r1784 r1875  
    5151   CATCH_DUMP_ATTR 
    5252 
     53   const string& CCouplerIn::getCouplingContextId(void) 
     54   { 
     55     if (couplingContextId_.empty()) 
     56     { 
     57       vector<string> vectStr=splitRegex(context,"::") ; 
     58       string poolId=vectStr[0] ; 
     59       string serviceId=poolId ; 
     60       string contextId=vectStr[1] ; 
     61       int contextLeader ; 
     62       int type = CServicesManager::CLIENT ; 
     63       couplingContextId_=CXios::getContextsManager()->getServerContextName(poolId, serviceId, 0, type, contextId) ; 
     64     } 
     65     return couplingContextId_ ; 
     66   } 
     67 
    5368   void CCouplerIn::createInterCommunicator(void) 
    5469   TRY 
     
    6075     } 
    6176     CContext* contextPtr = CContext::getCurrent(); 
    62      contextPtr->addCouplingChanel(context, false) ; 
     77     contextPtr->addCouplingChanel(getCouplingContextId(), false) ; 
    6378   } 
    6479   CATCH_DUMP_ATTR 
     
    132147   CATCH 
    133148 
    134  
     149  /*! 
     150   * assign the context associated to the coupler to the enabled fields 
     151   */ 
     152   void  CCouplerIn::assignContext(void) 
     153   { 
     154     client_ = CContext::getCurrent()->getCouplerInClient(getCouplingContextId()); 
     155     for (auto& field : getEnabledFields()) field->setContextClient(client_) ;  
     156   } 
    135157 
    136158   //---------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.