Changeset 1294 for XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp
- Timestamp:
- 10/06/17 13:41:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp
r1263 r1294 36 36 , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 37 37 , computedWrittenIndex_(false) 38 , clients() 38 39 { 39 40 setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); … … 55 56 , gridSrc_(), hasTransform_(false), isGenerated_(false), order_(), globalIndexOnServer_() 56 57 , computedWrittenIndex_(false) 58 , clients() 57 59 { 58 60 setVirtualDomainGroup(CDomainGroup::create(getId() + "_virtual_domain_group")); … … 643 645 } 644 646 } 645 646 647 } 647 648 … … 649 650 650 651 /* 651 Compute the global index and its local index on taking account of mask,data index.652 These global index then will be used to compute the connection of this client to other clients in the different group652 Compute the global index and its local index taking account mask and data index. 653 These global indexes will be used to compute the connection of this client (sender) to its servers (receivers) 653 654 (via function computeConnectedClient) 654 These global index also corresponding to data sent to other clients (if any)655 These global indexes also correspond to data sent to servers (if any) 655 656 */ 656 657 void CGrid::computeClientIndex() … … 1347 1348 { 1348 1349 CContext* context = CContext::getCurrent(); 1349 int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1;1350 1350 storeIndex_toSrv.clear(); 1351 1352 for (int p = 0; p < nbSrvPools; ++p) 1353 { 1354 CContextClient* client = context->hasServer ? context->clientPrimServer[p] : context->client; 1351 std::set<CContextClient*>::iterator it; 1352 1353 for (it=clients.begin(); it!=clients.end(); ++it) 1354 { 1355 CContextClient* client = *it; 1355 1356 int receiverSize = client->serverSize; 1356 1357 … … 1412 1413 { 1413 1414 CContext* context = CContext::getCurrent(); 1414 int nbSrvPools = (context->clientPrimServer.size() == 0) ? 1 : context->clientPrimServer.size();1415 1415 storeIndex_toSrv.clear(); 1416 for (int p = 0; p < nbSrvPools; ++p) 1417 { 1418 CContextClient* client = (context->clientPrimServer.size() == 0) ? context->client : context->clientPrimServer[p]; 1416 std::set<CContextClient*>::iterator it; 1417 1418 for (it=clients.begin(); it!=clients.end(); ++it) 1419 { 1420 CContextClient* client = *it; 1419 1421 int receiverSize = client->serverSize; 1420 1422 … … 2502 2504 } 2503 2505 2506 void CGrid::setContextClient(CContextClient* contextClient) 2507 { 2508 clients.insert(contextClient); 2509 } 2510 2504 2511 /*! 2505 2512 Parse a grid, for now, it contains only domain, axis and scalar
Note: See TracChangeset
for help on using the changeset viewer.