Changeset 1918 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp
- Timestamp:
- 07/16/20 17:18:01 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp
r1875 r1918 333 333 this->checkData(); 334 334 this->checkLabel(); 335 initializeLocalElement() ; 336 addFullView() ; 337 addWorkflowView() ; 338 addModelView() ; 339 340 checkAttributes_done_ = true ; 341 } 342 CATCH_DUMP_ATTR 343 344 345 346 void CAxis::initializeLocalElement(void) 347 { 348 // after checkAttribute index of size n 349 int rank = CContext::getCurrent()->getIntraCommRank() ; 335 350 336 checkAttributes_done_ = true ; 337 } 338 CATCH_DUMP_ATTR 351 CArray<size_t,1> ind(n) ; 352 for (int i=0;i<n;i++) ind(i)=index(i) ; 353 354 localElement_ = new CLocalElement(rank, n_glo, ind) ; 355 } 356 357 void CAxis::addFullView(void) 358 { 359 CArray<int,1> index(n) ; 360 for(int i=0; i<n ; i++) index(i)=i ; 361 localElement_ -> addView(CElementView::FULL, index) ; 362 } 363 364 void CAxis::addWorkflowView(void) 365 { 366 // mask + data are included into data_index 367 int nk=data_index.numElements() ; 368 int nMask=0 ; 369 for(int k=0;k<nk;k++) if (data_index(k)>=0 && data_index(k)<n) nMask++ ; 370 371 CArray<int,1> index(nMask) ; 372 nMask=0 ; 373 for(int k=0;k<nk;k++) 374 if (data_index(k)>=0 && data_index(k)<n) 375 { 376 index(nMask) = data_index(k) ; 377 nMask++ ; 378 } 379 localElement_ -> addView(CElementView::WORKFLOW, index) ; 380 } 381 382 void CAxis::addModelView(void) 383 { 384 // information for model view is stored in data_index 385 localElement_->addView(CElementView::MODEL, data_index) ; 386 } 387 388 void CAxis::computeModelToWorkflowConnector(void) 389 { 390 CLocalView* srcView=getLocalView(CElementView::MODEL) ; 391 CLocalView* dstView=getLocalView(CElementView::WORKFLOW) ; 392 modelToWorkflowConnector_ = new CLocalConnector(srcView, dstView); 393 modelToWorkflowConnector_->computeConnector() ; 394 } 339 395 340 396 /*!
Note: See TracChangeset
for help on using the changeset viewer.