Changeset 274 for XMLIO_V2/dev/common/src/xmlio/node/domain.cpp
- Timestamp:
- 09/15/11 10:19:26 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/common/src/xmlio/node/domain.cpp
r266 r274 6 6 7 7 #include "mpi_manager.hpp" 8 9 #include "tree_manager.hpp" 8 10 9 11 #include <algorithm> … … 18 20 , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 19 21 , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 22 , ibegin_zoom_sub(), jbegin_zoom_sub() 20 23 , lonvalue_sub(), latvalue_sub() 21 24 { /* Ne rien faire de plus */ } … … 25 28 , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 26 29 , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 30 , ibegin_zoom_sub(), jbegin_zoom_sub() 27 31 , lonvalue_sub(), latvalue_sub() 28 32 { /* Ne rien faire de plus */ } … … 81 85 SuperClass::fromBinary(is); 82 86 83 this->ibegin_sub.push_back(this->ibegin.getValue()); 84 this->jbegin_sub.push_back(this->jbegin.getValue()); 85 this->iend_sub.push_back(this->iend.getValue()); 86 this->jend_sub.push_back(this->jend.getValue()); 87 88 this->latvalue_sub.push_back(this->latvalue.getValue()); 89 this->lonvalue_sub.push_back(this->lonvalue.getValue()); 87 if ( !this->ibegin.isEmpty() && 88 !this->jbegin.isEmpty() && 89 !this->iend.isEmpty() && 90 !this->jend.isEmpty() && 91 !this->latvalue.isEmpty() && 92 !this->lonvalue.isEmpty()) 93 { 94 95 this->ibegin_sub.push_back(this->ibegin.getValue()); 96 this->jbegin_sub.push_back(this->jbegin.getValue()); 97 this->iend_sub.push_back(this->iend.getValue()); 98 this->jend_sub.push_back(this->jend.getValue()); 99 100 this->ibegin_zoom_sub.push_back(this->zoom_ibegin_loc.getValue()); 101 this->jbegin_zoom_sub.push_back(this->zoom_jbegin_loc.getValue()); 102 103 this->latvalue_sub.push_back(this->latvalue.getValue()); 104 this->lonvalue_sub.push_back(this->lonvalue.getValue()); 105 } 90 106 91 107 #define CLEAR_ATT(name_)\ … … 107 123 #undef CLEAR_ATT 108 124 109 this->ibegin.setValue(*std::min_element(this->ibegin_sub.begin(),this->ibegin_sub.end())); 110 this->jbegin.setValue(*std::min_element(this->jbegin_sub.begin(),this->jbegin_sub.end())); 111 this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end())); 112 this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end())); 125 if ( !this->ibegin.isEmpty() && 126 !this->jbegin.isEmpty() && 127 !this->iend.isEmpty() && 128 !this->jend.isEmpty() && 129 !this->latvalue.isEmpty() && 130 !this->lonvalue.isEmpty()) 131 { 132 133 this->ibegin.setValue(*std::min_element(this->ibegin_sub.begin(),this->ibegin_sub.end())); 134 this->jbegin.setValue(*std::min_element(this->jbegin_sub.begin(),this->jbegin_sub.end())); 135 this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end())); 136 this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end())); 137 } 113 138 } 114 139 … … 124 149 { 125 150 if ((ni_glo.isEmpty() || ni_glo.getValue() <= 0 ) || 126 (ni_glo.isEmpty() || nj_glo.getValue() <= 0 )) 151 (nj_glo.isEmpty() || nj_glo.getValue() <= 0 )) 152 { 153 abort(); 127 154 ERROR("CDomain::checkAttributes(void)", 128 155 << "[ Id = " << this->getId() << " ] " 129 156 << "Le domaine global est mal défini," 130 << " vérifiez les valeurs de \'ni_glo\' et \'nj_glo\' !") ; 157 << " vérifiez les valeurs de \'ni_glo\' et \'nj_glo\' !") 158 } 131 159 } 132 160 … … 675 703 //---------------------------------------------------------------- 676 704 705 const std::vector<int> & CDomain::getIBeginZoomSub(void) const 706 { 707 return (this->ibegin_zoom_sub); 708 } 709 710 //---------------------------------------------------------------- 711 677 712 const std::vector<int> & CDomain::getIEndSub(void) const 678 713 { … … 686 721 return (this->jbegin_sub); 687 722 } 723 724 //---------------------------------------------------------------- 725 726 const std::vector<int> & CDomain::getJBeginZoomSub(void) const 727 { 728 return (this->jbegin_zoom_sub); 729 } 730 688 731 689 732 //----------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.