Changeset 1589 for XIOS/dev/dev_olga/src/node/grid.cpp
- Timestamp:
- 11/05/18 13:57:52 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/node/grid.cpp
r1584 r1589 423 423 } 424 424 } 425 426 427 /*!428 A grid can have multiple dimension, so can its mask in the form of multi-dimension array.429 It's not a good idea to store all multi-dimension arrays corresponding to each mask.430 One of the ways is to convert this array into 1-dimension one and every process is taken place on it.431 \param [in] multi-dimension array grid mask432 */433 434 // void CGrid::getLocalMask(CArray<bool,1>& localMask)435 // {436 // std::vector<CDomain*> domainP = this->getDomains();437 // std::vector<CAxis*> axisP = this->getAxis();438 // int dim = domainP.size() * 2 + axisP.size();439 //440 // switch (dim)441 // {442 // case 0:443 // getLocalMask(mask_0d, localMask);444 // break;445 // case 1:446 // getLocalMask(mask_1d, localMask);447 // break;448 // case 2:449 // getLocalMask(mask_2d, localMask);450 // break;451 // case 3:452 // getLocalMask(mask_3d, localMask);453 // break;454 // case 4:455 // getLocalMask(mask_4d, localMask);456 // break;457 // case 5:458 // getLocalMask(mask_5d, localMask);459 // break;460 // case 6:461 // getLocalMask(mask_6d, localMask);462 // break;463 // case 7:464 // getLocalMask(mask_7d, localMask);465 // break;466 // default:467 // break;468 // }469 // }470 425 471 426 /* … … 1788 1743 nGlob.push_back(1); 1789 1744 } 1790 1791 // modifyMaskSize(nSize, false);1792 // modifyMaskSize(nSize, true); // Grid mask should be gone beyond client source filter1793 //1794 // // These below codes are reserved for future1795 // CDistributionServer srvDist(server->intraCommRank, nBegin, nSize, nBeginGlobal, nGlob);1796 // map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient.begin(),1797 // ite = outGlobalIndexFromClient.end(), it;1798 // const CDistributionServer::GlobalLocalMap& globalLocalMask = srvDist.getGlobalLocalIndex();1799 // CDistributionServer::GlobalLocalMap::const_iterator itSrv;1800 // size_t nb = 0;1801 // for (it = itb; it != ite; ++it)1802 // {1803 // CArray<size_t,1>& globalInd = it->second;1804 // for (size_t idx = 0; idx < globalInd.numElements(); ++idx)1805 // {1806 // if (globalLocalMask.end() != globalLocalMask.find(globalInd(idx))) ++nb;1807 // }1808 // }1809 //1810 // CArray<int,1> indexToModify(nb);1811 // nb = 0;1812 // for (it = itb; it != ite; ++it)1813 // {1814 // CArray<size_t,1>& globalInd = it->second;1815 // for (size_t idx = 0; idx < globalInd.numElements(); ++idx)1816 // {1817 // itSrv = globalLocalMask.find(globalInd(idx));1818 // if (globalLocalMask.end() != itSrv)1819 // {1820 // indexToModify(nb) = itSrv->second;1821 // ++nb;1822 // }1823 // }1824 // }1825 1826 // modifyMask(indexToModify, true);1827 1745 } 1828 1746
Note: See TracChangeset
for help on using the changeset viewer.