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_out.cpp

    r1784 r1875  
    5454   } 
    5555   CATCH_DUMP_ATTR 
     56 
     57   const string& CCouplerOut::getCouplingContextId(void) 
     58   { 
     59     if (couplingContextId_.empty()) 
     60     { 
     61       vector<string> vectStr=splitRegex(context,"::") ; 
     62       string poolId=vectStr[0] ; 
     63       string serviceId=poolId ; 
     64       string contextId=vectStr[1] ; 
     65       int contextLeader ; 
     66       int type = CServicesManager::CLIENT ; 
     67       couplingContextId_=CXios::getContextsManager()->getServerContextName(poolId, serviceId, 0, type, contextId) ; 
     68     } 
     69     return couplingContextId_ ; 
     70   } 
    5671 
    5772   std::vector<CField*> CCouplerOut::getEnabledFields(void) 
     
    7590   CATCH_DUMP_ATTR 
    7691 
     92   /*! 
     93    * assign the context associated to the coupler to the enabled fields 
     94    */ 
     95   void  CCouplerOut::assignContext(void) 
     96   { 
     97     client_ = CContext::getCurrent()->getCouplerOutClient(getCouplingContextId()); 
     98     for (auto& field : getEnabledFields()) field->setContextClient(client_) ;  
     99   } 
     100 
    77101      /*! 
    78102   \brief Get virtual field group 
     
    133157     } 
    134158     CContext* contextPtr = CContext::getCurrent(); 
    135      contextPtr->addCouplingChanel(context, true) ; 
     159     contextPtr->addCouplingChanel(getCouplingContextId(), true) ; 
    136160   } 
    137161   CATCH_DUMP_ATTR 
Note: See TracChangeset for help on using the changeset viewer.