Changeset 927 for XIOS/trunk
- Timestamp:
- 09/08/16 11:18:51 (8 years ago)
- Location:
- XIOS/trunk/src/node
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/axis.cpp
r906 r927 24 24 : CObjectTemplate<CAxis>() 25 25 , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false) 26 , isClientAfterTransformationChecked(false) 26 27 , isDistributed_(false), hasBounds_(false), isCompressible_(false) 27 28 , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) … … 33 34 : CObjectTemplate<CAxis>(id) 34 35 , CAxisAttributes(), isChecked(false), relFiles(), areClientAttributesChecked_(false) 36 , isClientAfterTransformationChecked(false) 35 37 , isDistributed_(false), hasBounds_(false), isCompressible_(false) 36 38 , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) … … 362 364 } 363 365 366 void CAxis::checkAttributesOnClientAfterTransformation(const std::vector<int>& globalDim, int orderPositionInGrid, 367 CServerDistributionDescription::ServerDistributionType distType) 368 { 369 CContext* context=CContext::getCurrent() ; 370 371 if (this->isClientAfterTransformationChecked) return; 372 if (context->hasClient) 373 { 374 if (n.getValue() != n_glo.getValue()) computeConnectedServer(globalDim, orderPositionInGrid, distType); 375 } 376 377 this->isClientAfterTransformationChecked = true; 378 } 379 364 380 // Send all checked attributes to server 365 381 void CAxis::sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid, … … 367 383 { 368 384 if (!this->areClientAttributesChecked_) checkAttributesOnClient(); 385 if (!this->isClientAfterTransformationChecked) checkAttributesOnClientAfterTransformation(globalDim, orderPositionInGrid, distType); 369 386 CContext* context = CContext::getCurrent(); 370 387 … … 373 390 { 374 391 sendServerAttribut(globalDim, orderPositionInGrid, distType); 375 if (hasValue) sendValue( globalDim, orderPositionInGrid, distType);392 if (hasValue) sendValue(); 376 393 } 377 394 … … 379 396 } 380 397 381 void CAxis::sendValue(const std::vector<int>& globalDim, int orderPositionInGrid, 382 CServerDistributionDescription::ServerDistributionType distType) 398 void CAxis::sendValue() 383 399 { 384 400 if (n.getValue() == n_glo.getValue()) 385 {386 401 sendNonDistributedValue(); 387 }388 402 else 389 {390 computeConnectedServer(globalDim, orderPositionInGrid, distType);391 403 sendDistributedValue(); 392 }393 404 } 394 405 -
XIOS/trunk/src/node/axis.hpp
r836 r927 104 104 void recvServerAttribut(CBufferIn& buffer) ; 105 105 void checkAttributesOnClient(); 106 void checkAttributesOnClientAfterTransformation(const std::vector<int>& globalDim, int orderPositionInGrid, 107 CServerDistributionDescription::ServerDistributionType distType = CServerDistributionDescription::BAND_DISTRIBUTION); 106 108 void sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid, 107 109 CServerDistributionDescription::ServerDistributionType disType = CServerDistributionDescription::BAND_DISTRIBUTION); … … 129 131 void checkBounds(); 130 132 void checkTransformations(); 131 void computeServerIndex(const std::vector<int>& globalDim, int orderPositionInGrid, 132 CServerDistributionDescription::ServerDistributionType disType); 133 void sendValue(const std::vector<int>& globalDim, int orderPositionInGrid, 134 CServerDistributionDescription::ServerDistributionType distType); 133 void sendValue(); 135 134 void computeConnectedServer(const std::vector<int>& globalDim, int orderPositionInGrid, 136 135 CServerDistributionDescription::ServerDistributionType distType); … … 150 149 bool isChecked; 151 150 bool areClientAttributesChecked_; 151 bool isClientAfterTransformationChecked; 152 152 std::set<StdString> relFiles, relFilesCompressed; 153 153 TransMapTypes transformationMap_; -
XIOS/trunk/src/node/grid.cpp
r926 r927 166 166 void CGrid::checkAttributesAfterTransformation() 167 167 { 168 setDomainList(); 169 std::vector<CDomain*> domListP = this->getDomains(); 170 if (!domListP.empty()) 171 { 172 for (int i = 0; i < domListP.size(); ++i) 173 { 174 domListP[i]->checkAttributesOnClientAfterTransformation(); 175 } 176 } 168 setAxisList(); 169 std::vector<CAxis*> axisListP = this->getAxis(); 170 if (!axisListP.empty()) 171 { 172 int idx = 0; 173 axisPositionInGrid_.resize(0); 174 for (int i = 0; i < axis_domain_order.numElements(); ++i) 175 { 176 int elementDimension = axis_domain_order(i); 177 if (1 == elementDimension) 178 { 179 axisPositionInGrid_.push_back(idx); 180 ++idx; 181 } 182 else if (2 == elementDimension) idx += 2; 183 } 184 185 for (int i = 0; i < axisListP.size(); ++i) 186 { 187 axisListP[i]->checkAttributesOnClientAfterTransformation(globalDim_,axisPositionInGrid_[i]); 188 } 189 } 190 191 setDomainList(); 192 std::vector<CDomain*> domListP = this->getDomains(); 193 if (!domListP.empty()) 194 { 195 for (int i = 0; i < domListP.size(); ++i) 196 { 197 domListP[i]->checkAttributesOnClientAfterTransformation(); 198 } 199 } 177 200 } 178 201
Note: See TracChangeset
for help on using the changeset viewer.