Changeset 1612 for XIOS/dev/dev_olga/src/node/grid.cpp
- Timestamp:
- 11/23/18 14:48:14 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/node/grid.cpp
r1594 r1612 82 82 83 83 StdSize CGrid::getDimension(void) 84 TRY 84 85 { 85 86 return getGlobalDimension().size(); 86 87 } 88 CATCH_DUMP_ATTR 87 89 88 90 //--------------------------------------------------------------- 89 91 90 92 StdSize CGrid::getDataSize(void) const 93 TRY 91 94 { 92 95 StdSize retvalue = 1; … … 98 101 return retvalue; 99 102 } 103 CATCH 100 104 101 105 /*! … … 106 110 */ 107 111 std::map<int, StdSize> CGrid::getAttributesBufferSize(CContextClient* client, bool bufferForWriting) 112 TRY 108 113 { 109 114 std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client); … … 147 152 return attributesSizes; 148 153 } 154 CATCH_DUMP_ATTR 149 155 150 156 /*! … … 156 162 */ 157 163 std::map<int, StdSize> CGrid::getDataBufferSize(CContextClient* client, const std::string& id /*= ""*/, bool bufferForWriting /*= "false"*/) 164 TRY 158 165 { 159 166 // The record index is sometimes sent along with the data but we always … … 180 187 return dataSizes; 181 188 } 189 CATCH_DUMP_ATTR 182 190 183 191 size_t CGrid::getGlobalWrittenSize(void) 192 TRY 184 193 { 185 194 std::vector<CDomain*> domainP = this->getDomains(); … … 191 200 return globalGridSize ; 192 201 } 193 202 CATCH_DUMP_ATTR 194 203 195 204 void CGrid::checkAttributesAfterTransformation() 205 TRY 196 206 { 197 207 setAxisList(); … … 228 238 } 229 239 } 240 CATCH_DUMP_ATTR 230 241 231 242 //--------------------------------------------------------------- … … 237 248 */ 238 249 bool CGrid::isCompressible(void) const 250 TRY 239 251 { 240 252 return isCompressible_; 241 253 } 254 CATCH 242 255 243 256 //--------------------------------------------------------------- 244 257 245 258 void CGrid::addRelFileCompressed(const StdString& filename) 259 TRY 246 260 { 247 261 this->relFilesCompressed.insert(filename); 248 262 } 263 CATCH_DUMP_ATTR 249 264 250 265 bool CGrid::isWrittenCompressed(const StdString& filename) const 266 TRY 251 267 { 252 268 return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end()); 253 269 } 270 CATCH 254 271 255 272 //--------------------------------------------------------------- … … 258 275 */ 259 276 void CGrid::solveDomainAxisRef(bool areAttributesChecked) 277 TRY 260 278 { 261 279 if (this->isDomainAxisChecked) return; … … 266 284 this->isDomainAxisChecked = areAttributesChecked; 267 285 } 286 CATCH_DUMP_ATTR 268 287 269 288 /* … … 272 291 */ 273 292 void CGrid::solveDomainAxisBaseRef() 293 TRY 274 294 { 275 295 if (this->hasDomainAxisBaseRef_) return; … … 297 317 this->hasDomainAxisBaseRef_ = true; 298 318 } 319 CATCH_DUMP_ATTR 299 320 300 321 void CGrid::checkEligibilityForCompressedOutput() 322 TRY 301 323 { 302 324 // We don't check if the mask is valid here, just if a mask has been defined at this point. 303 325 isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty(); 304 326 } 327 CATCH_DUMP_ATTR 305 328 306 329 void CGrid::checkMaskIndex(bool doSendingIndex) 330 TRY 307 331 { 308 332 CContext* context = CContext::getCurrent(); … … 339 363 this->isChecked = true; 340 364 } 341 365 CATCH_DUMP_ATTR 342 366 bool CGrid::hasMask() const 367 TRY 343 368 { 344 369 return (!mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty() || 345 370 !mask_4d.isEmpty() || !mask_5d.isEmpty() || !mask_6d.isEmpty() || !mask_7d.isEmpty()); 346 371 } 372 CATCH 347 373 348 374 /* … … 350 376 */ 351 377 void CGrid::createMask(void) 378 TRY 352 379 { 353 380 using namespace std; … … 387 414 } 388 415 } 416 CATCH_DUMP_ATTR 389 417 390 418 /* … … 392 420 */ 393 421 void CGrid::checkMask(void) 422 TRY 394 423 { 395 424 using namespace std; … … 429 458 } 430 459 } 431 460 CATCH_DUMP_ATTR 461 432 462 /* 433 463 Modify value of mask in a certain index … … 437 467 */ 438 468 void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue) 469 TRY 439 470 { 440 471 using namespace std; … … 472 503 } 473 504 } 505 CATCH_DUMP_ATTR 474 506 475 507 /* … … 479 511 */ 480 512 void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue) 513 TRY 481 514 { 482 515 std::vector<CDomain*> domainP = this->getDomains(); … … 513 546 } 514 547 } 548 CATCH_DUMP_ATTR 515 549 516 550 //--------------------------------------------------------------- 517 551 518 552 void CGrid::solveDomainRef(bool sendAtt) 553 TRY 519 554 { 520 555 setDomainList(); … … 529 564 } 530 565 } 566 CATCH_DUMP_ATTR 531 567 532 568 //--------------------------------------------------------------- 533 569 534 570 void CGrid::solveAxisRef(bool sendAtt) 571 TRY 535 572 { 536 573 setAxisList(); … … 560 597 } 561 598 } 599 CATCH_DUMP_ATTR 562 600 563 601 //--------------------------------------------------------------- 564 602 565 603 void CGrid::solveScalarRef(bool sendAtt) 604 TRY 566 605 { 567 606 setScalarList(); … … 577 616 } 578 617 } 618 CATCH_DUMP_ATTR 579 619 580 620 /*! … … 582 622 */ 583 623 void CGrid::computeWrittenIndex() 624 TRY 584 625 { 585 626 if (computedWrittenIndex_) return; … … 641 682 } 642 683 } 684 CATCH_DUMP_ATTR 643 685 644 686 //--------------------------------------------------------------- … … 651 693 */ 652 694 void CGrid::computeClientIndex() 695 TRY 653 696 { 654 697 CContext* context = CContext::getCurrent(); … … 711 754 } 712 755 } 756 CATCH_DUMP_ATTR 713 757 714 758 /*! … … 716 760 */ 717 761 void CGrid::computeConnectedClients() 762 TRY 718 763 { 719 764 CContext* context = CContext::getCurrent(); … … 833 878 } 834 879 } 880 CATCH_DUMP_ATTR 835 881 836 882 /*! … … 842 888 */ 843 889 void CGrid::computeIndex(void) 890 TRY 844 891 { 845 892 CContext* context = CContext::getCurrent(); … … 868 915 } 869 916 } 917 CATCH_DUMP_ATTR 870 918 871 919 /*! … … 881 929 const CContextClient* client, 882 930 CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 931 TRY 883 932 { 884 933 int serverSize = client->serverSize; … … 1047 1096 } 1048 1097 } 1049 //---------------------------------------------------------------- 1098 CATCH_DUMP_ATTR 1099 //---------------------------------------------------------------- 1050 1100 1051 1101 CGrid* CGrid::createGrid(CDomain* domain) 1102 TRY 1052 1103 { 1053 1104 std::vector<CDomain*> vecDom(1, domain); … … 1056 1107 return createGrid(vecDom, vecAxis); 1057 1108 } 1109 CATCH 1058 1110 1059 1111 CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 1060 { 1112 TRY 1113 { 1061 1114 std::vector<CDomain*> vecDom(1, domain); 1062 1115 std::vector<CAxis*> vecAxis(1, axis); … … 1064 1117 return createGrid(vecDom, vecAxis); 1065 1118 } 1119 CATCH 1066 1120 1067 1121 CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1068 1122 const CArray<int,1>& axisDomainOrder) 1123 TRY 1069 1124 { 1070 1125 std::vector<CScalar*> vecScalar; 1071 1126 return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder); 1072 1127 } 1128 CATCH 1073 1129 1074 1130 CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1075 1131 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1132 TRY 1076 1133 { 1077 1134 return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder); 1078 1135 } 1136 CATCH 1079 1137 1080 1138 CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1081 1139 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1140 TRY 1082 1141 { 1083 1142 if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) … … 1121 1180 return grid; 1122 1181 } 1182 CATCH 1123 1183 1124 1184 CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc) 1185 TRY 1125 1186 { 1126 1187 std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc; … … 1162 1223 return grid; 1163 1224 } 1225 CATCH 1164 1226 1165 1227 StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1166 1228 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1229 TRY 1167 1230 { 1168 1231 if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) … … 1205 1268 return id.str(); 1206 1269 } 1270 CATCH 1207 1271 1208 1272 StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest) 1273 TRY 1209 1274 { 1210 1275 StdString idSrc = gridSrc->getId(); … … 1216 1281 return id.str(); 1217 1282 } 1283 CATCH 1218 1284 1219 1285 //---------------------------------------------------------------- 1220 1286 1221 1287 CDomainGroup* CGrid::getVirtualDomainGroup() const 1288 TRY 1222 1289 { 1223 1290 return this->vDomainGroup_; 1224 1291 } 1292 CATCH 1225 1293 1226 1294 CAxisGroup* CGrid::getVirtualAxisGroup() const 1295 TRY 1227 1296 { 1228 1297 return this->vAxisGroup_; 1229 1298 } 1299 CATCH 1230 1300 1231 1301 CScalarGroup* CGrid::getVirtualScalarGroup() const 1302 TRY 1232 1303 { 1233 1304 return this->vScalarGroup_; 1234 1305 } 1306 CATCH 1235 1307 1236 1308 /* … … 1268 1340 1269 1341 void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const 1342 TRY 1270 1343 { 1271 1344 const StdSize size = storeIndex_client.numElements(); … … 1274 1347 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)]; 1275 1348 } 1349 CATCH 1276 1350 1277 1351 void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const 1352 TRY 1278 1353 { 1279 1354 const StdSize size = storeIndex_client.numElements(); … … 1281 1356 for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i); 1282 1357 } 1358 CATCH 1283 1359 1284 1360 void CGrid::maskField_arr(const double* const data, CArray<double, 1>& stored) const … … 1295 1371 1296 1372 void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const 1373 TRY 1297 1374 { 1298 1375 const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient(); … … 1300 1377 for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i]; 1301 1378 } 1302 1379 CATCH 1303 1380 1304 1381 void CGrid::computeClientIndexScalarGrid() 1382 TRY 1305 1383 { 1306 1384 CContext* context = CContext::getCurrent(); … … 1336 1414 } 1337 1415 } 1416 CATCH_DUMP_ATTR 1338 1417 1339 1418 void CGrid::computeConnectedClientsScalarGrid() 1419 TRY 1340 1420 { 1341 1421 CContext* context = CContext::getCurrent(); … … 1382 1462 } 1383 1463 } 1464 CATCH_DUMP_ATTR 1384 1465 1385 1466 void CGrid::sendIndexScalarGrid() 1467 TRY 1386 1468 { 1387 1469 CContext* context = CContext::getCurrent(); … … 1447 1529 } 1448 1530 } 1531 CATCH_DUMP_ATTR 1449 1532 1450 1533 void CGrid::sendIndex(void) 1534 TRY 1451 1535 { 1452 1536 CContext* context = CContext::getCurrent(); … … 1568 1652 } 1569 1653 } 1654 CATCH_DUMP_ATTR 1570 1655 1571 1656 void CGrid::recvIndex(CEventServer& event) 1657 TRY 1572 1658 { 1573 1659 string gridId; … … 1585 1671 get(gridId)->recvIndex(ranks, buffers); 1586 1672 } 1673 CATCH 1587 1674 1588 1675 void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers) 1676 TRY 1589 1677 { 1590 1678 CContext* context = CContext::getCurrent(); … … 1756 1844 } 1757 1845 } 1846 CATCH_DUMP_ATTR 1758 1847 1759 1848 /* … … 1771 1860 const std::vector<CScalar*> scalars, 1772 1861 const CArray<int,1>& axisDomainOrder) 1773 { 1862 TRY 1863 { 1774 1864 // globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 1775 1865 globalDim.resize(domains.size()*2+axis.size()); … … 1811 1901 return positionDimensionDistributed; 1812 1902 } 1903 CATCH_DUMP_ATTR 1813 1904 1814 1905 // Retrieve the global dimension of grid 1815 1906 std::vector<int> CGrid::getGlobalDimension() 1907 TRY 1816 1908 { 1817 1909 std::vector<int> globalDim; … … 1820 1912 return globalDim; 1821 1913 } 1914 CATCH_DUMP_ATTR 1822 1915 1823 1916 // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension) 1824 1917 int CGrid::getDistributedDimension() 1918 TRY 1825 1919 { 1826 1920 std::vector<int> globalDim; 1827 1921 return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order); 1828 1922 } 1923 CATCH_DUMP_ATTR 1829 1924 1830 1925 bool CGrid::isScalarGrid() const 1926 TRY 1831 1927 { 1832 1928 return (axisList_.empty() && domList_.empty()); 1833 1929 } 1930 CATCH 1834 1931 1835 1932 /*! … … 1839 1936 */ 1840 1937 bool CGrid::doGridHaveDataToWrite() 1938 TRY 1841 1939 { 1842 1940 return (0 != writtenDataSize_); 1843 1941 } 1942 CATCH_DUMP_ATTR 1844 1943 1845 1944 /*! … … 1850 1949 */ 1851 1950 size_t CGrid::getWrittenDataSize() const 1951 TRY 1852 1952 { 1853 1953 return writtenDataSize_; 1854 1954 } 1955 CATCH 1855 1956 1856 1957 /*! … … 1859 1960 */ 1860 1961 int CGrid::getNumberWrittenIndexes() const 1962 TRY 1861 1963 { 1862 1964 return numberWrittenIndexes_; 1863 1965 } 1966 CATCH 1864 1967 1865 1968 /*! … … 1868 1971 */ 1869 1972 int CGrid::getTotalNumberWrittenIndexes() const 1973 TRY 1870 1974 { 1871 1975 return totalNumberWrittenIndexes_; 1872 1976 } 1977 CATCH 1873 1978 1874 1979 /*! … … 1877 1982 */ 1878 1983 int CGrid::getOffsetWrittenIndexes() const 1984 TRY 1879 1985 { 1880 1986 return offsetWrittenIndexes_; 1881 1987 } 1988 CATCH 1882 1989 1883 1990 CDistributionServer* CGrid::getDistributionServer() 1991 TRY 1884 1992 { 1885 1993 return serverDistribution_; 1886 1994 } 1995 CATCH_DUMP_ATTR 1887 1996 1888 1997 CDistributionClient* CGrid::getDistributionClient() 1998 TRY 1889 1999 { 1890 2000 return clientDistribution_; 1891 2001 } 2002 CATCH_DUMP_ATTR 1892 2003 1893 2004 bool CGrid::doGridHaveDataDistributed(CContextClient* client) 2005 TRY 1894 2006 { 1895 2007 if (isScalarGrid()) return false; … … 1901 2013 return isDataDistributed_; 1902 2014 } 2015 CATCH_DUMP_ATTR 1903 2016 1904 2017 /*! … … 1910 2023 */ 1911 2024 bool CGrid::dispatchEvent(CEventServer& event) 2025 TRY 1912 2026 { 1913 2027 … … 1943 2057 } 1944 2058 } 2059 CATCH 1945 2060 1946 2061 ///--------------------------------------------------------------- 1947 2062 1948 2063 CDomain* CGrid::addDomain(const std::string& id) 2064 TRY 1949 2065 { 1950 2066 order_.push_back(2); … … 1953 2069 return vDomainGroup_->createChild(id); 1954 2070 } 2071 CATCH_DUMP_ATTR 1955 2072 1956 2073 CAxis* CGrid::addAxis(const std::string& id) 2074 TRY 1957 2075 { 1958 2076 order_.push_back(1); … … 1961 2079 return vAxisGroup_->createChild(id); 1962 2080 } 2081 CATCH_DUMP_ATTR 1963 2082 1964 2083 CScalar* CGrid::addScalar(const std::string& id) 2084 TRY 1965 2085 { 1966 2086 order_.push_back(0); … … 1969 2089 return vScalarGroup_->createChild(id); 1970 2090 } 2091 CATCH_DUMP_ATTR 1971 2092 1972 2093 //! Change virtual field group to a new one 1973 2094 void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup) 2095 TRY 1974 2096 { 1975 2097 this->vDomainGroup_ = newVDomainGroup; 1976 2098 } 2099 CATCH_DUMP_ATTR 1977 2100 1978 2101 //! Change virtual variable group to new one 1979 2102 void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup) 2103 TRY 1980 2104 { 1981 2105 this->vAxisGroup_ = newVAxisGroup; 1982 2106 } 2107 CATCH_DUMP_ATTR 1983 2108 1984 2109 //! Change virtual variable group to new one 1985 2110 void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup) 2111 TRY 1986 2112 { 1987 2113 this->vScalarGroup_ = newVScalarGroup; 1988 2114 } 2115 CATCH_DUMP_ATTR 1989 2116 1990 2117 /*! … … 1993 2120 */ 1994 2121 void CGrid::sendAddDomain(const string& id) 1995 { 2122 TRY 2123 { 1996 2124 sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN); 1997 2125 } 2126 CATCH_DUMP_ATTR 1998 2127 1999 2128 /*! … … 2002 2131 */ 2003 2132 void CGrid::sendAddAxis(const string& id) 2133 TRY 2004 2134 { 2005 2135 sendAddItem(id, (int)EVENT_ID_ADD_AXIS); 2006 2136 } 2137 CATCH_DUMP_ATTR 2007 2138 2008 2139 /*! … … 2011 2142 */ 2012 2143 void CGrid::sendAddScalar(const string& id) 2144 TRY 2013 2145 { 2014 2146 sendAddItem(id, (int)EVENT_ID_ADD_SCALAR); 2015 2147 } 2148 CATCH_DUMP_ATTR 2016 2149 2017 2150 /*! … … 2020 2153 */ 2021 2154 void CGrid::recvAddDomain(CEventServer& event) 2155 TRY 2022 2156 { 2023 2157 … … 2027 2161 get(id)->recvAddDomain(*buffer); 2028 2162 } 2163 CATCH 2029 2164 2030 2165 /*! … … 2033 2168 */ 2034 2169 void CGrid::recvAddDomain(CBufferIn& buffer) 2170 TRY 2035 2171 { 2036 2172 string id; … … 2038 2174 addDomain(id); 2039 2175 } 2176 CATCH_DUMP_ATTR 2040 2177 2041 2178 /*! … … 2044 2181 */ 2045 2182 void CGrid::recvAddAxis(CEventServer& event) 2183 TRY 2046 2184 { 2047 2185 … … 2051 2189 get(id)->recvAddAxis(*buffer); 2052 2190 } 2191 CATCH 2053 2192 2054 2193 /*! … … 2057 2196 */ 2058 2197 void CGrid::recvAddAxis(CBufferIn& buffer) 2198 TRY 2059 2199 { 2060 2200 string id; … … 2062 2202 addAxis(id); 2063 2203 } 2204 CATCH_DUMP_ATTR 2064 2205 2065 2206 /*! … … 2068 2209 */ 2069 2210 void CGrid::recvAddScalar(CEventServer& event) 2211 TRY 2070 2212 { 2071 2213 … … 2075 2217 get(id)->recvAddScalar(*buffer); 2076 2218 } 2219 CATCH 2077 2220 2078 2221 /*! … … 2081 2224 */ 2082 2225 void CGrid::recvAddScalar(CBufferIn& buffer) 2226 TRY 2083 2227 { 2084 2228 string id; … … 2086 2230 addScalar(id); 2087 2231 } 2232 CATCH_DUMP_ATTR 2088 2233 2089 2234 /*! … … 2094 2239 */ 2095 2240 void CGrid::solveDomainAxisRefInheritance(bool apply) 2241 TRY 2096 2242 { 2097 2243 CContext* context = CContext::getCurrent(); … … 2134 2280 } 2135 2281 } 2282 CATCH_DUMP_ATTR 2136 2283 2137 2284 bool CGrid::isTransformed() 2285 TRY 2138 2286 { 2139 2287 return isTransformed_; 2140 2288 } 2289 CATCH_DUMP_ATTR 2141 2290 2142 2291 void CGrid::setTransformed() 2292 TRY 2143 2293 { 2144 2294 isTransformed_ = true; 2145 2295 } 2296 CATCH_DUMP_ATTR 2146 2297 2147 2298 CGridTransformation* CGrid::getTransformations() 2299 TRY 2148 2300 { 2149 2301 return transformations_; 2150 2302 } 2303 CATCH_DUMP_ATTR 2151 2304 2152 2305 void CGrid::addTransGridSource(CGrid* gridSrc) 2306 TRY 2153 2307 { 2154 2308 if (gridSrc_.end() == gridSrc_.find(gridSrc)) 2155 2309 gridSrc_.insert(make_pair(gridSrc,make_pair(false,""))); 2156 2310 } 2311 CATCH_DUMP_ATTR 2157 2312 2158 2313 std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource() 2314 TRY 2159 2315 { 2160 2316 return gridSrc_; 2161 2317 } 2318 CATCH_DUMP_ATTR 2162 2319 2163 2320 /*! … … 2166 2323 */ 2167 2324 void CGrid::completeGrid(CGrid* transformGridSrc) 2325 TRY 2168 2326 { 2169 2327 if (0 != transformGridSrc) … … 2184 2342 gridGenerate.completeGrid(); 2185 2343 } 2344 CATCH_DUMP_ATTR 2186 2345 2187 2346 bool CGrid::isGenerated() 2347 TRY 2188 2348 { 2189 2349 return isGenerated_; 2190 2350 } 2351 CATCH 2191 2352 2192 2353 void CGrid::setGenerated() 2354 TRY 2193 2355 { 2194 2356 isGenerated_ = true; 2195 2357 } 2358 CATCH_DUMP_ATTR 2196 2359 2197 2360 void CGrid::transformGrid(CGrid* transformGridSrc) 2361 TRY 2198 2362 { 2199 2363 if (!transformGridSrc) … … 2221 2385 transformGridSrc->checkMaskIndex(false); 2222 2386 } 2387 CATCH_DUMP_ATTR 2223 2388 2224 2389 bool CGrid::hasTransform() 2390 TRY 2225 2391 { 2226 2392 if (hasTransform_) return hasTransform_; … … 2236 2402 return hasTransform_; 2237 2403 } 2404 CATCH_DUMP_ATTR 2238 2405 2239 2406 /*! … … 2242 2409 */ 2243 2410 std::vector<CDomain*> CGrid::getDomains() 2411 TRY 2244 2412 { 2245 2413 std::vector<CDomain*> domList; … … 2250 2418 return domList; 2251 2419 } 2420 CATCH_DUMP_ATTR 2252 2421 2253 2422 /*! … … 2256 2425 */ 2257 2426 std::vector<CAxis*> CGrid::getAxis() 2427 TRY 2258 2428 { 2259 2429 std::vector<CAxis*> aList; … … 2263 2433 return aList; 2264 2434 } 2435 CATCH_DUMP_ATTR 2265 2436 2266 2437 /*! … … 2269 2440 */ 2270 2441 std::vector<CScalar*> CGrid::getScalars() 2442 TRY 2271 2443 { 2272 2444 std::vector<CScalar*> sList; … … 2276 2448 return sList; 2277 2449 } 2450 CATCH_DUMP_ATTR 2278 2451 2279 2452 /*! … … 2282 2455 */ 2283 2456 CDomain* CGrid::getDomain(int domainIndex) 2457 TRY 2284 2458 { 2285 2459 std::vector<CDomain*> domainListP = this->getDomains(); … … 2299 2473 return domainListP[domainIndex]; 2300 2474 } 2475 CATCH_DUMP_ATTR 2301 2476 2302 2477 /*! … … 2305 2480 */ 2306 2481 CAxis* CGrid::getAxis(int axisIndex) 2482 TRY 2307 2483 { 2308 2484 std::vector<CAxis*> axisListP = this->getAxis(); … … 2322 2498 return axisListP[axisIndex]; 2323 2499 } 2500 CATCH_DUMP_ATTR 2324 2501 2325 2502 /*! … … 2328 2505 */ 2329 2506 CScalar* CGrid::getScalar(int scalarIndex) 2507 TRY 2330 2508 { 2331 2509 std::vector<CScalar*> scalarListP = this->getScalars(); … … 2345 2523 return scalarListP[scalarIndex]; 2346 2524 } 2525 CATCH_DUMP_ATTR 2347 2526 2348 2527 /*! … … 2351 2530 */ 2352 2531 void CGrid::setDomainList(const std::vector<CDomain*> domains) 2532 TRY 2353 2533 { 2354 2534 if (isDomListSet) return; … … 2371 2551 isDomListSet = true; 2372 2552 } 2373 2374 }2553 } 2554 CATCH_DUMP_ATTR 2375 2555 2376 2556 /*! … … 2379 2559 */ 2380 2560 void CGrid::setAxisList(const std::vector<CAxis*> axis) 2561 TRY 2381 2562 { 2382 2563 if (isAxisListSet) return; … … 2400 2581 } 2401 2582 } 2583 CATCH_DUMP_ATTR 2402 2584 2403 2585 /*! … … 2406 2588 */ 2407 2589 void CGrid::setScalarList(const std::vector<CScalar*> scalars) 2590 TRY 2408 2591 { 2409 2592 if (isScalarListSet) return; … … 2427 2610 } 2428 2611 } 2612 CATCH_DUMP_ATTR 2429 2613 2430 2614 /*! … … 2433 2617 */ 2434 2618 std::vector<StdString> CGrid::getDomainList() 2619 TRY 2435 2620 { 2436 2621 setDomainList(); 2437 2622 return domList_; 2438 2623 } 2624 CATCH 2439 2625 2440 2626 /*! … … 2443 2629 */ 2444 2630 std::vector<StdString> CGrid::getAxisList() 2631 TRY 2445 2632 { 2446 2633 setAxisList(); 2447 2634 return axisList_; 2448 2635 } 2636 CATCH 2449 2637 2450 2638 /*! … … 2453 2641 */ 2454 2642 std::vector<StdString> CGrid::getScalarList() 2643 TRY 2455 2644 { 2456 2645 setScalarList(); 2457 2646 return scalarList_; 2458 2647 } 2648 CATCH 2459 2649 2460 2650 /*! … … 2462 2652 */ 2463 2653 void CGrid::sendAllDomains() 2654 TRY 2464 2655 { 2465 2656 std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); … … 2471 2662 } 2472 2663 } 2664 CATCH_DUMP_ATTR 2473 2665 2474 2666 /*! … … 2476 2668 */ 2477 2669 void CGrid::sendAllAxis() 2670 TRY 2478 2671 { 2479 2672 std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); … … 2486 2679 } 2487 2680 } 2681 CATCH_DUMP_ATTR 2488 2682 2489 2683 /*! … … 2491 2685 */ 2492 2686 void CGrid::sendAllScalars() 2687 TRY 2493 2688 { 2494 2689 std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); … … 2501 2696 } 2502 2697 } 2698 CATCH_DUMP_ATTR 2503 2699 2504 2700 void CGrid::setContextClient(CContextClient* contextClient) 2701 TRY 2505 2702 { 2506 2703 if (clientsSet.find(contextClient)==clientsSet.end()) … … 2514 2711 this->getAxis()[i]->setContextClient(contextClient); 2515 2712 } 2713 CATCH_DUMP_ATTR 2516 2714 2517 2715 /*! … … 2519 2717 */ 2520 2718 void CGrid::parse(xml::CXMLNode& node) 2719 TRY 2521 2720 { 2522 2721 SuperClass::parse(node); … … 2559 2758 setScalarList(); 2560 2759 } 2760 CATCH_DUMP_ATTR 2761 2561 2762 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.