Changeset 1870 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
- Timestamp:
- 04/17/20 18:55:28 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
r1869 r1870 146 146 CAxis* addAxis(const std::string& id=StdString()); 147 147 CScalar* addScalar(const std::string& id=StdString()); 148 149 public: 150 void sendGridToFileServer(CContextClient* client) ; 151 private: 152 std::set<CContextClient*> sendGridToFileServer_done_ ; 153 154 public: 148 155 void sendAddDomain(const std::string& id,CContextClient* contextClient); 149 156 void sendAddAxis(const std::string& id,CContextClient* contextClient); … … 193 200 194 201 CDistributionServer* getDistributionServer(); 195 CDistributionClient* getDistributionClient();196 202 CGridTransformation* getTransformations(); 197 203 … … 231 237 232 238 void computeGridIndexToFileServer(CContextClient* client) ; 233 234 private: 239 240 private: 241 /** Client-like distribution calculated based on the knowledge of the entire grid */ 242 CDistributionClient* clientDistribution_; 243 public: 235 244 void computeClientDistribution(void) ; 245 private: 236 246 bool computeClientDistribution_done_ = false ; 237 247 public: 248 CDistributionClient* getClientDistribution(void); 249 250 private: 238 251 template<int N> 239 252 void checkGridMask(CArray<bool,N>& gridMask, … … 277 290 int getDistributedDimension(); 278 291 279 280 void computeClientIndex();281 bool computeClientIndex_done_ = false ;282 283 292 void computeConnectedClients(CContextClient* client); 284 293 set<CContextClient*> computeConnectedClients_done_ ; 285 286 void computeClientIndexScalarGrid();287 bool computeClientIndexScalarGrid_done_ = false ;288 294 289 295 void computeConnectedClientsScalarGrid(CContextClient* client); … … 346 352 // Maybe we need a flag to determine whether a client wants to write. TODO " 347 353 348 /** Map storing received data on server side. This map is the equivalent to the storeIndex_client, but for data received from client 349 * instead that from model. This map is used to concatenate data received from several clients into a single array on server side 350 * which match the local workflow grid. 351 * outLocalIndexStoreOnClient_[client_rank] -> Array of index from client of rank "client_rank" 352 * outLocalIndexStoreOnClient_[client_rank](index of buffer from client) -> local index of the workflow grid 353 * The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData(). 354 * Symetrically it is also used to send data from a server to several client for reading case. */ 355 map<int, CArray<size_t, 1> > outLocalIndexStoreOnClient_; 356 357 354 private: 355 /** Map storing received data on server side. This map is the equivalent to the storeIndex_client, but for data received from client 356 * instead that from model. This map is used to concatenate data received from several clients into a single array on server side 357 * which match the local workflow grid. 358 * outLocalIndexStoreOnClient_[client_rank] -> Array of index from client of rank "client_rank" 359 * outLocalIndexStoreOnClient_[client_rank](index of buffer from client) -> local index of the workflow grid 360 * The map is created in CGrid::computeClientIndex and filled upon receiving data in CField::recvUpdateData(). 361 * Symetrically it is also used to send data from a server to several client for reading case. */ 362 map<int, CArray<size_t, 1>> outLocalIndexStoreOnClient_; 363 public: 364 void computeOutLocalIndexStoreOnClient(void) ; 365 private: 366 bool computeOutLocalIndexStoreOnClient_done_ = false ; 367 public: 368 map<int, CArray<size_t, 1>>& getOutLocalIndexStoreOnClient(void) 369 { if (!computeOutLocalIndexStoreOnClient_done_) computeOutLocalIndexStoreOnClient(); return outLocalIndexStoreOnClient_ ; } 370 371 public: 358 372 /** Indexes calculated based on server-like distribution. 359 373 * They are used for writing/reading data and only calculated for server level that does the writing/reading. … … 370 384 CArray<size_t,1> localIndexToWriteOnClient_; 371 385 386 public: 387 bool isDataDistributed(void) ; 372 388 private: 373 389 … … 376 392 std::set<CContextClient*> clientsSet; 377 393 378 /** Map storing received indexes on server side sent by clients. Key = sender rank, value = global index array. 379 Later, the global indexes received will be mapped onto local index computed with the local distribution. 380 outGlobalIndexFromClient_[rank] -> array of global index send by client of rank "rank" 381 outGlobalIndexFromClient_[rank](n) -> global index of datav n sent by client 382 */ 394 private: 395 /** Map storing received indexes on server side sent by clients. Key = sender rank, value = global index array. 396 Later, the global indexes received will be mapped onto local index computed with the local distribution. 397 outGlobalIndexFromClient_[rank] -> array of global index send by client of rank "rank" 398 outGlobalIndexFromClient_[rank](n) -> global index of datav n sent by client 399 */ 383 400 map<int, CArray<size_t, 1> > outGlobalIndexFromClient_; 384 401 public: 402 map<int, CArray<size_t, 1> >& getOutGlobalIndexFromClient() { return outGlobalIndexFromClient_ ;} 403 404 private: 385 405 bool isChecked; 386 406 bool isDomainAxisChecked; … … 393 413 bool isAxisListSet, isDomListSet, isScalarListSet; 394 414 395 /** Client-like distribution calculated based on the knowledge of the entire grid */396 CDistributionClient* clientDistribution_;397 398 415 /** Server-like distribution calculated upon receiving indexes */ 399 416 CDistributionServer* serverDistribution_; … … 416 433 /** Size of data to be send in case of reading. It is calculated in recvIndex(). */ 417 434 std::map<int,size_t> connectedDataSizeRead_; 418 419 bool isDataDistributed_; 435 420 436 //! True if and only if the data defined on the grid can be outputted in a compressed way 421 437 bool isCompressible_; … … 424 440 bool isTransformed_, isGenerated_; 425 441 bool computedWrittenIndex_; 442 426 443 std::vector<int> axisPositionInGrid_; 444 void computeAxisPositionInGrid(void) ; 445 bool computeAxisPositionInGrid_done_ = false ; 446 std::vector<int>& getAxisPositionInGrid(void) { if (!computeAxisPositionInGrid_done_) computeAxisPositionInGrid() ; return axisPositionInGrid_ ;} 447 427 448 CGridTransformation* transformations_; 428 449 bool hasDomainAxisBaseRef_;
Note: See TracChangeset
for help on using the changeset viewer.