Changeset 1622 for XIOS/trunk/src/node/grid.cpp
- Timestamp:
- 12/11/18 13:22:07 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/grid.cpp
r1562 r1622 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 } 365 CATCH_DUMP_ATTR 341 366 342 367 /* … … 344 369 */ 345 370 void CGrid::createMask(void) 371 TRY 346 372 { 347 373 using namespace std; … … 381 407 } 382 408 } 409 CATCH_DUMP_ATTR 383 410 384 411 /* … … 386 413 */ 387 414 void CGrid::checkMask(void) 415 TRY 388 416 { 389 417 using namespace std; … … 423 451 } 424 452 } 425 453 CATCH_DUMP_ATTR 426 454 427 455 /*! … … 433 461 434 462 void CGrid::getLocalMask(CArray<bool,1>& localMask) 463 TRY 435 464 { 436 465 std::vector<CDomain*> domainP = this->getDomains(); … … 468 497 } 469 498 } 499 CATCH_DUMP_ATTR 470 500 471 501 /* … … 476 506 */ 477 507 void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue) 508 TRY 478 509 { 479 510 using namespace std; … … 511 542 } 512 543 } 544 CATCH_DUMP_ATTR 513 545 514 546 /* … … 518 550 */ 519 551 void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue) 552 TRY 520 553 { 521 554 std::vector<CDomain*> domainP = this->getDomains(); … … 552 585 } 553 586 } 587 CATCH_DUMP_ATTR 554 588 555 589 //--------------------------------------------------------------- 556 590 557 591 void CGrid::solveDomainRef(bool sendAtt) 592 TRY 558 593 { 559 594 setDomainList(); … … 568 603 } 569 604 } 605 CATCH_DUMP_ATTR 570 606 571 607 //--------------------------------------------------------------- 572 608 573 609 void CGrid::solveAxisRef(bool sendAtt) 610 TRY 574 611 { 575 612 setAxisList(); … … 599 636 } 600 637 } 638 CATCH_DUMP_ATTR 601 639 602 640 //--------------------------------------------------------------- 603 641 604 642 void CGrid::solveScalarRef(bool sendAtt) 643 TRY 605 644 { 606 645 setScalarList(); … … 616 655 } 617 656 } 657 CATCH_DUMP_ATTR 618 658 619 659 /*! … … 621 661 */ 622 662 void CGrid::computeWrittenIndex() 663 TRY 623 664 { 624 665 if (computedWrittenIndex_) return; … … 680 721 } 681 722 } 723 CATCH_DUMP_ATTR 682 724 683 725 //--------------------------------------------------------------- … … 690 732 */ 691 733 void CGrid::computeClientIndex() 734 TRY 692 735 { 693 736 CContext* context = CContext::getCurrent(); … … 746 789 } 747 790 } 791 CATCH_DUMP_ATTR 748 792 749 793 /*! … … 751 795 */ 752 796 void CGrid::computeConnectedClients() 797 TRY 753 798 { 754 799 CContext* context = CContext::getCurrent(); … … 844 889 } 845 890 } 891 CATCH_DUMP_ATTR 846 892 847 893 /*! … … 853 899 */ 854 900 void CGrid::computeIndex(void) 901 TRY 855 902 { 856 903 CContext* context = CContext::getCurrent(); … … 879 926 } 880 927 } 928 CATCH_DUMP_ATTR 881 929 882 930 /*! … … 892 940 const CContextClient* client, 893 941 CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 942 TRY 894 943 { 895 944 int serverSize = client->serverSize; … … 1058 1107 } 1059 1108 } 1060 //---------------------------------------------------------------- 1109 CATCH_DUMP_ATTR 1110 //---------------------------------------------------------------- 1061 1111 1062 1112 CGrid* CGrid::createGrid(CDomain* domain) 1113 TRY 1063 1114 { 1064 1115 std::vector<CDomain*> vecDom(1, domain); … … 1067 1118 return createGrid(vecDom, vecAxis); 1068 1119 } 1120 CATCH 1069 1121 1070 1122 CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 1071 { 1123 TRY 1124 { 1072 1125 std::vector<CDomain*> vecDom(1, domain); 1073 1126 std::vector<CAxis*> vecAxis(1, axis); … … 1075 1128 return createGrid(vecDom, vecAxis); 1076 1129 } 1130 CATCH 1077 1131 1078 1132 CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1079 1133 const CArray<int,1>& axisDomainOrder) 1134 TRY 1080 1135 { 1081 1136 std::vector<CScalar*> vecScalar; 1082 1137 return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder); 1083 1138 } 1139 CATCH 1084 1140 1085 1141 CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1086 1142 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1143 TRY 1087 1144 { 1088 1145 return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder); 1089 1146 } 1147 CATCH 1090 1148 1091 1149 CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1092 1150 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1151 TRY 1093 1152 { 1094 1153 if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) … … 1132 1191 return grid; 1133 1192 } 1193 CATCH 1134 1194 1135 1195 CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc) 1196 TRY 1136 1197 { 1137 1198 std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc; … … 1173 1234 return grid; 1174 1235 } 1236 CATCH 1175 1237 1176 1238 StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 1177 1239 const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 1240 TRY 1178 1241 { 1179 1242 if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) … … 1216 1279 return id.str(); 1217 1280 } 1281 CATCH 1218 1282 1219 1283 StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest) 1284 TRY 1220 1285 { 1221 1286 StdString idSrc = gridSrc->getId(); … … 1227 1292 return id.str(); 1228 1293 } 1294 CATCH 1229 1295 1230 1296 //---------------------------------------------------------------- 1231 1297 1232 1298 CDomainGroup* CGrid::getVirtualDomainGroup() const 1299 TRY 1233 1300 { 1234 1301 return this->vDomainGroup_; 1235 1302 } 1303 CATCH 1236 1304 1237 1305 CAxisGroup* CGrid::getVirtualAxisGroup() const 1306 TRY 1238 1307 { 1239 1308 return this->vAxisGroup_; 1240 1309 } 1310 CATCH 1241 1311 1242 1312 CScalarGroup* CGrid::getVirtualScalarGroup() const 1313 TRY 1243 1314 { 1244 1315 return this->vScalarGroup_; 1245 1316 } 1317 CATCH 1246 1318 1247 1319 /* … … 1279 1351 1280 1352 void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const 1353 TRY 1281 1354 { 1282 1355 const StdSize size = storeIndex_client.numElements(); … … 1285 1358 for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)]; 1286 1359 } 1360 CATCH 1287 1361 1288 1362 void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const 1363 TRY 1289 1364 { 1290 1365 const StdSize size = storeIndex_client.numElements(); … … 1292 1367 for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i); 1293 1368 } 1369 CATCH 1294 1370 1295 1371 void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const 1372 TRY 1296 1373 { 1297 1374 const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient(); … … 1299 1376 for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i]; 1300 1377 } 1301 1378 CATCH 1302 1379 1303 1380 void CGrid::computeClientIndexScalarGrid() 1381 TRY 1304 1382 { 1305 1383 CContext* context = CContext::getCurrent(); … … 1335 1413 } 1336 1414 } 1415 CATCH_DUMP_ATTR 1337 1416 1338 1417 void CGrid::computeConnectedClientsScalarGrid() 1418 TRY 1339 1419 { 1340 1420 CContext* context = CContext::getCurrent(); … … 1381 1461 } 1382 1462 } 1463 CATCH_DUMP_ATTR 1383 1464 1384 1465 void CGrid::sendIndexScalarGrid() 1466 TRY 1385 1467 { 1386 1468 CContext* context = CContext::getCurrent(); … … 1446 1528 } 1447 1529 } 1530 CATCH_DUMP_ATTR 1448 1531 1449 1532 void CGrid::sendIndex(void) 1533 TRY 1450 1534 { 1451 1535 CContext* context = CContext::getCurrent(); … … 1567 1651 } 1568 1652 } 1653 CATCH_DUMP_ATTR 1569 1654 1570 1655 void CGrid::recvIndex(CEventServer& event) 1656 TRY 1571 1657 { 1572 1658 string gridId; … … 1584 1670 get(gridId)->recvIndex(ranks, buffers); 1585 1671 } 1672 CATCH 1586 1673 1587 1674 void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers) 1675 TRY 1588 1676 { 1589 1677 CContext* context = CContext::getCurrent(); … … 1791 1879 } 1792 1880 } 1881 CATCH_DUMP_ATTR 1793 1882 1794 1883 /* … … 1806 1895 const std::vector<CScalar*> scalars, 1807 1896 const CArray<int,1>& axisDomainOrder) 1808 { 1897 TRY 1898 { 1809 1899 // globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 1810 1900 globalDim.resize(domains.size()*2+axis.size()); … … 1846 1936 return positionDimensionDistributed; 1847 1937 } 1938 CATCH_DUMP_ATTR 1848 1939 1849 1940 // Retrieve the global dimension of grid 1850 1941 std::vector<int> CGrid::getGlobalDimension() 1942 TRY 1851 1943 { 1852 1944 std::vector<int> globalDim; … … 1855 1947 return globalDim; 1856 1948 } 1949 CATCH_DUMP_ATTR 1857 1950 1858 1951 // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension) 1859 1952 int CGrid::getDistributedDimension() 1953 TRY 1860 1954 { 1861 1955 std::vector<int> globalDim; 1862 1956 return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order); 1863 1957 } 1958 CATCH_DUMP_ATTR 1864 1959 1865 1960 bool CGrid::isScalarGrid() const 1961 TRY 1866 1962 { 1867 1963 return (axisList_.empty() && domList_.empty()); 1868 1964 } 1965 CATCH 1869 1966 1870 1967 /*! … … 1874 1971 */ 1875 1972 bool CGrid::doGridHaveDataToWrite() 1973 TRY 1876 1974 { 1877 1975 return (0 != writtenDataSize_); 1878 1976 } 1977 CATCH_DUMP_ATTR 1879 1978 1880 1979 /*! … … 1885 1984 */ 1886 1985 size_t CGrid::getWrittenDataSize() const 1986 TRY 1887 1987 { 1888 1988 return writtenDataSize_; 1889 1989 } 1990 CATCH 1890 1991 1891 1992 /*! … … 1894 1995 */ 1895 1996 int CGrid::getNumberWrittenIndexes() const 1997 TRY 1896 1998 { 1897 1999 return numberWrittenIndexes_; 1898 2000 } 2001 CATCH 1899 2002 1900 2003 /*! … … 1903 2006 */ 1904 2007 int CGrid::getTotalNumberWrittenIndexes() const 2008 TRY 1905 2009 { 1906 2010 return totalNumberWrittenIndexes_; 1907 2011 } 2012 CATCH 1908 2013 1909 2014 /*! … … 1912 2017 */ 1913 2018 int CGrid::getOffsetWrittenIndexes() const 2019 TRY 1914 2020 { 1915 2021 return offsetWrittenIndexes_; 1916 2022 } 2023 CATCH 1917 2024 1918 2025 CDistributionServer* CGrid::getDistributionServer() 2026 TRY 1919 2027 { 1920 2028 return serverDistribution_; 1921 2029 } 2030 CATCH_DUMP_ATTR 1922 2031 1923 2032 CDistributionClient* CGrid::getDistributionClient() 2033 TRY 1924 2034 { 1925 2035 return clientDistribution_; 1926 2036 } 2037 CATCH_DUMP_ATTR 1927 2038 1928 2039 bool CGrid::doGridHaveDataDistributed(CContextClient* client) 2040 TRY 1929 2041 { 1930 2042 if (isScalarGrid()) return false; … … 1936 2048 return isDataDistributed_; 1937 2049 } 2050 CATCH_DUMP_ATTR 1938 2051 1939 2052 /*! … … 1945 2058 */ 1946 2059 bool CGrid::dispatchEvent(CEventServer& event) 2060 TRY 1947 2061 { 1948 2062 … … 1978 2092 } 1979 2093 } 2094 CATCH 1980 2095 1981 2096 ///--------------------------------------------------------------- 1982 2097 1983 2098 CDomain* CGrid::addDomain(const std::string& id) 2099 TRY 1984 2100 { 1985 2101 order_.push_back(2); … … 1988 2104 return vDomainGroup_->createChild(id); 1989 2105 } 2106 CATCH_DUMP_ATTR 1990 2107 1991 2108 CAxis* CGrid::addAxis(const std::string& id) 2109 TRY 1992 2110 { 1993 2111 order_.push_back(1); … … 1996 2114 return vAxisGroup_->createChild(id); 1997 2115 } 2116 CATCH_DUMP_ATTR 1998 2117 1999 2118 CScalar* CGrid::addScalar(const std::string& id) 2119 TRY 2000 2120 { 2001 2121 order_.push_back(0); … … 2004 2124 return vScalarGroup_->createChild(id); 2005 2125 } 2126 CATCH_DUMP_ATTR 2006 2127 2007 2128 //! Change virtual field group to a new one 2008 2129 void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup) 2130 TRY 2009 2131 { 2010 2132 this->vDomainGroup_ = newVDomainGroup; 2011 2133 } 2134 CATCH_DUMP_ATTR 2012 2135 2013 2136 //! Change virtual variable group to new one 2014 2137 void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup) 2138 TRY 2015 2139 { 2016 2140 this->vAxisGroup_ = newVAxisGroup; 2017 2141 } 2142 CATCH_DUMP_ATTR 2018 2143 2019 2144 //! Change virtual variable group to new one 2020 2145 void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup) 2146 TRY 2021 2147 { 2022 2148 this->vScalarGroup_ = newVScalarGroup; 2023 2149 } 2150 CATCH_DUMP_ATTR 2024 2151 2025 2152 /*! … … 2028 2155 */ 2029 2156 void CGrid::sendAddDomain(const string& id) 2030 { 2157 TRY 2158 { 2031 2159 sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN); 2032 2160 } 2161 CATCH_DUMP_ATTR 2033 2162 2034 2163 /*! … … 2037 2166 */ 2038 2167 void CGrid::sendAddAxis(const string& id) 2168 TRY 2039 2169 { 2040 2170 sendAddItem(id, (int)EVENT_ID_ADD_AXIS); 2041 2171 } 2172 CATCH_DUMP_ATTR 2042 2173 2043 2174 /*! … … 2046 2177 */ 2047 2178 void CGrid::sendAddScalar(const string& id) 2179 TRY 2048 2180 { 2049 2181 sendAddItem(id, (int)EVENT_ID_ADD_SCALAR); 2050 2182 } 2183 CATCH_DUMP_ATTR 2051 2184 2052 2185 /*! … … 2055 2188 */ 2056 2189 void CGrid::recvAddDomain(CEventServer& event) 2190 TRY 2057 2191 { 2058 2192 … … 2062 2196 get(id)->recvAddDomain(*buffer); 2063 2197 } 2198 CATCH 2064 2199 2065 2200 /*! … … 2068 2203 */ 2069 2204 void CGrid::recvAddDomain(CBufferIn& buffer) 2205 TRY 2070 2206 { 2071 2207 string id; … … 2073 2209 addDomain(id); 2074 2210 } 2211 CATCH_DUMP_ATTR 2075 2212 2076 2213 /*! … … 2079 2216 */ 2080 2217 void CGrid::recvAddAxis(CEventServer& event) 2218 TRY 2081 2219 { 2082 2220 … … 2086 2224 get(id)->recvAddAxis(*buffer); 2087 2225 } 2226 CATCH 2088 2227 2089 2228 /*! … … 2092 2231 */ 2093 2232 void CGrid::recvAddAxis(CBufferIn& buffer) 2233 TRY 2094 2234 { 2095 2235 string id; … … 2097 2237 addAxis(id); 2098 2238 } 2239 CATCH_DUMP_ATTR 2099 2240 2100 2241 /*! … … 2103 2244 */ 2104 2245 void CGrid::recvAddScalar(CEventServer& event) 2246 TRY 2105 2247 { 2106 2248 … … 2110 2252 get(id)->recvAddScalar(*buffer); 2111 2253 } 2254 CATCH 2112 2255 2113 2256 /*! … … 2116 2259 */ 2117 2260 void CGrid::recvAddScalar(CBufferIn& buffer) 2261 TRY 2118 2262 { 2119 2263 string id; … … 2121 2265 addScalar(id); 2122 2266 } 2267 CATCH_DUMP_ATTR 2123 2268 2124 2269 /*! … … 2129 2274 */ 2130 2275 void CGrid::solveDomainAxisRefInheritance(bool apply) 2276 TRY 2131 2277 { 2132 2278 CContext* context = CContext::getCurrent(); … … 2169 2315 } 2170 2316 } 2317 CATCH_DUMP_ATTR 2171 2318 2172 2319 bool CGrid::isTransformed() 2320 TRY 2173 2321 { 2174 2322 return isTransformed_; 2175 2323 } 2324 CATCH_DUMP_ATTR 2176 2325 2177 2326 void CGrid::setTransformed() 2327 TRY 2178 2328 { 2179 2329 isTransformed_ = true; 2180 2330 } 2331 CATCH_DUMP_ATTR 2181 2332 2182 2333 CGridTransformation* CGrid::getTransformations() 2334 TRY 2183 2335 { 2184 2336 return transformations_; 2185 2337 } 2338 CATCH_DUMP_ATTR 2186 2339 2187 2340 void CGrid::addTransGridSource(CGrid* gridSrc) 2341 TRY 2188 2342 { 2189 2343 if (gridSrc_.end() == gridSrc_.find(gridSrc)) 2190 2344 gridSrc_.insert(make_pair(gridSrc,make_pair(false,""))); 2191 2345 } 2346 CATCH_DUMP_ATTR 2192 2347 2193 2348 std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource() 2349 TRY 2194 2350 { 2195 2351 return gridSrc_; 2196 2352 } 2353 CATCH_DUMP_ATTR 2197 2354 2198 2355 /*! … … 2201 2358 */ 2202 2359 void CGrid::completeGrid(CGrid* transformGridSrc) 2360 TRY 2203 2361 { 2204 2362 if (0 != transformGridSrc) … … 2219 2377 gridGenerate.completeGrid(); 2220 2378 } 2379 CATCH_DUMP_ATTR 2221 2380 2222 2381 bool CGrid::isGenerated() 2382 TRY 2223 2383 { 2224 2384 return isGenerated_; 2225 2385 } 2386 CATCH 2226 2387 2227 2388 void CGrid::setGenerated() 2389 TRY 2228 2390 { 2229 2391 isGenerated_ = true; 2230 2392 } 2393 CATCH_DUMP_ATTR 2231 2394 2232 2395 void CGrid::transformGrid(CGrid* transformGridSrc) 2396 TRY 2233 2397 { 2234 2398 if (!transformGridSrc) … … 2256 2420 transformGridSrc->checkMaskIndex(false); 2257 2421 } 2422 CATCH_DUMP_ATTR 2258 2423 2259 2424 bool CGrid::hasTransform() 2425 TRY 2260 2426 { 2261 2427 if (hasTransform_) return hasTransform_; … … 2271 2437 return hasTransform_; 2272 2438 } 2439 CATCH_DUMP_ATTR 2273 2440 2274 2441 /*! … … 2277 2444 */ 2278 2445 std::vector<CDomain*> CGrid::getDomains() 2446 TRY 2279 2447 { 2280 2448 std::vector<CDomain*> domList; … … 2285 2453 return domList; 2286 2454 } 2455 CATCH_DUMP_ATTR 2287 2456 2288 2457 /*! … … 2291 2460 */ 2292 2461 std::vector<CAxis*> CGrid::getAxis() 2462 TRY 2293 2463 { 2294 2464 std::vector<CAxis*> aList; … … 2298 2468 return aList; 2299 2469 } 2470 CATCH_DUMP_ATTR 2300 2471 2301 2472 /*! … … 2304 2475 */ 2305 2476 std::vector<CScalar*> CGrid::getScalars() 2477 TRY 2306 2478 { 2307 2479 std::vector<CScalar*> sList; … … 2311 2483 return sList; 2312 2484 } 2485 CATCH_DUMP_ATTR 2313 2486 2314 2487 /*! … … 2317 2490 */ 2318 2491 CDomain* CGrid::getDomain(int domainIndex) 2492 TRY 2319 2493 { 2320 2494 std::vector<CDomain*> domainListP = this->getDomains(); … … 2334 2508 return domainListP[domainIndex]; 2335 2509 } 2510 CATCH_DUMP_ATTR 2336 2511 2337 2512 /*! … … 2340 2515 */ 2341 2516 CAxis* CGrid::getAxis(int axisIndex) 2517 TRY 2342 2518 { 2343 2519 std::vector<CAxis*> axisListP = this->getAxis(); … … 2357 2533 return axisListP[axisIndex]; 2358 2534 } 2535 CATCH_DUMP_ATTR 2359 2536 2360 2537 /*! … … 2363 2540 */ 2364 2541 CScalar* CGrid::getScalar(int scalarIndex) 2542 TRY 2365 2543 { 2366 2544 std::vector<CScalar*> scalarListP = this->getScalars(); … … 2380 2558 return scalarListP[scalarIndex]; 2381 2559 } 2560 CATCH_DUMP_ATTR 2382 2561 2383 2562 /*! … … 2386 2565 */ 2387 2566 void CGrid::setDomainList(const std::vector<CDomain*> domains) 2567 TRY 2388 2568 { 2389 2569 if (isDomListSet) return; … … 2406 2586 isDomListSet = true; 2407 2587 } 2408 2409 }2588 } 2589 CATCH_DUMP_ATTR 2410 2590 2411 2591 /*! … … 2414 2594 */ 2415 2595 void CGrid::setAxisList(const std::vector<CAxis*> axis) 2596 TRY 2416 2597 { 2417 2598 if (isAxisListSet) return; … … 2435 2616 } 2436 2617 } 2618 CATCH_DUMP_ATTR 2437 2619 2438 2620 /*! … … 2441 2623 */ 2442 2624 void CGrid::setScalarList(const std::vector<CScalar*> scalars) 2625 TRY 2443 2626 { 2444 2627 if (isScalarListSet) return; … … 2462 2645 } 2463 2646 } 2647 CATCH_DUMP_ATTR 2464 2648 2465 2649 /*! … … 2468 2652 */ 2469 2653 std::vector<StdString> CGrid::getDomainList() 2654 TRY 2470 2655 { 2471 2656 setDomainList(); 2472 2657 return domList_; 2473 2658 } 2659 CATCH 2474 2660 2475 2661 /*! … … 2478 2664 */ 2479 2665 std::vector<StdString> CGrid::getAxisList() 2666 TRY 2480 2667 { 2481 2668 setAxisList(); 2482 2669 return axisList_; 2483 2670 } 2671 CATCH 2484 2672 2485 2673 /*! … … 2488 2676 */ 2489 2677 std::vector<StdString> CGrid::getScalarList() 2678 TRY 2490 2679 { 2491 2680 setScalarList(); 2492 2681 return scalarList_; 2493 2682 } 2683 CATCH 2494 2684 2495 2685 /*! … … 2497 2687 */ 2498 2688 void CGrid::sendAllDomains() 2689 TRY 2499 2690 { 2500 2691 std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); … … 2506 2697 } 2507 2698 } 2699 CATCH_DUMP_ATTR 2508 2700 2509 2701 /*! … … 2511 2703 */ 2512 2704 void CGrid::sendAllAxis() 2705 TRY 2513 2706 { 2514 2707 std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); … … 2521 2714 } 2522 2715 } 2716 CATCH_DUMP_ATTR 2523 2717 2524 2718 /*! … … 2526 2720 */ 2527 2721 void CGrid::sendAllScalars() 2722 TRY 2528 2723 { 2529 2724 std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); … … 2536 2731 } 2537 2732 } 2733 CATCH_DUMP_ATTR 2538 2734 2539 2735 void CGrid::setContextClient(CContextClient* contextClient) 2736 TRY 2540 2737 { 2541 2738 if (clientsSet.find(contextClient)==clientsSet.end()) … … 2549 2746 this->getAxis()[i]->setContextClient(contextClient); 2550 2747 } 2748 CATCH_DUMP_ATTR 2551 2749 2552 2750 /*! … … 2554 2752 */ 2555 2753 void CGrid::parse(xml::CXMLNode& node) 2754 TRY 2556 2755 { 2557 2756 SuperClass::parse(node); … … 2594 2793 setScalarList(); 2595 2794 } 2795 CATCH_DUMP_ATTR 2796 2596 2797 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.