Ignore:
Timestamp:
08/24/15 14:53:33 (9 years ago)
Author:
mhnguyen
Message:

Clearing some redundant codes and add some comments

Test
No

File:
1 edited

Legend:

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

    r666 r667  
    169169      else if (!i_index.isEmpty()) 
    170170      { 
    171         ibegin = i_index(0); 
     171        if (ibegin.isEmpty()) ibegin = i_index(0); 
    172172      } 
    173173 
     
    192192     else if (!j_index.isEmpty()) 
    193193     { 
    194        jbegin = j_index(0); 
     194       if (jbegin.isEmpty()) jbegin = j_index(0); 
    195195     } 
    196196 
     
    208208   void CDomain::checkMask(void) 
    209209   { 
    210       using namespace std; 
    211  
    212       int ibegin_mask = 0, 
    213           jbegin_mask = 0, 
    214           iend_mask = ibegin.getValue() + ni.getValue() - 1, 
    215           jend_mask = jbegin.getValue() + nj.getValue() - 1; 
    216  
    217210      if (!mask_1d.isEmpty() && !mask_2d.isEmpty()) 
    218211        ERROR("CDomain::checkMask(void)", 
     
    644637 
    645638   //---------------------------------------------------------------- 
    646    // Divide function checkAttributes into 2 seperate onescheckBounds 
     639   // Divide function checkAttributes into 2 seperate ones 
    647640   // This function only checks all attributes of current domain 
    648641   void CDomain::checkAttributesOnClient() 
     
    682675       if (hasLonLat || hasArea) sendLonLatArea(); 
    683676     } 
    684  
    685677     this->isChecked = true; 
    686678   } 
     
    877869  } 
    878870 
     871  /*! 
     872    Send index from client to server(s) 
     873  */ 
    879874  void CDomain::sendIndex() 
    880875  { 
     
    923918  } 
    924919 
     920  /*! 
     921    Send area from client to server(s) 
     922  */ 
    925923  void CDomain::sendArea() 
    926924  { 
     
    965963  } 
    966964 
     965  /*! 
     966    Send longitude and latitude from client to servers 
     967    Each client send long and lat information to corresponding connected server(s). 
     968    Because longitude and latitude are optional, this function only called if latitude and longitude exist 
     969  */ 
    967970  void CDomain::sendLonLat() 
    968971  { 
     
    10421045  } 
    10431046 
    1044  
     1047  /*! 
     1048    Send some optional information to server(s) 
     1049    In the future, this function can be extended with more optional information to send 
     1050  */ 
    10451051  void CDomain::sendLonLatArea(void) 
    10461052  { 
     
    10851091  } 
    10861092 
     1093  /*! 
     1094    Receive attributes event from clients(s) 
     1095    \param[in] event event contain info about rank and associated attributes 
     1096  */ 
    10871097  void CDomain::recvServerAttribut(CEventServer& event) 
    10881098  { 
     
    10931103  } 
    10941104 
     1105  /*! 
     1106    Receive attributes from client(s): zoom info and begin and n of each server 
     1107    \param[in] rank rank of client source 
     1108    \param[in] buffer message containing attributes info 
     1109  */ 
    10951110  void CDomain::recvServerAttribut(CBufferIn& buffer) 
    10961111  { 
     
    11301145  } 
    11311146 
     1147  /*! 
     1148    Receive index event from clients(s) 
     1149    \param[in] event event contain info about rank and associated index 
     1150  */ 
    11321151  void CDomain::recvIndex(CEventServer& event) 
    11331152  { 
     
    11421161  } 
    11431162 
     1163  /*! 
     1164    Receive index information from client(s) 
     1165    \param[in] rank rank of client source 
     1166    \param[in] buffer message containing index info 
     1167  */ 
    11441168  void CDomain::recvIndex(int rank, CBufferIn& buffer) 
    11451169  { 
     
    11491173  } 
    11501174 
     1175  /*! 
     1176    Receive longitude event from clients(s) 
     1177    \param[in] event event contain info about rank and associated longitude 
     1178  */ 
    11511179  void CDomain::recvLon(CEventServer& event) 
    11521180  { 
     
    11611189  } 
    11621190 
     1191  /*! 
     1192    Receive longitude information from client(s) 
     1193    \param[in] rank rank of client source 
     1194    \param[in] buffer message containing longitude info 
     1195  */ 
    11631196  void CDomain::recvLon(int rank, CBufferIn& buffer) 
    11641197  { 
     
    11841217  } 
    11851218 
     1219  /*! 
     1220    Receive latitude event from clients(s) 
     1221    \param[in] event event contain info about rank and associated latitude 
     1222  */ 
    11861223  void CDomain::recvLat(CEventServer& event) 
    11871224  { 
     
    11961233  } 
    11971234 
     1235  /*! 
     1236    Receive latitude information from client(s) 
     1237    \param[in] rank rank of client source 
     1238    \param[in] buffer message containing latitude info 
     1239  */ 
    11981240  void CDomain::recvLat(int rank, CBufferIn& buffer) 
    11991241  { 
     
    12191261  } 
    12201262 
     1263  /*! 
     1264    Receive area event from clients(s) 
     1265    \param[in] event event contain info about rank and associated area 
     1266  */ 
    12211267  void CDomain::recvArea(CEventServer& event) 
    12221268  { 
     
    12311277  } 
    12321278 
     1279  /*! 
     1280    Receive area information from client(s) 
     1281    \param[in] rank rank of client source 
     1282    \param[in] buffer message containing area info 
     1283  */ 
    12331284  void CDomain::recvArea(int rank, CBufferIn& buffer) 
    12341285  { 
     
    12471298  } 
    12481299 
     1300  /*! 
     1301    Check whether a domain has transformation 
     1302    \return true if domain has transformation 
     1303  */ 
    12491304  bool CDomain::hasTransformation() 
    12501305  { 
     
    12521307  } 
    12531308 
     1309  /*! 
     1310    Set transformation for current domain. It's the method to move transformation in hierarchy 
     1311    \param [in] domTrans transformation on domain 
     1312  */ 
    12541313  void CDomain::setTransformations(const TransMapTypes& domTrans) 
    12551314  { 
     
    12571316  } 
    12581317 
     1318  /*! 
     1319    Get all transformation current domain has 
     1320    \return all transformation 
     1321  */ 
    12591322  CDomain::TransMapTypes CDomain::getAllTransformations(void) 
    12601323  { 
     
    12761339  } 
    12771340 
     1341  /*! 
     1342    A current domain will go up the hierarchy to find out the domain from which it has transformation 
     1343  */ 
    12781344  void CDomain::solveInheritanceTransformation() 
    12791345  { 
     
    12961362  } 
    12971363 
     1364  /*! 
     1365    Parse children nodes of a domain in xml file. 
     1366    Whenver there is a new transformation, its type and name should be added into this function 
     1367    \param node child node to process 
     1368  */ 
    12981369  void CDomain::parse(xml::CXMLNode & node) 
    12991370  { 
Note: See TracChangeset for help on using the changeset viewer.