Changeset 816 for XIOS/trunk/src/node
- Timestamp:
- 01/26/16 18:19:04 (8 years ago)
- Location:
- XIOS/trunk/src/node
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/axis.cpp
r815 r816 26 26 , isDistributed_(false), hasBounds_(false), isCompressible_(false) 27 27 , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) 28 , transformationMap_(), global_zoom_begin(0), global_zoom_size(0) 28 , transformationMap_(), global_zoom_begin(0), global_zoom_size(0), hasValue(false) 29 29 { 30 30 } … … 35 35 , isDistributed_(false), hasBounds_(false), isCompressible_(false) 36 36 , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0) 37 , transformationMap_(), global_zoom_begin(0), global_zoom_size(0) 37 , transformationMap_(), global_zoom_begin(0), global_zoom_size(0), hasValue(false) 38 38 { 39 39 } … … 220 220 else this->n.setValue(size); 221 221 222 StdSize true_size = value.numElements(); 223 if (this->n.getValue() != true_size) 224 ERROR("CAxis::checkAttributes(void)", 225 << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 226 << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 222 if (!this->value.isEmpty()) 223 { 224 StdSize true_size = value.numElements(); 225 if (this->n.getValue() != true_size) 226 ERROR("CAxis::checkAttributes(void)", 227 << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 228 << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 229 this->hasValue = true; 230 } 231 232 // StdSize true_size = value.numElements(); 233 // if (this->n.getValue() != true_size) 234 // ERROR("CAxis::checkAttributes(void)", 235 // << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 236 // << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 227 237 228 238 this->checkData(); … … 351 361 { 352 362 sendServerAttribut(globalDim, orderPositionInGrid, distType); 353 sendValue(globalDim, orderPositionInGrid, distType);363 if (hasValue) sendValue(globalDim, orderPositionInGrid, distType); 354 364 } 355 365 … … 864 874 zoom_size_srv = zoom_end_srv - zoom_begin_srv + 1; 865 875 } 866 value_srv.resize(zoom_size_srv); 867 bound_srv.resize(2,zoom_size_srv); 876 if (hasValue) 877 { 878 value_srv.resize(zoom_size_srv); 879 if (hasBounds_) bound_srv.resize(2,zoom_size_srv); 880 } 868 881 } 869 882 -
XIOS/trunk/src/node/axis.hpp
r815 r816 119 119 CArray<double,1> value_srv; 120 120 CArray<double,2> bound_srv; 121 bool hasValue; 121 122 122 123 private:
Note: See TracChangeset
for help on using the changeset viewer.