Ignore:
Timestamp:
11/23/18 14:48:14 (5 years ago)
Author:
oabramkina
Message:

Dev: adding exception handling.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/grid.cpp

    r1594 r1612  
    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   } 
    341  
     365   CATCH_DUMP_ATTR 
    342366   bool CGrid::hasMask() const 
     367   TRY 
    343368   { 
    344369     return (!mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty() || 
    345370             !mask_4d.isEmpty() || !mask_5d.isEmpty() || !mask_6d.isEmpty() || !mask_7d.isEmpty()); 
    346371   } 
     372   CATCH 
    347373 
    348374   /* 
     
    350376   */ 
    351377   void CGrid::createMask(void) 
     378   TRY 
    352379   { 
    353380      using namespace std; 
     
    387414      } 
    388415   } 
     416   CATCH_DUMP_ATTR 
    389417 
    390418   /* 
     
    392420   */ 
    393421   void CGrid::checkMask(void) 
     422   TRY 
    394423   { 
    395424      using namespace std; 
     
    429458      } 
    430459   } 
    431        
     460   CATCH_DUMP_ATTR 
     461 
    432462   /* 
    433463     Modify value of mask in a certain index 
     
    437467   */ 
    438468   void CGrid::modifyMask(const CArray<int,1>& indexToModify, bool modifyValue) 
     469   TRY 
    439470   { 
    440471      using namespace std; 
     
    472503      } 
    473504   } 
     505   CATCH_DUMP_ATTR 
    474506 
    475507   /* 
     
    479511   */ 
    480512   void CGrid::modifyMaskSize(const std::vector<int>& newDimensionSize, bool newValue) 
     513   TRY 
    481514   {       
    482515      std::vector<CDomain*> domainP = this->getDomains(); 
     
    513546      } 
    514547   } 
     548   CATCH_DUMP_ATTR 
    515549 
    516550   //--------------------------------------------------------------- 
    517551 
    518552   void CGrid::solveDomainRef(bool sendAtt) 
     553   TRY 
    519554   { 
    520555      setDomainList(); 
     
    529564      } 
    530565   } 
     566   CATCH_DUMP_ATTR 
    531567 
    532568   //--------------------------------------------------------------- 
    533569 
    534570   void CGrid::solveAxisRef(bool sendAtt) 
     571   TRY 
    535572   { 
    536573      setAxisList(); 
     
    560597      } 
    561598   } 
     599   CATCH_DUMP_ATTR 
    562600 
    563601   //--------------------------------------------------------------- 
    564602 
    565603   void CGrid::solveScalarRef(bool sendAtt) 
     604   TRY 
    566605   { 
    567606      setScalarList(); 
     
    577616      } 
    578617   } 
     618   CATCH_DUMP_ATTR 
    579619 
    580620   /*! 
     
    582622   */ 
    583623   void CGrid::computeWrittenIndex() 
     624   TRY 
    584625   {       
    585626      if (computedWrittenIndex_) return; 
     
    641682      } 
    642683   } 
     684   CATCH_DUMP_ATTR 
    643685 
    644686   //--------------------------------------------------------------- 
     
    651693   */ 
    652694   void CGrid::computeClientIndex() 
     695   TRY 
    653696   { 
    654697     CContext* context = CContext::getCurrent(); 
     
    711754      } 
    712755   } 
     756   CATCH_DUMP_ATTR 
    713757 
    714758   /*! 
     
    716760   */ 
    717761   void CGrid::computeConnectedClients() 
     762   TRY 
    718763   { 
    719764     CContext* context = CContext::getCurrent(); 
     
    833878     } 
    834879   } 
     880   CATCH_DUMP_ATTR 
    835881 
    836882   /*! 
     
    842888   */ 
    843889   void CGrid::computeIndex(void) 
     890   TRY 
    844891   { 
    845892     CContext* context = CContext::getCurrent(); 
     
    868915     } 
    869916   } 
     917   CATCH_DUMP_ATTR 
    870918 
    871919   /*! 
     
    881929                                     const CContextClient* client, 
    882930                                     CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 
     931   TRY 
    883932   { 
    884933     int serverSize = client->serverSize; 
     
    10471096    } 
    10481097   } 
    1049    //---------------------------------------------------------------- 
     1098   CATCH_DUMP_ATTR 
     1099//---------------------------------------------------------------- 
    10501100 
    10511101   CGrid* CGrid::createGrid(CDomain* domain) 
     1102   TRY 
    10521103   { 
    10531104      std::vector<CDomain*> vecDom(1, domain); 
     
    10561107      return createGrid(vecDom, vecAxis); 
    10571108   } 
     1109   CATCH 
    10581110 
    10591111   CGrid* CGrid::createGrid(CDomain* domain, CAxis* axis) 
    1060    { 
     1112   TRY 
     1113  { 
    10611114      std::vector<CDomain*> vecDom(1, domain); 
    10621115      std::vector<CAxis*> vecAxis(1, axis); 
     
    10641117      return createGrid(vecDom, vecAxis); 
    10651118   } 
     1119   CATCH 
    10661120 
    10671121   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10681122                            const CArray<int,1>& axisDomainOrder) 
     1123   TRY 
    10691124   { 
    10701125     std::vector<CScalar*> vecScalar; 
    10711126     return createGrid(generateId(domains, axis, vecScalar, axisDomainOrder), domains, axis, vecScalar, axisDomainOrder); 
    10721127   } 
     1128   CATCH 
    10731129 
    10741130   CGrid* CGrid::createGrid(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10751131                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1132   TRY 
    10761133   { 
    10771134     return createGrid(generateId(domains, axis, scalars, axisDomainOrder), domains, axis, scalars, axisDomainOrder); 
    10781135   } 
     1136   CATCH 
    10791137 
    10801138   CGrid* CGrid::createGrid(StdString id, const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    10811139                            const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1140   TRY 
    10821141   { 
    10831142      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    11211180      return grid; 
    11221181   } 
     1182   CATCH 
    11231183 
    11241184   CGrid* CGrid::cloneGrid(const StdString& idNewGrid, CGrid* gridSrc) 
     1185   TRY 
    11251186   { 
    11261187     std::vector<CDomain*> domainSrcTmp = gridSrc->getDomains(), domainSrc; 
     
    11621223      return grid; 
    11631224   } 
     1225   CATCH 
    11641226 
    11651227   StdString CGrid::generateId(const std::vector<CDomain*>& domains, const std::vector<CAxis*>& axis, 
    11661228                               const std::vector<CScalar*>& scalars, const CArray<int,1>& axisDomainOrder) 
     1229   TRY 
    11671230   { 
    11681231      if (axisDomainOrder.numElements() > 0 && axisDomainOrder.numElements() != (domains.size() + axis.size() + scalars.size())) 
     
    12051268      return id.str(); 
    12061269   } 
     1270   CATCH 
    12071271 
    12081272   StdString CGrid::generateId(const CGrid* gridSrc, const CGrid* gridDest) 
     1273   TRY 
    12091274   { 
    12101275     StdString idSrc  = gridSrc->getId(); 
     
    12161281     return id.str(); 
    12171282   } 
     1283   CATCH 
    12181284 
    12191285   //---------------------------------------------------------------- 
    12201286 
    12211287   CDomainGroup* CGrid::getVirtualDomainGroup() const 
     1288   TRY 
    12221289   { 
    12231290     return this->vDomainGroup_; 
    12241291   } 
     1292   CATCH 
    12251293 
    12261294   CAxisGroup* CGrid::getVirtualAxisGroup() const 
     1295   TRY 
    12271296   { 
    12281297     return this->vAxisGroup_; 
    12291298   } 
     1299   CATCH 
    12301300 
    12311301   CScalarGroup* CGrid::getVirtualScalarGroup() const 
     1302   TRY 
    12321303   { 
    12331304     return this->vScalarGroup_; 
    12341305   } 
     1306   CATCH 
    12351307 
    12361308/* 
     
    12681340 
    12691341   void CGrid::storeField_arr(const double* const data, CArray<double, 1>& stored) const 
     1342   TRY 
    12701343   { 
    12711344      const StdSize size = storeIndex_client.numElements(); 
     
    12741347      for(StdSize i = 0; i < size; i++) stored(i) = data[storeIndex_client(i)]; 
    12751348   } 
     1349   CATCH 
    12761350 
    12771351   void CGrid::restoreField_arr(const CArray<double, 1>& stored, double* const data) const 
     1352   TRY 
    12781353   { 
    12791354      const StdSize size = storeIndex_client.numElements(); 
     
    12811356      for(StdSize i = 0; i < size; i++) data[storeIndex_client(i)] = stored(i); 
    12821357   } 
     1358   CATCH 
    12831359 
    12841360   void CGrid::maskField_arr(const double* const data, CArray<double, 1>& stored) const 
     
    12951371 
    12961372   void CGrid::uncompressField_arr(const double* const data, CArray<double, 1>& out) const 
     1373   TRY 
    12971374   { 
    12981375      const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient(); 
     
    13001377      for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i]; 
    13011378   } 
    1302  
     1379   CATCH 
    13031380 
    13041381  void CGrid::computeClientIndexScalarGrid() 
     1382  TRY 
    13051383  { 
    13061384    CContext* context = CContext::getCurrent();     
     
    13361414    } 
    13371415  } 
     1416  CATCH_DUMP_ATTR 
    13381417 
    13391418  void CGrid::computeConnectedClientsScalarGrid() 
     1419  TRY 
    13401420  { 
    13411421    CContext* context = CContext::getCurrent();     
     
    13821462    } 
    13831463  } 
     1464  CATCH_DUMP_ATTR 
    13841465 
    13851466  void CGrid::sendIndexScalarGrid() 
     1467  TRY 
    13861468  { 
    13871469    CContext* context = CContext::getCurrent(); 
     
    14471529    } 
    14481530  } 
     1531  CATCH_DUMP_ATTR 
    14491532 
    14501533  void CGrid::sendIndex(void) 
     1534  TRY 
    14511535  { 
    14521536    CContext* context = CContext::getCurrent(); 
     
    15681652    } 
    15691653  } 
     1654  CATCH_DUMP_ATTR 
    15701655 
    15711656  void CGrid::recvIndex(CEventServer& event) 
     1657  TRY 
    15721658  { 
    15731659    string gridId; 
     
    15851671    get(gridId)->recvIndex(ranks, buffers); 
    15861672  } 
     1673  CATCH 
    15871674 
    15881675  void CGrid::recvIndex(vector<int> ranks, vector<CBufferIn*> buffers) 
     1676  TRY 
    15891677  { 
    15901678    CContext* context = CContext::getCurrent(); 
     
    17561844    } 
    17571845  } 
     1846  CATCH_DUMP_ATTR 
    17581847 
    17591848  /* 
     
    17711860                                        const std::vector<CScalar*> scalars, 
    17721861                                        const CArray<int,1>& axisDomainOrder) 
    1773   { 
     1862  TRY 
     1863 { 
    17741864 //   globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 
    17751865    globalDim.resize(domains.size()*2+axis.size()); 
     
    18111901    return positionDimensionDistributed; 
    18121902  } 
     1903  CATCH_DUMP_ATTR 
    18131904 
    18141905  // Retrieve the global dimension of grid 
    18151906  std::vector<int> CGrid::getGlobalDimension() 
     1907  TRY 
    18161908  { 
    18171909    std::vector<int> globalDim; 
     
    18201912    return globalDim; 
    18211913  } 
     1914  CATCH_DUMP_ATTR 
    18221915 
    18231916  // Retrieve dimension on which we do distribution (Very often, it should be 2nd dimension) 
    18241917  int CGrid::getDistributedDimension() 
     1918  TRY 
    18251919  { 
    18261920    std::vector<int> globalDim; 
    18271921    return computeGridGlobalDimension(globalDim, getDomains(), getAxis(), getScalars(), axis_domain_order);     
    18281922  } 
     1923  CATCH_DUMP_ATTR 
    18291924 
    18301925  bool CGrid::isScalarGrid() const 
     1926  TRY 
    18311927  { 
    18321928    return (axisList_.empty() && domList_.empty()); 
    18331929  } 
     1930  CATCH 
    18341931 
    18351932  /*! 
     
    18391936  */ 
    18401937  bool CGrid::doGridHaveDataToWrite() 
     1938  TRY 
    18411939  { 
    18421940     return (0 != writtenDataSize_); 
    18431941  } 
     1942  CATCH_DUMP_ATTR 
    18441943 
    18451944  /*! 
     
    18501949  */ 
    18511950  size_t CGrid::getWrittenDataSize() const 
     1951  TRY 
    18521952  { 
    18531953    return writtenDataSize_; 
    18541954  } 
     1955  CATCH 
    18551956 
    18561957  /*! 
     
    18591960  */ 
    18601961  int CGrid::getNumberWrittenIndexes() const 
     1962  TRY 
    18611963  { 
    18621964    return numberWrittenIndexes_; 
    18631965  } 
     1966  CATCH 
    18641967 
    18651968  /*! 
     
    18681971  */ 
    18691972  int CGrid::getTotalNumberWrittenIndexes() const 
     1973  TRY 
    18701974  { 
    18711975    return totalNumberWrittenIndexes_; 
    18721976  } 
     1977  CATCH 
    18731978 
    18741979  /*! 
     
    18771982  */ 
    18781983  int CGrid::getOffsetWrittenIndexes() const 
     1984  TRY 
    18791985  { 
    18801986    return offsetWrittenIndexes_; 
    18811987  } 
     1988  CATCH 
    18821989 
    18831990  CDistributionServer* CGrid::getDistributionServer() 
     1991  TRY 
    18841992  { 
    18851993    return serverDistribution_; 
    18861994  } 
     1995  CATCH_DUMP_ATTR 
    18871996 
    18881997  CDistributionClient* CGrid::getDistributionClient() 
     1998  TRY 
    18891999  { 
    18902000    return clientDistribution_; 
    18912001  } 
     2002  CATCH_DUMP_ATTR 
    18922003 
    18932004  bool CGrid::doGridHaveDataDistributed(CContextClient* client) 
     2005  TRY 
    18942006  { 
    18952007    if (isScalarGrid()) return false; 
     
    19012013      return isDataDistributed_;     
    19022014  } 
     2015  CATCH_DUMP_ATTR 
    19032016 
    19042017   /*! 
     
    19102023   */ 
    19112024  bool CGrid::dispatchEvent(CEventServer& event) 
     2025  TRY 
    19122026  { 
    19132027 
     
    19432057    } 
    19442058  } 
     2059  CATCH 
    19452060 
    19462061   ///--------------------------------------------------------------- 
    19472062 
    19482063   CDomain* CGrid::addDomain(const std::string& id) 
     2064   TRY 
    19492065   { 
    19502066     order_.push_back(2); 
     
    19532069     return vDomainGroup_->createChild(id); 
    19542070   } 
     2071   CATCH_DUMP_ATTR 
    19552072 
    19562073   CAxis* CGrid::addAxis(const std::string& id) 
     2074   TRY 
    19572075   { 
    19582076     order_.push_back(1); 
     
    19612079     return vAxisGroup_->createChild(id); 
    19622080   } 
     2081   CATCH_DUMP_ATTR 
    19632082 
    19642083   CScalar* CGrid::addScalar(const std::string& id) 
     2084   TRY 
    19652085   { 
    19662086     order_.push_back(0); 
     
    19692089     return vScalarGroup_->createChild(id); 
    19702090   } 
     2091   CATCH_DUMP_ATTR 
    19712092 
    19722093   //! Change virtual field group to a new one 
    19732094   void CGrid::setVirtualDomainGroup(CDomainGroup* newVDomainGroup) 
     2095   TRY 
    19742096   { 
    19752097      this->vDomainGroup_ = newVDomainGroup; 
    19762098   } 
     2099   CATCH_DUMP_ATTR 
    19772100 
    19782101   //! Change virtual variable group to new one 
    19792102   void CGrid::setVirtualAxisGroup(CAxisGroup* newVAxisGroup) 
     2103   TRY 
    19802104   { 
    19812105      this->vAxisGroup_ = newVAxisGroup; 
    19822106   } 
     2107   CATCH_DUMP_ATTR 
    19832108 
    19842109   //! Change virtual variable group to new one 
    19852110   void CGrid::setVirtualScalarGroup(CScalarGroup* newVScalarGroup) 
     2111   TRY 
    19862112   { 
    19872113      this->vScalarGroup_ = newVScalarGroup; 
    19882114   } 
     2115   CATCH_DUMP_ATTR 
    19892116 
    19902117   /*! 
     
    19932120   */ 
    19942121   void CGrid::sendAddDomain(const string& id) 
    1995    { 
     2122   TRY 
     2123  { 
    19962124      sendAddItem(id, (int)EVENT_ID_ADD_DOMAIN); 
    19972125   } 
     2126   CATCH_DUMP_ATTR 
    19982127 
    19992128   /*! 
     
    20022131   */ 
    20032132   void CGrid::sendAddAxis(const string& id) 
     2133   TRY 
    20042134   { 
    20052135      sendAddItem(id, (int)EVENT_ID_ADD_AXIS); 
    20062136   } 
     2137   CATCH_DUMP_ATTR 
    20072138 
    20082139   /*! 
     
    20112142   */ 
    20122143   void CGrid::sendAddScalar(const string& id) 
     2144   TRY 
    20132145   { 
    20142146      sendAddItem(id, (int)EVENT_ID_ADD_SCALAR); 
    20152147   } 
     2148   CATCH_DUMP_ATTR 
    20162149 
    20172150   /*! 
     
    20202153   */ 
    20212154   void CGrid::recvAddDomain(CEventServer& event) 
     2155   TRY 
    20222156   { 
    20232157 
     
    20272161      get(id)->recvAddDomain(*buffer); 
    20282162   } 
     2163   CATCH 
    20292164 
    20302165   /*! 
     
    20332168   */ 
    20342169   void CGrid::recvAddDomain(CBufferIn& buffer) 
     2170   TRY 
    20352171   { 
    20362172      string id; 
     
    20382174      addDomain(id); 
    20392175   } 
     2176   CATCH_DUMP_ATTR 
    20402177 
    20412178   /*! 
     
    20442181   */ 
    20452182   void CGrid::recvAddAxis(CEventServer& event) 
     2183   TRY 
    20462184   { 
    20472185 
     
    20512189      get(id)->recvAddAxis(*buffer); 
    20522190   } 
     2191   CATCH 
    20532192 
    20542193   /*! 
     
    20572196   */ 
    20582197   void CGrid::recvAddAxis(CBufferIn& buffer) 
     2198   TRY 
    20592199   { 
    20602200      string id; 
     
    20622202      addAxis(id); 
    20632203   } 
     2204   CATCH_DUMP_ATTR 
    20642205 
    20652206   /*! 
     
    20682209   */ 
    20692210   void CGrid::recvAddScalar(CEventServer& event) 
     2211   TRY 
    20702212   { 
    20712213 
     
    20752217      get(id)->recvAddScalar(*buffer); 
    20762218   } 
     2219   CATCH 
    20772220 
    20782221   /*! 
     
    20812224   */ 
    20822225   void CGrid::recvAddScalar(CBufferIn& buffer) 
     2226   TRY 
    20832227   { 
    20842228      string id; 
     
    20862230      addScalar(id); 
    20872231   } 
     2232   CATCH_DUMP_ATTR 
    20882233 
    20892234  /*! 
     
    20942239  */ 
    20952240  void CGrid::solveDomainAxisRefInheritance(bool apply) 
     2241  TRY 
    20962242  { 
    20972243    CContext* context = CContext::getCurrent(); 
     
    21342280    } 
    21352281  } 
     2282  CATCH_DUMP_ATTR 
    21362283 
    21372284  bool CGrid::isTransformed() 
     2285  TRY 
    21382286  { 
    21392287    return isTransformed_; 
    21402288  } 
     2289  CATCH_DUMP_ATTR 
    21412290 
    21422291  void CGrid::setTransformed() 
     2292  TRY 
    21432293  { 
    21442294    isTransformed_ = true; 
    21452295  } 
     2296  CATCH_DUMP_ATTR 
    21462297 
    21472298  CGridTransformation* CGrid::getTransformations() 
     2299  TRY 
    21482300  { 
    21492301    return transformations_; 
    21502302  } 
     2303  CATCH_DUMP_ATTR 
    21512304 
    21522305  void CGrid::addTransGridSource(CGrid* gridSrc) 
     2306  TRY 
    21532307  { 
    21542308    if (gridSrc_.end() == gridSrc_.find(gridSrc)) 
    21552309      gridSrc_.insert(make_pair(gridSrc,make_pair(false,""))); 
    21562310  } 
     2311  CATCH_DUMP_ATTR 
    21572312 
    21582313  std::map<CGrid*,std::pair<bool,StdString> >& CGrid::getTransGridSource() 
     2314  TRY 
    21592315  { 
    21602316    return gridSrc_; 
    21612317  } 
     2318  CATCH_DUMP_ATTR 
    21622319 
    21632320  /*! 
     
    21662323  */ 
    21672324  void CGrid::completeGrid(CGrid* transformGridSrc) 
     2325  TRY 
    21682326  { 
    21692327    if (0 != transformGridSrc) 
     
    21842342    gridGenerate.completeGrid(); 
    21852343  } 
     2344  CATCH_DUMP_ATTR 
    21862345 
    21872346  bool CGrid::isGenerated() 
     2347  TRY 
    21882348  { 
    21892349    return isGenerated_; 
    21902350  } 
     2351  CATCH 
    21912352 
    21922353  void CGrid::setGenerated() 
     2354  TRY 
    21932355  { 
    21942356    isGenerated_ = true; 
    21952357  } 
     2358  CATCH_DUMP_ATTR 
    21962359 
    21972360  void CGrid::transformGrid(CGrid* transformGridSrc) 
     2361  TRY 
    21982362  { 
    21992363    if (!transformGridSrc) 
     
    22212385    transformGridSrc->checkMaskIndex(false); 
    22222386  } 
     2387  CATCH_DUMP_ATTR 
    22232388 
    22242389  bool CGrid::hasTransform() 
     2390  TRY 
    22252391  { 
    22262392    if (hasTransform_) return hasTransform_; 
     
    22362402    return hasTransform_; 
    22372403  } 
     2404  CATCH_DUMP_ATTR 
    22382405 
    22392406  /*! 
     
    22422409  */ 
    22432410  std::vector<CDomain*> CGrid::getDomains() 
     2411  TRY 
    22442412  { 
    22452413    std::vector<CDomain*> domList; 
     
    22502418    return domList; 
    22512419  } 
     2420  CATCH_DUMP_ATTR 
    22522421 
    22532422  /*! 
     
    22562425  */ 
    22572426  std::vector<CAxis*> CGrid::getAxis() 
     2427  TRY 
    22582428  { 
    22592429    std::vector<CAxis*> aList; 
     
    22632433    return aList; 
    22642434  } 
     2435  CATCH_DUMP_ATTR 
    22652436 
    22662437  /*! 
     
    22692440  */ 
    22702441  std::vector<CScalar*> CGrid::getScalars() 
     2442  TRY 
    22712443  { 
    22722444    std::vector<CScalar*> sList; 
     
    22762448    return sList; 
    22772449  } 
     2450  CATCH_DUMP_ATTR 
    22782451 
    22792452  /*! 
     
    22822455  */ 
    22832456  CDomain* CGrid::getDomain(int domainIndex) 
     2457  TRY 
    22842458  { 
    22852459    std::vector<CDomain*> domainListP = this->getDomains(); 
     
    22992473    return domainListP[domainIndex]; 
    23002474  } 
     2475  CATCH_DUMP_ATTR 
    23012476 
    23022477  /*! 
     
    23052480  */ 
    23062481  CAxis* CGrid::getAxis(int axisIndex) 
     2482  TRY 
    23072483  { 
    23082484    std::vector<CAxis*> axisListP = this->getAxis(); 
     
    23222498    return axisListP[axisIndex]; 
    23232499  } 
     2500  CATCH_DUMP_ATTR 
    23242501 
    23252502  /*! 
     
    23282505  */ 
    23292506  CScalar* CGrid::getScalar(int scalarIndex) 
     2507  TRY 
    23302508  { 
    23312509    std::vector<CScalar*> scalarListP = this->getScalars(); 
     
    23452523    return scalarListP[scalarIndex]; 
    23462524  } 
     2525  CATCH_DUMP_ATTR 
    23472526 
    23482527  /*! 
     
    23512530  */ 
    23522531  void CGrid::setDomainList(const std::vector<CDomain*> domains) 
     2532  TRY 
    23532533  { 
    23542534    if (isDomListSet) return; 
     
    23712551      isDomListSet = true; 
    23722552    } 
    2373  
    2374   } 
     2553  } 
     2554  CATCH_DUMP_ATTR 
    23752555 
    23762556  /*! 
     
    23792559  */ 
    23802560  void CGrid::setAxisList(const std::vector<CAxis*> axis) 
     2561  TRY 
    23812562  { 
    23822563    if (isAxisListSet) return; 
     
    24002581    } 
    24012582  } 
     2583  CATCH_DUMP_ATTR 
    24022584 
    24032585  /*! 
     
    24062588  */ 
    24072589  void CGrid::setScalarList(const std::vector<CScalar*> scalars) 
     2590  TRY 
    24082591  { 
    24092592    if (isScalarListSet) return; 
     
    24272610    } 
    24282611  } 
     2612  CATCH_DUMP_ATTR 
    24292613 
    24302614  /*! 
     
    24332617  */ 
    24342618  std::vector<StdString> CGrid::getDomainList() 
     2619  TRY 
    24352620  { 
    24362621    setDomainList(); 
    24372622    return domList_; 
    24382623  } 
     2624  CATCH 
    24392625 
    24402626  /*! 
     
    24432629  */ 
    24442630  std::vector<StdString> CGrid::getAxisList() 
     2631  TRY 
    24452632  { 
    24462633    setAxisList(); 
    24472634    return axisList_; 
    24482635  } 
     2636  CATCH 
    24492637 
    24502638  /*! 
     
    24532641  */ 
    24542642  std::vector<StdString> CGrid::getScalarList() 
     2643  TRY 
    24552644  { 
    24562645    setScalarList(); 
    24572646    return scalarList_; 
    24582647  } 
     2648  CATCH 
    24592649 
    24602650  /*! 
     
    24622652  */ 
    24632653  void CGrid::sendAllDomains() 
     2654  TRY 
    24642655  { 
    24652656    std::vector<CDomain*> domList = this->getVirtualDomainGroup()->getAllChildren(); 
     
    24712662    } 
    24722663  } 
     2664  CATCH_DUMP_ATTR 
    24732665 
    24742666  /*! 
     
    24762668  */ 
    24772669  void CGrid::sendAllAxis() 
     2670  TRY 
    24782671  { 
    24792672    std::vector<CAxis*> aList = this->getVirtualAxisGroup()->getAllChildren(); 
     
    24862679    } 
    24872680  } 
     2681  CATCH_DUMP_ATTR 
    24882682 
    24892683  /*! 
     
    24912685  */ 
    24922686  void CGrid::sendAllScalars() 
     2687  TRY 
    24932688  { 
    24942689    std::vector<CScalar*> sList = this->getVirtualScalarGroup()->getAllChildren(); 
     
    25012696    } 
    25022697  } 
     2698  CATCH_DUMP_ATTR 
    25032699 
    25042700  void CGrid::setContextClient(CContextClient* contextClient) 
     2701  TRY 
    25052702  { 
    25062703    if (clientsSet.find(contextClient)==clientsSet.end()) 
     
    25142711        this->getAxis()[i]->setContextClient(contextClient); 
    25152712  } 
     2713  CATCH_DUMP_ATTR 
    25162714 
    25172715  /*! 
     
    25192717  */ 
    25202718  void CGrid::parse(xml::CXMLNode& node) 
     2719  TRY 
    25212720  { 
    25222721    SuperClass::parse(node); 
     
    25592758    setScalarList(); 
    25602759   } 
     2760  CATCH_DUMP_ATTR 
     2761 
    25612762} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.