Ignore:
Timestamp:
12/11/18 13:22:07 (5 years ago)
Author:
oabramkina
Message:

Exception handling on trunk.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/grid.cpp

    r1562 r1622  
    8282 
    8383   StdSize CGrid::getDimension(void) 
     84   TRY 
    8485   { 
    8586      return getGlobalDimension().size(); 
    8687   } 
     88   CATCH_DUMP_ATTR 
    8789 
    8890   //--------------------------------------------------------------- 
    8991 
    9092   StdSize CGrid::getDataSize(void) const 
     93   TRY 
    9194   { 
    9295     StdSize retvalue = 1; 
     
    98101     return retvalue; 
    99102   } 
     103   CATCH 
    100104 
    101105   /*! 
     
    106110    */ 
    107111   std::map<int, StdSize> CGrid::getAttributesBufferSize(CContextClient* client, bool bufferForWriting) 
     112   TRY 
    108113   { 
    109114     std::map<int, StdSize> attributesSizes = getMinimumBufferSizeForAttributes(client); 
     
    147152     return attributesSizes; 
    148153  } 
     154   CATCH_DUMP_ATTR 
    149155 
    150156   /*! 
     
    156162    */ 
    157163   std::map<int, StdSize> CGrid::getDataBufferSize(CContextClient* client, const std::string& id /*= ""*/, bool bufferForWriting /*= "false"*/) 
     164   TRY 
    158165   {      
    159166     // The record index is sometimes sent along with the data but we always 
     
    180187     return dataSizes; 
    181188   } 
     189   CATCH_DUMP_ATTR 
    182190 
    183191   size_t CGrid::getGlobalWrittenSize(void) 
     192   TRY 
    184193   { 
    185194         std::vector<CDomain*> domainP = this->getDomains(); 
     
    191200     return globalGridSize ; 
    192201   } 
    193     
     202   CATCH_DUMP_ATTR 
    194203    
    195204   void CGrid::checkAttributesAfterTransformation() 
     205   TRY 
    196206   { 
    197207      setAxisList(); 
     
    228238      } 
    229239   } 
     240   CATCH_DUMP_ATTR 
    230241 
    231242   //--------------------------------------------------------------- 
     
    237248    */ 
    238249   bool CGrid::isCompressible(void) const 
     250   TRY 
    239251   { 
    240252      return isCompressible_; 
    241253   } 
     254   CATCH 
    242255 
    243256   //--------------------------------------------------------------- 
    244257 
    245258   void CGrid::addRelFileCompressed(const StdString& filename) 
     259   TRY 
    246260   { 
    247261      this->relFilesCompressed.insert(filename); 
    248262   } 
     263   CATCH_DUMP_ATTR 
    249264 
    250265   bool CGrid::isWrittenCompressed(const StdString& filename) const 
     266   TRY 
    251267   { 
    252268      return (this->relFilesCompressed.find(filename) != this->relFilesCompressed.end()); 
    253269   } 
     270   CATCH 
    254271 
    255272   //--------------------------------------------------------------- 
     
    258275   */ 
    259276   void CGrid::solveDomainAxisRef(bool areAttributesChecked) 
     277   TRY 
    260278   { 
    261279     if (this->isDomainAxisChecked) return; 
     
    266284     this->isDomainAxisChecked = areAttributesChecked; 
    267285   } 
     286   CATCH_DUMP_ATTR 
    268287 
    269288   /* 
     
    272291   */ 
    273292   void CGrid::solveDomainAxisBaseRef() 
     293   TRY 
    274294   { 
    275295     if (this->hasDomainAxisBaseRef_) return; 
     
    297317     this->hasDomainAxisBaseRef_ = true; 
    298318   } 
     319   CATCH_DUMP_ATTR 
    299320 
    300321   void CGrid::checkEligibilityForCompressedOutput() 
     322   TRY 
    301323   { 
    302324     // We don't check if the mask is valid here, just if a mask has been defined at this point. 
    303325     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty(); 
    304326   } 
     327   CATCH_DUMP_ATTR 
    305328 
    306329   void CGrid::checkMaskIndex(bool doSendingIndex) 
     330   TRY 
    307331   { 
    308332     CContext* context = CContext::getCurrent(); 
     
    339363      this->isChecked = true; 
    340364   } 
     365   CATCH_DUMP_ATTR 
    341366 
    342367   /* 
     
    344369   */ 
    345370   void CGrid::createMask(void) 
     371   TRY 
    346372   { 
    347373      using namespace std; 
     
    381407      } 
    382408   } 
     409   CATCH_DUMP_ATTR 
    383410 
    384411   /* 
     
    386413   */ 
    387414   void CGrid::checkMask(void) 
     415   TRY 
    388416   { 
    389417      using namespace std; 
     
    423451      } 
    424452   } 
    425  
     453   CATCH_DUMP_ATTR 
    426454 
    427455/*! 
     
    433461 
    434462  void CGrid::getLocalMask(CArray<bool,1>& localMask) 
     463  TRY 
    435464  { 
    436465      std::vector<CDomain*> domainP = this->getDomains(); 
     
    468497      } 
    469498  } 
     499  CATCH_DUMP_ATTR 
    470500       
    471501   /* 
     
    476506   */ 
    477507   void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue) 
     508   TRY 
    478509   { 
    479510      using namespace std; 
     
    511542      } 
    512543   } 
     544   CATCH_DUMP_ATTR 
    513545 
    514546   /* 
     
    518550   */ 
    519551   void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue) 
     552   TRY 
    520553   {       
    521554      std::vector<CDomain*> domainP = this->getDomains(); 
     
    552585      } 
    553586   } 
     587   CATCH_DUMP_ATTR 
    554588 
    555589   //--------------------------------------------------------------- 
    556590 
    557591   void CGrid::solveDomainRef(bool sendAtt) 
     592   TRY 
    558593   { 
    559594      setDomainList(); 
     
    568603      } 
    569604   } 
     605   CATCH_DUMP_ATTR 
    570606 
    571607   //--------------------------------------------------------------- 
    572608 
    573609   void CGrid::solveAxisRef(bool sendAtt) 
     610   TRY 
    574611   { 
    575612      setAxisList(); 
     
    599636      } 
    600637   } 
     638   CATCH_DUMP_ATTR 
    601639 
    602640   //--------------------------------------------------------------- 
    603641 
    604642   void CGrid::solveScalarRef(bool sendAtt) 
     643   TRY 
    605644   { 
    606645      setScalarList(); 
     
    616655      } 
    617656   } 
     657   CATCH_DUMP_ATTR 
    618658 
    619659   /*! 
     
    621661   */ 
    622662   void CGrid::computeWrittenIndex() 
     663   TRY 
    623664   {       
    624665      if (computedWrittenIndex_) return; 
     
    680721      } 
    681722   } 
     723   CATCH_DUMP_ATTR 
    682724 
    683725   //--------------------------------------------------------------- 
     
    690732   */ 
    691733   void CGrid::computeClientIndex() 
     734   TRY 
    692735   { 
    693736     CContext* context = CContext::getCurrent(); 
     
    746789      } 
    747790   } 
     791   CATCH_DUMP_ATTR 
    748792 
    749793   /*! 
     
    751795   */ 
    752796   void CGrid::computeConnectedClients() 
     797   TRY 
    753798   { 
    754799     CContext* context = CContext::getCurrent(); 
     
    844889     } 
    845890   } 
     891   CATCH_DUMP_ATTR 
    846892 
    847893   /*! 
     
    853899   */ 
    854900   void CGrid::computeIndex(void) 
     901   TRY 
    855902   { 
    856903     CContext* context = CContext::getCurrent(); 
     
    879926     } 
    880927   } 
     928   CATCH_DUMP_ATTR 
    881929 
    882930   /*! 
     
    892940                                     const CContextClient* client, 
    893941                                     CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 
     942   TRY 
    894943   { 
    895944     int serverSize = client->serverSize; 
     
    10581107    } 
    10591108   } 
    1060    //---------------------------------------------------------------- 
     1109   CATCH_DUMP_ATTR 
     1110//---------------------------------------------------------------- 
    10611111 
    10621112   CGrid* CGrid::createGrid(CDomain* domain) 
     1113   TRY 
    10631114   { 
    10641115      std::vector<CDomain*> vecDom(1, domain); 
     
    10671118      return createGrid(vecDom, vecAxis); 
    10681119   } 
     1120   CATCH 
    10691121 
    10701122   CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 
    1071    { 
     1123   TRY 
     1124  { 
    10721125      std::vector<CDomain*> vecDom(1, domain); 
    10731126      std::vector<CAxis*> vecAxis(1, axis); 
     
    10751128      return createGrid(vecDom, vecAxis); 
    10761129   } 
     1130   CATCH 
    10771131 
    10781132   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10791133                            const CArray<int,1>& axisDomainOrder) 
     1134   TRY 
    10801135   { 
    10811136     std::vector<CScalar*> vecScalar; 
    10821137     return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder); 
    10831138   } 
     1139   CATCH 
    10841140 
    10851141   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10861142                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1143   TRY 
    10871144   { 
    10881145     return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder); 
    10891146   } 
     1147   CATCH 
    10901148 
    10911149   CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10921150                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1151   TRY 
    10931152   { 
    10941153      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    11321191      return grid; 
    11331192   } 
     1193   CATCH 
    11341194 
    11351195   CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc) 
     1196   TRY 
    11361197   { 
    11371198     std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc; 
     
    11731234      return grid; 
    11741235   } 
     1236   CATCH 
    11751237 
    11761238   StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    11771239                               const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1240   TRY 
    11781241   { 
    11791242      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    12161279      return id.str(); 
    12171280   } 
     1281   CATCH 
    12181282 
    12191283   StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest) 
     1284   TRY 
    12201285   { 
    12211286     StdString idSrc  = gridSrc->getId(); 
     
    12271292     return id.str(); 
    12281293   } 
     1294   CATCH 
    12291295 
    12301296   //---------------------------------------------------------------- 
    12311297 
    12321298   CDomainGroup* CGrid::getVirtualDomainGroup() const 
     1299   TRY 
    12331300   { 
    12341301     return this->vDomainGroup_; 
    12351302   } 
     1303   CATCH 
    12361304 
    12371305   CAxisGroup* CGrid::getVirtualAxisGroup() const 
     1306   TRY 
    12381307   { 
    12391308     return this->vAxisGroup_; 
    12401309   } 
     1310   CATCH 
    12411311 
    12421312   CScalarGroup* CGrid::getVirtualScalarGroup() const 
     1313   TRY 
    12431314   { 
    12441315     return this->vScalarGroup_; 
    12451316   } 
     1317   CATCH 
    12461318 
    12471319/* 
     
    12791351 
    12801352   void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const 
     1353   TRY 
    12811354   { 
    12821355      const StdSize size = storeIndex_client.numElements(); 
     
    12851358      for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)]; 
    12861359   } 
     1360   CATCH 
    12871361 
    12881362   void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const 
     1363   TRY 
    12891364   { 
    12901365      const StdSize size = storeIndex_client.numElements(); 
     
    12921367      for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i); 
    12931368   } 
     1369   CATCH 
    12941370 
    12951371   void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const 
     1372   TRY 
    12961373   { 
    12971374      const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient(); 
     
    12991376      for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i]; 
    13001377   } 
    1301  
     1378   CATCH 
    13021379 
    13031380  void CGrid::computeClientIndexScalarGrid() 
     1381  TRY 
    13041382  { 
    13051383    CContext* context = CContext::getCurrent();     
     
    13351413    } 
    13361414  } 
     1415  CATCH_DUMP_ATTR 
    13371416 
    13381417  void CGrid::computeConnectedClientsScalarGrid() 
     1418  TRY 
    13391419  { 
    13401420    CContext* context = CContext::getCurrent();     
     
    13811461    } 
    13821462  } 
     1463  CATCH_DUMP_ATTR 
    13831464 
    13841465  void CGrid::sendIndexScalarGrid() 
     1466  TRY 
    13851467  { 
    13861468    CContext* context = CContext::getCurrent(); 
     
    14461528    } 
    14471529  } 
     1530  CATCH_DUMP_ATTR 
    14481531 
    14491532  void CGrid::sendIndex(void) 
     1533  TRY 
    14501534  { 
    14511535    CContext* context = CContext::getCurrent(); 
     
    15671651    } 
    15681652  } 
     1653  CATCH_DUMP_ATTR 
    15691654 
    15701655  void CGrid::recvIndex(CEventServer& event) 
     1656  TRY 
    15711657  { 
    15721658    string gridId; 
     
    15841670    get(gridId)->recvIndex(ranks, buffers); 
    15851671  } 
     1672  CATCH 
    15861673 
    15871674  void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers) 
     1675  TRY 
    15881676  { 
    15891677    CContext* context = CContext::getCurrent(); 
     
    17911879    } 
    17921880  } 
     1881  CATCH_DUMP_ATTR 
    17931882 
    17941883  /* 
     
    18061895                                        const std::vector<CScalar*> scalars, 
    18071896                                        const CArray<int,1>& axisDomainOrder) 
    1808   { 
     1897  TRY 
     1898 { 
    18091899 //   globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 
    18101900    globalDim.resize(domains.size()*2+axis.size()); 
     
    18461936    return positionDimensionDistributed; 
    18471937  } 
     1938  CATCH_DUMP_ATTR 
    18481939 
    18491940  // Retrieve the global dimension of grid 
    18501941  std::vector<int> CGrid::getGlobalDimension() 
     1942  TRY 
    18511943  { 
    18521944    std::vector<int> globalDim; 
     
    18551947    return globalDim; 
    18561948  } 
     1949  CATCH_DUMP_ATTR 
    18571950 
    18581951  // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension) 
    18591952  int CGrid::getDistributedDimension() 
     1953  TRY 
    18601954  { 
    18611955    std::vector<int> globalDim; 
    18621956    return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order);     
    18631957  } 
     1958  CATCH_DUMP_ATTR 
    18641959 
    18651960  bool CGrid::isScalarGrid() const 
     1961  TRY 
    18661962  { 
    18671963    return (axisList_.empty() && domList_.empty()); 
    18681964  } 
     1965  CATCH 
    18691966 
    18701967  /*! 
     
    18741971  */ 
    18751972  bool CGrid::doGridHaveDataToWrite() 
     1973  TRY 
    18761974  { 
    18771975     return (0 != writtenDataSize_); 
    18781976  } 
     1977  CATCH_DUMP_ATTR 
    18791978 
    18801979  /*! 
     
    18851984  */ 
    18861985  size_t CGrid::getWrittenDataSize() const 
     1986  TRY 
    18871987  { 
    18881988    return writtenDataSize_; 
    18891989  } 
     1990  CATCH 
    18901991 
    18911992  /*! 
     
    18941995  */ 
    18951996  int CGrid::getNumberWrittenIndexes() const 
     1997  TRY 
    18961998  { 
    18971999    return numberWrittenIndexes_; 
    18982000  } 
     2001  CATCH 
    18992002 
    19002003  /*! 
     
    19032006  */ 
    19042007  int CGrid::getTotalNumberWrittenIndexes() const 
     2008  TRY 
    19052009  { 
    19062010    return totalNumberWrittenIndexes_; 
    19072011  } 
     2012  CATCH 
    19082013 
    19092014  /*! 
     
    19122017  */ 
    19132018  int CGrid::getOffsetWrittenIndexes() const 
     2019  TRY 
    19142020  { 
    19152021    return offsetWrittenIndexes_; 
    19162022  } 
     2023  CATCH 
    19172024 
    19182025  CDistributionServer* CGrid::getDistributionServer() 
     2026  TRY 
    19192027  { 
    19202028    return serverDistribution_; 
    19212029  } 
     2030  CATCH_DUMP_ATTR 
    19222031 
    19232032  CDistributionClient* CGrid::getDistributionClient() 
     2033  TRY 
    19242034  { 
    19252035    return clientDistribution_; 
    19262036  } 
     2037  CATCH_DUMP_ATTR 
    19272038 
    19282039  bool CGrid::doGridHaveDataDistributed(CContextClient* client) 
     2040  TRY 
    19292041  { 
    19302042    if (isScalarGrid()) return false; 
     
    19362048      return isDataDistributed_;     
    19372049  } 
     2050  CATCH_DUMP_ATTR 
    19382051 
    19392052   /*! 
     
    19452058   */ 
    19462059  bool CGrid::dispatchEvent(CEventServer& event) 
     2060  TRY 
    19472061  { 
    19482062 
     
    19782092    } 
    19792093  } 
     2094  CATCH 
    19802095 
    19812096   ///--------------------------------------------------------------- 
    19822097 
    19832098   CDomain* CGrid::addDomain(const std::string& id) 
     2099   TRY 
    19842100   { 
    19852101     order_.push_back(2); 
     
    19882104     return vDomainGroup_->createChild(id); 
    19892105   } 
     2106   CATCH_DUMP_ATTR 
    19902107 
    19912108   CAxis* CGrid::addAxis(const std::string& id) 
     2109   TRY 
    19922110   { 
    19932111     order_.push_back(1); 
     
    19962114     return vAxisGroup_->createChild(id); 
    19972115   } 
     2116   CATCH_DUMP_ATTR 
    19982117 
    19992118   CScalar* CGrid::addScalar(const std::string& id) 
     2119   TRY 
    20002120   { 
    20012121     order_.push_back(0); 
     
    20042124     return vScalarGroup_->createChild(id); 
    20052125   } 
     2126   CATCH_DUMP_ATTR 
    20062127 
    20072128   //! Change virtual field group to a new one 
    20082129   void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup) 
     2130   TRY 
    20092131   { 
    20102132      this->vDomainGroup_ = newVDomainGroup; 
    20112133   } 
     2134   CATCH_DUMP_ATTR 
    20122135 
    20132136   //! Change virtual variable group to new one 
    20142137   void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup) 
     2138   TRY 
    20152139   { 
    20162140      this->vAxisGroup_ = newVAxisGroup; 
    20172141   } 
     2142   CATCH_DUMP_ATTR 
    20182143 
    20192144   //! Change virtual variable group to new one 
    20202145   void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup) 
     2146   TRY 
    20212147   { 
    20222148      this->vScalarGroup_ = newVScalarGroup; 
    20232149   } 
     2150   CATCH_DUMP_ATTR 
    20242151 
    20252152   /*! 
     
    20282155   */ 
    20292156   void CGrid::sendAddDomain(const string& id) 
    2030    { 
     2157   TRY 
     2158  { 
    20312159      sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN); 
    20322160   } 
     2161   CATCH_DUMP_ATTR 
    20332162 
    20342163   /*! 
     
    20372166   */ 
    20382167   void CGrid::sendAddAxis(const string& id) 
     2168   TRY 
    20392169   { 
    20402170      sendAddItem(id, (int)EVENT_ID_ADD_AXIS); 
    20412171   } 
     2172   CATCH_DUMP_ATTR 
    20422173 
    20432174   /*! 
     
    20462177   */ 
    20472178   void CGrid::sendAddScalar(const string& id) 
     2179   TRY 
    20482180   { 
    20492181      sendAddItem(id, (int)EVENT_ID_ADD_SCALAR); 
    20502182   } 
     2183   CATCH_DUMP_ATTR 
    20512184 
    20522185   /*! 
     
    20552188   */ 
    20562189   void CGrid::recvAddDomain(CEventServer& event) 
     2190   TRY 
    20572191   { 
    20582192 
     
    20622196      get(id)->recvAddDomain(*buffer); 
    20632197   } 
     2198   CATCH 
    20642199 
    20652200   /*! 
     
    20682203   */ 
    20692204   void CGrid::recvAddDomain(CBufferIn& buffer) 
     2205   TRY 
    20702206   { 
    20712207      string id; 
     
    20732209      addDomain(id); 
    20742210   } 
     2211   CATCH_DUMP_ATTR 
    20752212 
    20762213   /*! 
     
    20792216   */ 
    20802217   void CGrid::recvAddAxis(CEventServer& event) 
     2218   TRY 
    20812219   { 
    20822220 
     
    20862224      get(id)->recvAddAxis(*buffer); 
    20872225   } 
     2226   CATCH 
    20882227 
    20892228   /*! 
     
    20922231   */ 
    20932232   void CGrid::recvAddAxis(CBufferIn& buffer) 
     2233   TRY 
    20942234   { 
    20952235      string id; 
     
    20972237      addAxis(id); 
    20982238   } 
     2239   CATCH_DUMP_ATTR 
    20992240 
    21002241   /*! 
     
    21032244   */ 
    21042245   void CGrid::recvAddScalar(CEventServer& event) 
     2246   TRY 
    21052247   { 
    21062248 
     
    21102252      get(id)->recvAddScalar(*buffer); 
    21112253   } 
     2254   CATCH 
    21122255 
    21132256   /*! 
     
    21162259   */ 
    21172260   void CGrid::recvAddScalar(CBufferIn& buffer) 
     2261   TRY 
    21182262   { 
    21192263      string id; 
     
    21212265      addScalar(id); 
    21222266   } 
     2267   CATCH_DUMP_ATTR 
    21232268 
    21242269  /*! 
     
    21292274  */ 
    21302275  void CGrid::solveDomainAxisRefInheritance(bool apply) 
     2276  TRY 
    21312277  { 
    21322278    CContext* context = CContext::getCurrent(); 
     
    21692315    } 
    21702316  } 
     2317  CATCH_DUMP_ATTR 
    21712318 
    21722319  bool CGrid::isTransformed() 
     2320  TRY 
    21732321  { 
    21742322    return isTransformed_; 
    21752323  } 
     2324  CATCH_DUMP_ATTR 
    21762325 
    21772326  void CGrid::setTransformed() 
     2327  TRY 
    21782328  { 
    21792329    isTransformed_ = true; 
    21802330  } 
     2331  CATCH_DUMP_ATTR 
    21812332 
    21822333  CGridTransformation* CGrid::getTransformations() 
     2334  TRY 
    21832335  { 
    21842336    return transformations_; 
    21852337  } 
     2338  CATCH_DUMP_ATTR 
    21862339 
    21872340  void CGrid::addTransGridSource(CGrid* gridSrc) 
     2341  TRY 
    21882342  { 
    21892343    if (gridSrc_.end() == gridSrc_.find(gridSrc)) 
    21902344      gridSrc_.insert(make_pair(gridSrc,make_pair(false,""))); 
    21912345  } 
     2346  CATCH_DUMP_ATTR 
    21922347 
    21932348  std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource() 
     2349  TRY 
    21942350  { 
    21952351    return gridSrc_; 
    21962352  } 
     2353  CATCH_DUMP_ATTR 
    21972354 
    21982355  /*! 
     
    22012358  */ 
    22022359  void CGrid::completeGrid(CGrid* transformGridSrc) 
     2360  TRY 
    22032361  { 
    22042362    if (0 != transformGridSrc) 
     
    22192377    gridGenerate.completeGrid(); 
    22202378  } 
     2379  CATCH_DUMP_ATTR 
    22212380 
    22222381  bool CGrid::isGenerated() 
     2382  TRY 
    22232383  { 
    22242384    return isGenerated_; 
    22252385  } 
     2386  CATCH 
    22262387 
    22272388  void CGrid::setGenerated() 
     2389  TRY 
    22282390  { 
    22292391    isGenerated_ = true; 
    22302392  } 
     2393  CATCH_DUMP_ATTR 
    22312394 
    22322395  void CGrid::transformGrid(CGrid* transformGridSrc) 
     2396  TRY 
    22332397  { 
    22342398    if (!transformGridSrc) 
     
    22562420    transformGridSrc->checkMaskIndex(false); 
    22572421  } 
     2422  CATCH_DUMP_ATTR 
    22582423 
    22592424  bool CGrid::hasTransform() 
     2425  TRY 
    22602426  { 
    22612427    if (hasTransform_) return hasTransform_; 
     
    22712437    return hasTransform_; 
    22722438  } 
     2439  CATCH_DUMP_ATTR 
    22732440 
    22742441  /*! 
     
    22772444  */ 
    22782445  std::vector<CDomain*> CGrid::getDomains() 
     2446  TRY 
    22792447  { 
    22802448    std::vector<CDomain*> domList; 
     
    22852453    return domList; 
    22862454  } 
     2455  CATCH_DUMP_ATTR 
    22872456 
    22882457  /*! 
     
    22912460  */ 
    22922461  std::vector<CAxis*> CGrid::getAxis() 
     2462  TRY 
    22932463  { 
    22942464    std::vector<CAxis*> aList; 
     
    22982468    return aList; 
    22992469  } 
     2470  CATCH_DUMP_ATTR 
    23002471 
    23012472  /*! 
     
    23042475  */ 
    23052476  std::vector<CScalar*> CGrid::getScalars() 
     2477  TRY 
    23062478  { 
    23072479    std::vector<CScalar*> sList; 
     
    23112483    return sList; 
    23122484  } 
     2485  CATCH_DUMP_ATTR 
    23132486 
    23142487  /*! 
     
    23172490  */ 
    23182491  CDomain* CGrid::getDomain(int domainIndex) 
     2492  TRY 
    23192493  { 
    23202494    std::vector<CDomain*> domainListP = this->getDomains(); 
     
    23342508    return domainListP[domainIndex]; 
    23352509  } 
     2510  CATCH_DUMP_ATTR 
    23362511 
    23372512  /*! 
     
    23402515  */ 
    23412516  CAxis* CGrid::getAxis(int axisIndex) 
     2517  TRY 
    23422518  { 
    23432519    std::vector<CAxis*> axisListP = this->getAxis(); 
     
    23572533    return axisListP[axisIndex]; 
    23582534  } 
     2535  CATCH_DUMP_ATTR 
    23592536 
    23602537  /*! 
     
    23632540  */ 
    23642541  CScalar* CGrid::getScalar(int scalarIndex) 
     2542  TRY 
    23652543  { 
    23662544    std::vector<CScalar*> scalarListP = this->getScalars(); 
     
    23802558    return scalarListP[scalarIndex]; 
    23812559  } 
     2560  CATCH_DUMP_ATTR 
    23822561 
    23832562  /*! 
     
    23862565  */ 
    23872566  void CGrid::setDomainList(const std::vector<CDomain*> domains) 
     2567  TRY 
    23882568  { 
    23892569    if (isDomListSet) return; 
     
    24062586      isDomListSet = true; 
    24072587    } 
    2408  
    2409   } 
     2588  } 
     2589  CATCH_DUMP_ATTR 
    24102590 
    24112591  /*! 
     
    24142594  */ 
    24152595  void CGrid::setAxisList(const std::vector<CAxis*> axis) 
     2596  TRY 
    24162597  { 
    24172598    if (isAxisListSet) return; 
     
    24352616    } 
    24362617  } 
     2618  CATCH_DUMP_ATTR 
    24372619 
    24382620  /*! 
     
    24412623  */ 
    24422624  void CGrid::setScalarList(const std::vector<CScalar*> scalars) 
     2625  TRY 
    24432626  { 
    24442627    if (isScalarListSet) return; 
     
    24622645    } 
    24632646  } 
     2647  CATCH_DUMP_ATTR 
    24642648 
    24652649  /*! 
     
    24682652  */ 
    24692653  std::vector<StdString> CGrid::getDomainList() 
     2654  TRY 
    24702655  { 
    24712656    setDomainList(); 
    24722657    return domList_; 
    24732658  } 
     2659  CATCH 
    24742660 
    24752661  /*! 
     
    24782664  */ 
    24792665  std::vector<StdString> CGrid::getAxisList() 
     2666  TRY 
    24802667  { 
    24812668    setAxisList(); 
    24822669    return axisList_; 
    24832670  } 
     2671  CATCH 
    24842672 
    24852673  /*! 
     
    24882676  */ 
    24892677  std::vector<StdString> CGrid::getScalarList() 
     2678  TRY 
    24902679  { 
    24912680    setScalarList(); 
    24922681    return scalarList_; 
    24932682  } 
     2683  CATCH 
    24942684 
    24952685  /*! 
     
    24972687  */ 
    24982688  void CGrid::sendAllDomains() 
     2689  TRY 
    24992690  { 
    25002691    std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); 
     
    25062697    } 
    25072698  } 
     2699  CATCH_DUMP_ATTR 
    25082700 
    25092701  /*! 
     
    25112703  */ 
    25122704  void CGrid::sendAllAxis() 
     2705  TRY 
    25132706  { 
    25142707    std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); 
     
    25212714    } 
    25222715  } 
     2716  CATCH_DUMP_ATTR 
    25232717 
    25242718  /*! 
     
    25262720  */ 
    25272721  void CGrid::sendAllScalars() 
     2722  TRY 
    25282723  { 
    25292724    std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); 
     
    25362731    } 
    25372732  } 
     2733  CATCH_DUMP_ATTR 
    25382734 
    25392735  void CGrid::setContextClient(CContextClient* contextClient) 
     2736  TRY 
    25402737  { 
    25412738    if (clientsSet.find(contextClient)==clientsSet.end()) 
     
    25492746        this->getAxis()[i]->setContextClient(contextClient); 
    25502747  } 
     2748  CATCH_DUMP_ATTR 
    25512749 
    25522750  /*! 
     
    25542752  */ 
    25552753  void CGrid::parse(xml::CXMLNode& node) 
     2754  TRY 
    25562755  { 
    25572756    SuperClass::parse(node); 
     
    25942793    setScalarList(); 
    25952794   } 
     2795  CATCH_DUMP_ATTR 
     2796 
    25962797} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.