Changeset 667
- Timestamp:
- 08/24/15 14:53:33 (9 years ago)
- Location:
- XIOS/trunk/src/node
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/axis.cpp
r666 r667 251 251 int nbServer = client->serverSize; 252 252 int range, clientSize = client->clientSize; 253 253 254 size_t ni = this->n.getValue(); 254 255 size_t ibegin = this->begin.getValue(); 256 size_t zoom_end = global_zoom_begin+global_zoom_size-1; 257 size_t nZoomCount = 0; 258 for (size_t idx = 0; idx < ni; ++idx) 259 { 260 size_t globalIndex = ibegin + idx; 261 262 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nZoomCount; 263 } 255 264 256 265 CArray<size_t,1> globalIndexAxis(ni); 257 int zoom_end = global_zoom_begin+global_zoom_size-1;258 std::vector<size_t> globalAxisZoom;266 std::vector<size_t> globalAxisZoom(nZoomCount); 267 nZoomCount = 0; 259 268 for (size_t idx = 0; idx < ni; ++idx) 260 269 { 261 270 size_t globalIndex = ibegin + idx; 262 271 globalIndexAxis(idx) = globalIndex; 263 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) globalAxisZoom.push_back(globalIndex); 272 if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) 273 { 274 globalAxisZoom[nZoomCount]; 275 ++nZoomCount; 276 } 264 277 } 265 278 -
XIOS/trunk/src/node/domain.cpp
r666 r667 169 169 else if (!i_index.isEmpty()) 170 170 { 171 i begin = i_index(0);171 if (ibegin.isEmpty()) ibegin = i_index(0); 172 172 } 173 173 … … 192 192 else if (!j_index.isEmpty()) 193 193 { 194 jbegin = j_index(0);194 if (jbegin.isEmpty()) jbegin = j_index(0); 195 195 } 196 196 … … 208 208 void CDomain::checkMask(void) 209 209 { 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 217 210 if (!mask_1d.isEmpty() && !mask_2d.isEmpty()) 218 211 ERROR("CDomain::checkMask(void)", … … 644 637 645 638 //---------------------------------------------------------------- 646 // Divide function checkAttributes into 2 seperate ones checkBounds639 // Divide function checkAttributes into 2 seperate ones 647 640 // This function only checks all attributes of current domain 648 641 void CDomain::checkAttributesOnClient() … … 682 675 if (hasLonLat || hasArea) sendLonLatArea(); 683 676 } 684 685 677 this->isChecked = true; 686 678 } … … 877 869 } 878 870 871 /*! 872 Send index from client to server(s) 873 */ 879 874 void CDomain::sendIndex() 880 875 { … … 923 918 } 924 919 920 /*! 921 Send area from client to server(s) 922 */ 925 923 void CDomain::sendArea() 926 924 { … … 965 963 } 966 964 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 */ 967 970 void CDomain::sendLonLat() 968 971 { … … 1042 1045 } 1043 1046 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 */ 1045 1051 void CDomain::sendLonLatArea(void) 1046 1052 { … … 1085 1091 } 1086 1092 1093 /*! 1094 Receive attributes event from clients(s) 1095 \param[in] event event contain info about rank and associated attributes 1096 */ 1087 1097 void CDomain::recvServerAttribut(CEventServer& event) 1088 1098 { … … 1093 1103 } 1094 1104 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 */ 1095 1110 void CDomain::recvServerAttribut(CBufferIn& buffer) 1096 1111 { … … 1130 1145 } 1131 1146 1147 /*! 1148 Receive index event from clients(s) 1149 \param[in] event event contain info about rank and associated index 1150 */ 1132 1151 void CDomain::recvIndex(CEventServer& event) 1133 1152 { … … 1142 1161 } 1143 1162 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 */ 1144 1168 void CDomain::recvIndex(int rank, CBufferIn& buffer) 1145 1169 { … … 1149 1173 } 1150 1174 1175 /*! 1176 Receive longitude event from clients(s) 1177 \param[in] event event contain info about rank and associated longitude 1178 */ 1151 1179 void CDomain::recvLon(CEventServer& event) 1152 1180 { … … 1161 1189 } 1162 1190 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 */ 1163 1196 void CDomain::recvLon(int rank, CBufferIn& buffer) 1164 1197 { … … 1184 1217 } 1185 1218 1219 /*! 1220 Receive latitude event from clients(s) 1221 \param[in] event event contain info about rank and associated latitude 1222 */ 1186 1223 void CDomain::recvLat(CEventServer& event) 1187 1224 { … … 1196 1233 } 1197 1234 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 */ 1198 1240 void CDomain::recvLat(int rank, CBufferIn& buffer) 1199 1241 { … … 1219 1261 } 1220 1262 1263 /*! 1264 Receive area event from clients(s) 1265 \param[in] event event contain info about rank and associated area 1266 */ 1221 1267 void CDomain::recvArea(CEventServer& event) 1222 1268 { … … 1231 1277 } 1232 1278 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 */ 1233 1284 void CDomain::recvArea(int rank, CBufferIn& buffer) 1234 1285 { … … 1247 1298 } 1248 1299 1300 /*! 1301 Check whether a domain has transformation 1302 \return true if domain has transformation 1303 */ 1249 1304 bool CDomain::hasTransformation() 1250 1305 { … … 1252 1307 } 1253 1308 1309 /*! 1310 Set transformation for current domain. It's the method to move transformation in hierarchy 1311 \param [in] domTrans transformation on domain 1312 */ 1254 1313 void CDomain::setTransformations(const TransMapTypes& domTrans) 1255 1314 { … … 1257 1316 } 1258 1317 1318 /*! 1319 Get all transformation current domain has 1320 \return all transformation 1321 */ 1259 1322 CDomain::TransMapTypes CDomain::getAllTransformations(void) 1260 1323 { … … 1276 1339 } 1277 1340 1341 /*! 1342 A current domain will go up the hierarchy to find out the domain from which it has transformation 1343 */ 1278 1344 void CDomain::solveInheritanceTransformation() 1279 1345 { … … 1296 1362 } 1297 1363 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 */ 1298 1369 void CDomain::parse(xml::CXMLNode & node) 1299 1370 { -
XIOS/trunk/src/node/domain.hpp
r666 r667 76 76 TransMapTypes getAllTransformations(); 77 77 78 private :79 void checkDomain(void);80 void checkLocalIDomain(void);81 void checkLocalJDomain(void);82 83 void checkMask(void);84 void checkDomainData(void);85 void checkCompression(void);86 87 void checkBounds(void);88 void checkArea(void);89 void checkLonLat();90 91 78 public : 92 93 /// Autres ///94 95 79 const std::set<StdString> & getRelFiles(void) const; 96 97 98 /// Test ///99 80 bool IsWritten(const StdString & filename) const; 100 // bool hasZoom(void) const;101 81 bool isEmpty(void) const; 102 82 bool isDistributed(void) const; 103 83 104 84 105 // int ni_client,ibegin_client,iend_client ; 106 // int zoom_ni_client,zoom_ibegin_client,zoom_iend_client ; 107 // 108 // int nj_client,jbegin_client,jend_client ; 109 // int zoom_nj_client,zoom_jbegin_client,zoom_jend_client ; 85 int global_zoom_ibegin, global_zoom_ni; 86 int global_zoom_jbegin, global_zoom_nj; 110 87 111 88 int ni_srv,ibegin_srv,iend_srv ; … … 121 98 CArray<double, 1> area_srv; 122 99 123 124 100 vector<int> connectedServer ; // list of connected server 125 101 vector<int> nbSenders ; // for each communication with a server, number of communicating client … … 127 103 vector< vector<int> > i_indSrv ; // for each server, i global index to send 128 104 vector< vector<int> > j_indSrv ; // for each server, j global index to send 129 130 131 // CArray<int,2> mapConnectedServer ; // (ni,nj) => mapped to connected server number, -1 if no server is target132 133 int global_zoom_ibegin, global_zoom_ni;134 int global_zoom_jbegin, global_zoom_nj;135 105 136 106 public : … … 169 139 bool hasLonLat; 170 140 private: 141 void checkDomain(void); 142 void checkLocalIDomain(void); 143 void checkLocalJDomain(void); 144 145 void checkMask(void); 146 void checkDomainData(void); 147 void checkCompression(void); 148 149 void checkBounds(void); 150 void checkArea(void); 151 void checkLonLat(); 152 171 153 void checkTransformations(); 172 154 void setTransformations(const TransMapTypes&); … … 191 173 bool isUnstructed_; 192 174 193 194 195 175 DECLARE_REF_FUNC(Domain,domain) 196 176
Note: See TracChangeset
for help on using the changeset viewer.