Ignore:
Timestamp:
09/15/11 10:19:26 (13 years ago)
Author:
hozdoba
Message:

nouvelle interface fortran et corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/common/src/xmlio/node/domain.cpp

    r266 r274  
    66 
    77#include "mpi_manager.hpp" 
     8 
     9#include "tree_manager.hpp" 
    810 
    911#include <algorithm> 
     
    1820      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 
    1921      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
     22      , ibegin_zoom_sub(), jbegin_zoom_sub() 
    2023      , lonvalue_sub(), latvalue_sub() 
    2124   { /* Ne rien faire de plus */ } 
     
    2528      , isChecked(false), local_mask(new CArray<int, 2>(boost::extents[0][0])), relFiles() 
    2629      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
     30      , ibegin_zoom_sub(), jbegin_zoom_sub() 
    2731      , lonvalue_sub(), latvalue_sub() 
    2832   { /* Ne rien faire de plus */ } 
     
    8185      SuperClass::fromBinary(is); 
    8286       
    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      } 
    90106       
    91107#define CLEAR_ATT(name_)\ 
     
    107123#undef CLEAR_ATT 
    108124 
    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      } 
    113138   } 
    114139 
     
    124149   { 
    125150      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(); 
    127154         ERROR("CDomain::checkAttributes(void)", 
    128155               << "[ Id = " << this->getId() << " ] " 
    129156               << "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      } 
    131159   } 
    132160 
     
    675703   //---------------------------------------------------------------- 
    676704    
     705   const std::vector<int> & CDomain::getIBeginZoomSub(void) const 
     706   { 
     707      return (this->ibegin_zoom_sub); 
     708   } 
     709                
     710   //---------------------------------------------------------------- 
     711                      
    677712   const std::vector<int> & CDomain::getIEndSub(void) const 
    678713   { 
     
    686721      return (this->jbegin_sub); 
    687722   } 
     723    
     724   //---------------------------------------------------------------- 
     725       
     726   const std::vector<int> & CDomain::getJBeginZoomSub(void) const 
     727   { 
     728      return (this->jbegin_zoom_sub); 
     729   } 
     730                   
    688731    
    689732   //---------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.