Changeset 715 for XIOS/trunk/src/node
- Timestamp:
- 10/05/15 14:43:48 (9 years ago)
- Location:
- XIOS/trunk/src/node
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/domain.cpp
r691 r715 35 35 , isClientAfterTransformationChecked(false), hasLonLat(false) 36 36 , lonvalue_client(), latvalue_client(), bounds_lon_client(), bounds_lat_client() 37 , srcObject_(0) 37 , srcObject_(0), isRedistributed_(false) 38 38 { /* Ne rien faire de plus */ } 39 39 … … 45 45 , isClientAfterTransformationChecked(false), hasLonLat(false) 46 46 , lonvalue_client(), latvalue_client(), bounds_lon_client(), bounds_lat_client() 47 , srcObject_(0) 47 , srcObject_(0), isRedistributed_(false) 48 48 { /* Ne rien faire de plus */ } 49 49 … … 171 171 void CDomain::redistribute(int nbLocalDomain) 172 172 { 173 if (this->isRedistributed_) return; 173 174 if (type_attr::rectilinear == type) 174 175 { … … 270 271 // Now fill other attributes 271 272 fillInRectilinearLonLat(); 272 // fillInRectilinearBoundLonLat(); 273 this->isRedistributed_ = true; 274 info <<"now, we are here " << std::endl; 275 info << "domain " << this->getId() << " ni " << ni.getValue() << " nj " << nj.getValue() << std::endl; 273 276 } 274 277 } … … 327 330 } 328 331 } 332 333 /*! 334 Temporary function to verify whether a rectilinear domain is created automatically. 335 The domain is distributed into number of parts which are equal to number of clients (intracomm) 336 */ 337 void CDomain::checkGenerate() 338 { 339 TransMapTypes trans = this->getAllTransformations(); 340 TransMapTypes::const_iterator it = trans.begin(), ite = trans.end(); 341 int transOrder = 0; 342 for (; it != ite; ++it, ++transOrder) 343 { 344 ETranformationType transType = it->first; 345 if ((TRANS_GENERATE_RECTILINEAR_DOMAIN == transType) && (0 == transOrder)) 346 { 347 CContext* context = CContext::getCurrent(); 348 CContextClient* client = context->client; 349 int nbClient; 350 MPI_Comm_size(client->intraComm,&nbClient); 351 this->redistribute(nbClient); 352 break; 353 } 354 } 355 } 356 329 357 330 358 void CDomain::checkDomain(void) … … 942 970 CContext* context=CContext::getCurrent(); 943 971 972 this->checkGenerate(); 944 973 this->checkDomain(); 945 974 this->checkBounds(); -
XIOS/trunk/src/node/domain.hpp
r688 r715 164 164 void checkArea(void); 165 165 void checkLonLat(); 166 void checkGenerate(); 166 167 167 168 void checkTransformations(); … … 189 190 //! True if and only if the data defined on the domain can be outputted in a compressed way 190 191 bool isCompressible_; 192 bool isRedistributed_; 191 193 TransMapTypes transformationMap_; 192 194 std::vector<int> nGlobDomain_;
Note: See TracChangeset
for help on using the changeset viewer.